我正在尝试编译包装和库的python包https://github.com/jrs65/scalapy 。编译成功但是当我尝试执行测试程序时,我得到:mkl
scalapack
blacs
英特尔 MKL 致命错误:无法加载符号 MKLMPI_Get_wrappers
我试图用来mkl_link_tool
获取链接线。这就是幕后发生的事情distutils
:
gcc -pthread -shared -L/scratch/apc/lukrazi/intel/intelpython3/lib -Wl,-rpath=/scratch/apc/lukrazi/intel/intelpython3/lib,--no-as-needed -z noexecstack -z relro -z now -fstack-protector build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/scalapy/lowlevel/redistmodule.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/scalapy/lowlevel/fortranobject.o -L/scratch/apc/lukrazi/intel/intelpython3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/scalapy/lowlevel/redist.cpython-36m-x86_64-linux-gnu.so -I/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/include -L/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib/release_mt -L/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib/release_mt -Xlinker -rpath -Xlinker /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/2107.0.0/intel64/lib/release_mt -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/2017.0.0/intel64/lib -lmpifort -lmpi -lmpigi -ldl -lrt -lpthread -L/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl -fopenmp
我还尝试使用-Wl,-Bstatic -Wl,--start-group
and进行静态链接-Wl,--end-group -Wl,-Bdynamic
:
gcc -pthread -shared -L/scratch/apc/lukrazi/intel/intelpython3/lib -Wl,-rpath=/scratch/apc/lukrazi/intel/intelpython3/lib,--no-as-needed -z noexecstack -z relro -z now -fstack-protector build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/scalapy/lowlevel/redistmodule.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/scalapy/lowlevel/fortranobject.o -L/scratch/apc/lukrazi/intel/intelpython3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/scalapy/lowlevel/redist.cpython-36m-x86_64-linux-gnu.so -I/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/include -L/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib/release_mt -L/scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib/release_mt -Xlinker -rpath -Xlinker /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mpi/intel64/lib -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/2107.0.0/intel64/lib/release_mt -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/2017.0.0/intel64/lib -lmpifort -lmpi -lmpigi -ldl -lrt -lpthread -Wl,-Bstatic -Wl,--start-group /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64/libmkl_scalapack_lp64.a /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64/libmkl_intel_lp64.a /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64/libmkl_intel_thread.a /scratch/apc/lukrazi/intel/compilers_and_libraries_2018.1.148/linux/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -Wl,-Bdynamic -liomp5 -lpthread -lm -ldl -fopenmp
没有成功。可能是什么问题呢?