<math.h> gagal pada Intel Centos 6.6 cluster


1

Saya berada di gugus universitas, tidak cocok untuk saya. Saya mencoba membuat Keras bekerja, dengan tensorflow atau theano. Tensorflow gagal karena sistem hanya memiliki CUDA 7.5. Ini memiliki chipset Intel, tetapi itu memberi saya masalah dengan math.h.

Sunting: Setelah beberapa peretasan, saya memutuskan untuk mengkompilasi Python 3.5 dari sumber. Lihatlah:

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -Werror=declaration-after-statement   -I. -I./Include    -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
In file included from ./Include/pyport.h:328:0,
                 from ./Include/Python.h:50,
                 from ./Programs/python.c:3:
/cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/math.h:29:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
 # error "This Intel <math.h> is for use with only the Intel compilers!"
   ^
make: *** [Programs/python.o] Error 1

Masalah yang sama dengan math.h!

Jadi sepertinya ini adalah masalah mendasar pada bug dengan menginstal Theano.

VV --- Ini adalah posting asli saya --- VV

Theano, memberikan kesalahan ini pada import theano:

traceback pastebin penuh di sini

[dump keseluruhan dari lazylinker_c.c]

diikuti oleh

Problem occurred during compilation with the command line below:
/gpfs/software/gcc-4.9.2/bin/g++ -shared -g -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=15360 -mtune=generic -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/numpy/core/include -I/gpfs/home/USERNAME/anaconda3/include/python3.5m -I/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof -fvisibility=hidden -o /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/lazylinker_ext.so /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/mod.cpp -L/gpfs/home/USERNAME/anaconda3/lib -lpython3.5m
In file included from /gpfs/home/USERNAME/anaconda3/include/python3.5m/pyport.h:13:0,
                 from /gpfs/home/USERNAME/anaconda3/include/python3.5m/Python.h:50,
                 from /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/mod.cpp:1:
/cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/stdint.h:79:10: warning: undefining "__STDC_LIMIT_MACROS_DEFINED_BY_CLANG"
 #  undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
          ^
/cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/stdint.h:83:10: warning: undefining "__STDC_CONSTANT_MACROS_DEFINED_BY_CLANG"
 #  undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
          ^
In file included from /gpfs/home/USERNAME/anaconda3/include/python3.5m/pyport.h:328:0,
                 from /gpfs/home/USERNAME/anaconda3/include/python3.5m/Python.h:50,
                 from /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/mod.cpp:1:
/cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/math.h:29:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
 # error "This Intel <math.h> is for use with only the Intel compilers!"
   ^

Traceback (most recent call last):
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 74, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 91, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/__init__.py", line 63, in <module>
    from theano.compile import (
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/compile/__init__.py", line 9, in <module>
    from theano.compile.function_module import *
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/compile/function_module.py", line 22, in <module>
    import theano.compile.mode
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/compile/mode.py", line 12, in <module>
    import theano.gof.vm
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof/vm.py", line 638, in <module>
    from . import lazylinker_c
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 126, in <module>
    preargs=args)
  File "/gpfs/home/USERNAME/anaconda3/lib/python3.5/site-packages/theano/gof/cmodule.py", line 2204, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): In file included from /gpfs/home/USERNAME/anaconda3/include/python3.5m/pyport.h:13:0,.                  from /gpfs/home/USERNAME/anaconda3/include/python3.5m/Python.h:50,.                  from /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/mod.cpp:1:. /cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/stdint.h:79:10: warning: undefining "__STDC_LIMIT_MACROS_DEFINED_BY_CLANG".  #  undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG.           ^. /cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/stdint.h:83:10: warning: undefining "__STDC_CONSTANT_MACROS_DEFINED_BY_CLANG".  #  undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG.           ^. In file included from /gpfs/home/USERNAME/anaconda3/include/python3.5m/pyport.h:328:0,.                  from /gpfs/home/USERNAME/anaconda3/include/python3.5m/Python.h:50,.                  from /gpfs/home/USERNAME/.theano/compiledir_Linux-2.6-el6.x86_64-x86_64-with-centos-6.6-Final-x86_64-3.5.2-64/lazylinker_ext/mod.cpp:1:. /cm/shared/apps/intel/compilers_and_libraries/2016.2.181/compiler/include/math.h:29:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!".  # error "This Intel <math.h> is for use with only the Intel compilers!".    ^.

Theano diinstal dengan conda install theano.

Saya tidak yakin apa yang salah, tapi saya curiga kurangnya python-devbermain.

Sistem Informasi:

conda 4.3.13

Python 3.5.2 | Continuum Analytics, Inc. | (default, 2 Jul 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] di linux Ketik "help", "copyright", "credit" atau "lisensi" untuk informasi lebih lanjut .

lsb_release -a:

Versi LSB:: base-4.0-amd64: base-4.0-noarch: core-4.0-amd64: core-4.0-noarch: graphics-4.0-amd64: graphics-4.0-noarch: printing-4.0-amd64: printing-4.0-
ID Distributor noarch : CentOS
Keterangan: Rilis CentOS 6.6 (Final)
Rilis: 6.6 Nama
kode: Final

uname -r: 2.6.32-504.16.2.el6.x86_64

Sunting: Daftar hal yang saya coba:

  • Tingkatkan ke 0.9: deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions (pembatasan reputasi tautan bodoh!) - kesalahan yang sama
  • Menambahkan ~ / anaconda3 ke LD_LIBRARY_PATH

Intuisi saya adalah ia tidak menemukan sesuatu yang perlu ditautkan, tetapi saya tidak dapat menentukan apa, atau bagaimana cara memperbaikinya.

Jawaban:


0

Aha! Menemukannya. Ada beberapa perpustakaan Intel yang sedang berjalan yang mendahului perpustakaan matematika GCC.

Saya mencoba menghapus semua jalur Intel dari PATHtetapi tidak berhasil. Namun setelah sedikit lebih menggali, saya menyadari bahwa ada beberapa modul kompiler Intel yang berjalan di cluster.

Kata-kata ajaib yang menang adalah module unload intel/compiler/64/16.0.2/2016.2.181

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.