0

运行需要共享库的脚本时,我在加载共享库时遇到问题:

error while loading shared libraries: libirc.so: cannot open shared object file: No such file or directory

但是,我认为我的设置还可以:

set LD_LIBRARY_PATH = /lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64
export LD_LIBRARY_PATH

ls /lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64表明它libirc.so确实存在。

echo $LD_LIBRARY_PATH正确返回:

/lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64

它仍然不起作用,所以我有点绝望...... :)

有人可以帮我吗?

一些有用的信息:

echo ${SHELL}
/bin/bash

此外,我运行的脚本在开头包含以下内容:

#!/bin/csh
#PBS -z
#PBS -S /bin/csh

set PATH = /usr/local/x86_64/gnu/openmpi-1.4.5/bin
export PATH

谢谢 !

4

2 回答 2

0

听起来您是在集群上运行它,在这种情况下,问题与您的外壳无关。尝试:

#PBS -v LD_LIBRARY_PATH="/lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64"

可能还值得注意的是

set LD_LIBRARY_PATH = /lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64

是 csh 语法,而你说你正在运行 bash。bash 等价物是

LD_LIBRARY_PATH=/lfs/data0/g_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64

它对间距敏感。

于 2013-02-07T00:49:15.197 回答
0

谢谢 nneonneo,这是它给出的内容:(我只是粘贴消息的开头,因为它很长,如果需要完整输出,请告诉我):

LD_DEBUG=all ./mpp_starter
 26489: 
 26489: file=librt.so.1 [0];  needed by ./mpp_starter [0]
 26489: find library=librt.so.1 [0]; searching
 26489:  search path=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/tls/x86_64:/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/tls:/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/x86_64:/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64      (LD_LIBRARY_PATH)
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/tls/x86_64/librt.so.1
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/tls/librt.so.1
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/x86_64/librt.so.1
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/librt.so.1
 26489:  search cache=/etc/ld.so.cache
 26489:   trying file=/lib64/librt.so.1
 26489: 
 26489: file=librt.so.1 [0];  generating link map
 26489:   dynamic: 0x0000003a74a06dc8  base: 0x0000000000000000   size: 0x0000000000207bb0
 26489:     entry: 0x0000003a74802140  phdr: 0x0000003a74800040  phnum:                  9
 26489: 
 26489: 
 26489: file=libnuma.so.1 [0];  needed by ./mpp_starter [0]
 26489: find library=libnuma.so.1 [0]; searching
 26489:  search path=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64       (LD_LIBRARY_PATH)
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/libnuma.so.1
 26489:  search cache=/etc/ld.so.cache
 26489:   trying file=/usr/lib64/libnuma.so.1
 26489: 
 26489: file=libnuma.so.1 [0];  generating link map
 26489:   dynamic: 0x0000003a77207450  base: 0x0000000000000000   size: 0x0000000000207d60
 26489:     entry: 0x0000003a770026d0  phdr: 0x0000003a77000040  phnum:                  7
 26489: 
 26489: 
 26489: file=libdl.so.2 [0];  needed by ./mpp_starter [0]
 26489: find library=libdl.so.2 [0]; searching
 26489:  search path=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64       (LD_LIBRARY_PATH)
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/libdl.so.2
 26489:  search cache=/etc/ld.so.cache
 26489:   trying file=/lib64/libdl.so.2
 26489: 
 26489: file=libdl.so.2 [0];  generating link map
 26489:   dynamic: 0x0000003a73a02da0  base: 0x0000000000000000   size: 0x0000000000203100
 26489:     entry: 0x0000003a73800de0  phdr: 0x0000003a73800040  phnum:                  9
 26489: 
 26489: 
 26489: file=libirc.so [0];  needed by ./mpp_starter [0]
 26489: find library=libirc.so [0]; searching
 26489:  search path=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64       (LD_LIBRARY_PATH)
 26489:   trying file=/lfs/data0/gstar_local/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/libirc.so
 26489: 
 26489: file=libirc.so [0];  generating link map
 26489:   dynamic: 0x00007f6635da51b0  base: 0x00007f6635c66000   size: 0x0000000000142bc0
 26489:     entry: 0x00007f6635c6d040  phdr: 0x00007f6635c66040  phnum:                  5
 26489: 
 26489: 
于 2013-02-07T06:04:39.073 回答