[lammps-users] Export command in LAMMPS

Dear LAMMPS users,
I have built LAMMPS with openmpi & fftw. Every time I start my session I have to put this command within src directory of LAMMPS :

export LD_LIBRARY_PATH=/home/ram/openmpi/prefix/lib

otherwise I can not run mpirun like:

$mpirun -np 4 lmp_openmpi<in.file (it makes error and can be solved by running above command)

Please can you guide me how to store export command permanently…
Sincerely yours,
Ram
|

This appears to be an OpenMPI issue. I would guess you have
built (linked) your executable with the OpenMPI lib used as a dynamic
lib, and thus when you launch LAMMPS, the system needs to be able to
find the OpenMPI library. The LD_LIB setting enables it to do that.

So you can either

put the export command in your shell start-up script, e.g. .cshrc file
or build LAMMPS so it links in the lib statically, rather than dynamically

For the latter, it only needs to be able to fine the library at build time,
not run time.

Steve