CSlib error while trying to use LAMMPS in coupled client/server mode

Hello,

I am trying to run the example given in the examples/message directory, which shows how to use LAMMPS as both a client and server code to run an MD simulation. I built LAMMPS (v. 7Aug19) to be run in parallel, along with its MESSAGE package (but without ZMQ support).

I understand we also need to build CSlib to enable message exchange between the client and the server. To build that, I built the serial and parallel shared lib without ZMQ support in lammps/lib/message/cslib/src directory, by running ‘make shlib zmq=no’.

However, when I run the following lines in the shell script provided:

mpirun -np 1 lmp_mpi -v mode file -log log.message.client.file.g++.1 < in.message.client &

mpirun -np 1 lmp_mpi -v mode file -log log.message.server.file.g++.1 < in.message.server

I get the following error:

LAMMPS (7 Aug 2019)

using 1 OpenMP thread(s) per MPI task

CSlib ERROR: constructor(): CSlib invoked with MPI_Comm but built w/out MPI support

LAMMPS (7 Aug 2019)

using 1 OpenMP thread(s) per MPI task

CSlib ERROR: constructor(): CSlib invoked with MPI_Comm but built w/out MPI support

I am confused why the error says CSlib was built without MPI support. I thought CSlib was built correctly, since I find both the libcsmpi.so and libcsnpmpi.so files in the lammps/lib/message/cslib/src directory. Could you please guide me as to what is going wrong? From the CSlib documentation, I seem to have followed all the required steps. Any suggestion would be very helpful.

Thank you!

Regards,

Vrindaa

which of the two shared libraries did you copy to libmessage.so ?
what is the output of: ldd which lmp_mpi ?

axel.

Dear Axel,

Thank you for your reply ! It is actually fixed now. I realized I was making the mistake of not building the CSlib first in lammps/src with make lib-message args= “m”, and only then entering cslib/src to build the shared library. I also got help from the HPC support staff, who mentioned the command needs to be make shlib CC=mpicc zmq=no. They also helped with some compiler and system specific edits to the Makefile in lammps/src.

Thank you for your help!

Regards,

Vrindaa