使用conda安装openmpi编译nwchem

1 遇到如下错误:找不到libpthread.so.0

configure:20418: checking whether FLIBS needs -lgcc_s
configure:20443: cc -o conftest -m64 -Wall -O3 -funroll-loops -ffast-math  -fopenmp -g  -I.  -I/home/apps/jinrf/nwchem-conda/nwchem/src/include -I/home/apps/jinrf/nwchem-conda/nwchem/src/tools/install/include -DGFORTRAN -DCHKUNDFLW -DGCC4 -DGCC46 -DEXT_INT -DLINUX -DLINUX64 -DUSE_OPENMP -DPARALLEL_DIAG -DTCE_CUDA -DOPENBLAS  -fopenmp -L/home/apps/jinrf/nwchem-conda/nwchem/lib/LINUX64 -L/home/apps/jinrf/nwchem-conda/nwchem/src/tools/install/lib  conftest.c -lm   -L/home/apps/jinrf/nwchem-conda/nwchem/lib/LINUX64 -L/home/apps/jinrf/nwchem-conda/nwchem/src/tools/install/lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0 -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../lib/gcc -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/lib/../lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../x86_64-conda-linux-gnu/sysroot/lib/../lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../x86_64-conda-linux-gnu/sysroot/usr/lib/../lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../x86_64-conda-linux-gnu/sysroot/lib -L/home/apps/jinrf/tools/anaconda3/envs/ompi/bin/../x86_64-conda-linux-gnu/sysroot/usr/lib -lgfortran -lm -lgomp -lquadmath -lpthread >&5
/usr/bin/ld: cannot find /lib64/libpthread.so.0
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
configure:20443: $? =

使用find命令在anaconda中查找.当前用的conda环境是ompi

apps@dgx-a100:~/jinrf/tools$ find ./ -name "*libpthread*"
./anaconda3/envs/gcc9/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread_nonshared.a
./anaconda3/envs/gcc9/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.so
./anaconda3/envs/gcc9/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.a
./anaconda3/envs/gcc9/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread.so.0
./anaconda3/envs/gcc9/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread-2.12.2.so
./anaconda3/envs/ompi/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread_nonshared.a
./anaconda3/envs/ompi/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread.so
./anaconda3/envs/ompi/x86_64-conda-linux-gnu/sysroot/lib64/libpthread.so.0
./anaconda3/envs/ompi/x86_64-conda-linux-gnu/sysroot/lib64/libpthread-2.12.so
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-habb00fd_1/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread_nonshared.a
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-habb00fd_1/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.so
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-habb00fd_1/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.a
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-habb00fd_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread.so.0
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-habb00fd_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread-2.12.2.so
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-hd420e75_5/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread_nonshared.a
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-hd420e75_5/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.so
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-hd420e75_5/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/libpthread.a
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-hd420e75_5/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread.so.0
./anaconda3/pkgs/gcc_impl_linux-64-7.3.0-hd420e75_5/x86_64-conda_cos6-linux-gnu/sysroot/lib/libpthread-2.12.2.so
./anaconda3/pkgs/sysroot_linux-64-2.12-h77966d4_13/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread_nonshared.a
./anaconda3/pkgs/sysroot_linux-64-2.12-h77966d4_13/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread.so
./anaconda3/pkgs/sysroot_linux-64-2.12-h77966d4_13/x86_64-conda-linux-gnu/sysroot/lib64/libpthread.so.0
./anaconda3/pkgs/sysroot_linux-64-2.12-h77966d4_13/x86_64-conda-linux-gnu/sysroot/lib64/libpthread-2.12.so

可以看到其中的一行为

/anaconda3/envs/ompi/x86_64-conda-linux-gnu/sysroot/lib64/libpthread.so.0

这表明,在ompi环境中是有libthread.so.0的,只不过是在sysroot/lib64/目录下,而从出错信息中可以看到,编译器的哭文件搜索路径只有sysroot/lib

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值