Intel Centos 6.6 集群失败

Intel Centos 6.6 集群失败

我在大学集群上,没有 su。我试图让 Keras 工作,使用 tensorflow 或 theano。Tensorflow 失败,因为系统只有 CUDA 7.5。它有一个英特尔芯片组,但它给我带来了 math.h 问题。

编辑:经过一番尝试,我决定从源代码编译 Python 3.5。结果如下:

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

与 math.h 有同样的问题!

因此,这似乎是安装 Theano 时出现的错误的根本问题。

VV ---这是我的原始帖子 --- VV

Theano,出现此错误import theano

完整的 pastebin 回溯在这里

[转储 lazylinker_c.c 的全部内容]

其次是

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 已安装conda install theano

我不太清楚什么是失误,但我怀疑python-dev可能是缺乏失误造成的。

系统信息:

conda 4.3.13

Python 3.5.2 |Continuum Analytics, Inc.|(默认,2016 年 7 月 2 日,17:53:06)[GCC 4.4.7 20120313(Red Hat 4.4.7-1)] 在 Linux 上输入“help”、“copyright”、“credits”或“license”获取更多信息。

lsb_release -a

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-noarch
分销商 ID:CentOS
描述:CentOS 版本 6.6 (最终版)
发行版:6.6
代号:最终版

uname -r:2.6.32-504.16.2.el6.x86_64

编辑:我尝试过的事情列表:

  • 升级到 0.9:deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions(愚蠢的链接信誉限制!)- 同样的错误
  • 添加了 ~/anaconda3 到LD_LIBRARY_PATH

我的直觉是它没有找到需要链接的东西,但我无法确定是什么,或者如何解决它。

答案1

啊哈!搞明白了。有些正在运行的 Intel 库抢占了 GCC 的数学库。

我尝试删除所有 Intel 路径,PATH但无济于事。不过,经过进一步挖掘,我发现集群上运行着一些 Intel 编译器模块。

获胜的咒语是module unload intel/compiler/64/16.0.2/2016.2.181

相关内容