Loading shared library in open-mpi/ mpi-run

2019-05-01 17:43发布

I'm trying to run my program using torque scheduler using mpi run. Though in my pbs file I load all the library by

export LD_LIBRARY_PATH=/path/to/library

yet it gives error i.e.

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

I guess error lies in variable LD_LIBRARY_PATH not set in all the nodes. How would I make it work?

标签: mpi pbs torque
2条回答
不美不萌又怎样
2楼-- · 2019-05-01 18:04

LD_LIBRARY_PATH is not exported automatically to MPI processes, spawned by mpirun. You should use

mpirun -x LD_LIBRARY_PATH ...

to push the value of LD_LIBRARY_PATH. Also make sure that the specified path exists on all nodes in the cluster and that libarmadillo.so.3 is available everywhere.

查看更多
孤傲高冷的网名
3楼-- · 2019-05-01 18:11

On some systems, your environment isn't always propagated via mpirun. You should set all those variables in your .bashrc file.

查看更多
登录 后发表回答