compiling with python 3.4 and icc
See original GitHub issueI 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:
- Created 8 years ago
- Comments:10 (9 by maintainers)
Top GitHub Comments
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.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.