question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

compiling with python 3.4 and icc

See original GitHub issue

I am trying to compile numpy with mkl, icc and ifort. My method currently works with python2.7, but not python3.4. I currently get the error: RuntimeError: maximum recursion depth exceeded while calling a Python object

I am selectively following directions from

https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl

I have cloned the git repository, and added the following lines to my site.cfg

[mkl]                                                                           
library_dirs = /opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64    
include_dirs = /opt/intel/compilers_and_libraries_2016/linux/mkl/include        
mkl_libs = mkl_rt                                                               
lapack_libs =    

I install on python 2.7 with the code

$ python2.7 setup.py config --compiler=intel build_clib --compiler=intel build_ext --compiler=intel install --user

installing on python 3.4 raises the following error

bash-4.2$ python3.4 setup.py config --compiler=intel build_clib --compiler=intel build_ext --compiler=intel install --user Running from numpy source directory. Cythonizing sources numpy/random/mtrand/mtrand.pyx has not changed blas_opt_info: blas_mkl_info: FOUND: library_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64’] include_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/include’] libraries = [‘mkl_rt’, ‘pthread’] define_macros = [(‘SCIPY_MKL_H’, None), (‘HAVE_CBLAS’, None)]

FOUND: library_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64’] include_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/include’] libraries = [‘mkl_rt’, ‘pthread’] define_macros = [(‘SCIPY_MKL_H’, None), (‘HAVE_CBLAS’, None)]

F2PY Version 2 lapack_opt_info: openblas_lapack_info: libraries openblas not found in [‘/usr/local/lib64’, ‘/usr/local/lib’, ‘/usr/lib64’, ‘/usr/lib’, ‘/usr/lib/’] NOT AVAILABLE

lapack_mkl_info: mkl_info: FOUND: library_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64’] include_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/include’] libraries = [‘mkl_rt’, ‘pthread’] define_macros = [(‘SCIPY_MKL_H’, None), (‘HAVE_CBLAS’, None)]

FOUND: library_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64’] include_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/include’] libraries = [‘mkl_rt’, ‘pthread’] define_macros = [(‘SCIPY_MKL_H’, None), (‘HAVE_CBLAS’, None)]

FOUND: library_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64’] include_dirs = [‘/opt/intel/compilers_and_libraries_2016/linux/mkl/include’] libraries = [‘mkl_rt’, ‘pthread’] define_macros = [(‘SCIPY_MKL_H’, None), (‘HAVE_CBLAS’, None)]

/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: ‘define_macros’ warnings.warn(msg) running config running build_clib running build_src build_src building py_modules sources building library “npymath” sources Found executable /opt/intel/compilers_and_libraries_2016/linux/bin/intel64/icc customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: icc -fPIC -fp-model strict -O3 -fomit-frame-pointer -openmp

compile options: ‘-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.4m -c’ icc: _configtest.c Traceback (most recent call last): File “setup.py”, line 386, in <module> setup_package() File “setup.py”, line 378, in setup_package setup(**metadata) File “/home/e2richards/numpy/numpy/distutils/core.py”, line 169, in setup return old_setup(**new_attr) File “/usr/lib64/python3.4/distutils/core.py”, line 148, in setup dist.run_commands() File “/usr/lib64/python3.4/distutils/dist.py”, line 955, in run_commands self.run_command(cmd) File “/usr/lib64/python3.4/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/e2richards/numpy/numpy/distutils/command/build_clib.py”, line 74, in run self.run_command(‘build_src’) File “/usr/lib64/python3.4/distutils/cmd.py”, line 313, in run_command self.distribution.run_command(command) File “/usr/lib64/python3.4/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/e2richards/numpy/numpy/distutils/command/build_src.py”, line 147, in run self.build_sources() File “/home/e2richards/numpy/numpy/distutils/command/build_src.py”, line 158, in build_sources self.build_library_sources(_libname_info) File “/home/e2richards/numpy/numpy/distutils/command/build_src.py”, line 293, in build_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File “/home/e2richards/numpy/numpy/distutils/command/build_src.py”, line 376, in generate_sources source = func(extension, build_dir) File “numpy/core/setup.py”, line 652, in get_mathlib_info st = config_cmd.try_link(‘int main(void) { return 0;}’) File “/usr/lib64/python3.4/distutils/command/config.py”, line 246, in try_link libraries, library_dirs, lang) File “/home/e2richards/numpy/numpy/distutils/command/config.py”, line 155, in _link libraries, library_dirs, lang)) File “/home/e2richards/numpy/numpy/distutils/command/config.py”, line 95, in wrap_method ret = mth(((self,)+args)) File “/usr/lib64/python3.4/distutils/command/config.py”, line 143, in _link target_lang=lang) File “/usr/lib64/python3.4/distutils/ccompiler.py”, line 734, in link_executable debug, extra_preargs, extra_postargs, None, target_lang) File “/usr/lib64/python3.4/distutils/unixccompiler.py”, line 163, in link runtime_library_dirs) File “/usr/lib64/python3.4/distutils/unixccompiler.py”, line 87, in _fix_lib_args runtime_library_dirs)

File “/usr/lib64/python3.4/distutils/unixccompiler.py”, line 86, in _fix_lib_args self.class, self)._fix_lib_args(libraries, library_dirs, RuntimeError: maximum recursion depth exceeded while calling a Python object

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mattipcommented, Oct 22, 2018

Closing. The problem seems to be in distutils while calling _fix_lib_args, for a particular setup (icc, mkl, icfort) of closed-source tools. If it reproduces please reopen and engage in finding a solution. Perhaps the Intel people know about this and can help solve it.

0reactions
mattipcommented, Oct 22, 2018

Closing. The problem seems to be in distutils while calling _fix_lib_args, for a particular setup (icc, mkl, icfort) of closed-source tools. If it reproduces please reopen and engage in finding a solution. Perhaps the Intel people know about this and can help solve it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Python-Dev] Compiling Python on Linux with Intel's icc
Dear Python Devs, I've been attempting to compile a fully functional version of Python 2.7 using Intel's C compiler, having built supposedly ...
Read more >
Can cython be compiled with icc? - Stack Overflow
How does one go about installing cython from source using icc compiler ? I tried this and it does not work. From the...
Read more >
Compiling Python, NumPy and SciPy with Intel Compilers and ...
Note: This guide assumes that you have a 64-bit system with the Intel compilers installed with binaries icc , icpc , ifort ,...
Read more >
correct way to compile cython project with icc? - Google Groups
Hello everyone,. I would like to compile a Cython project with Intel's compiler icc to benchmark the resulting binary against one produced by...
Read more >
psutil, python, and icc - Yen-Chung Chen
I used to dislike dependency management because there are so many things that require root or are mysteriously incompatible with each other.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found