Installing MSCG Package

I tried to build MSCG package but I found an error like this:


before I enabled this package everything was fine. I build LAMMPS with CMake btw.

I doubt that. The errors have nothing to do with MSCG, but stem from the (Open)MPI library. It looks like you may have forgotten to load a suitable environment module or updated to a different version or similar.

Since MSCG does not support parallel execution anyway, you may want to reconfigure LAMMPS with -DBUILD_MPI=off and avoid any MPI problems.

If I want to keep BUILD_MPI=on for LATBOLTZ package also. What should I do to fix the problem?

PS: this seems to be the cause of the problem:


as the build configuration is using OpenMPI (OMPI) and MPICH libraries, this can potentially cause conflict during the build process, but I don’t know how to choose MPI library and configuration options.

You won’t be using both packages at the same time, so two different executables will do.

CMake will use whatever you have enabled the first time you run it. If you are enabling inconsistent MPI libraries or have an inconsistent installation (headers from one MPI library and library files from the other) then this is a user or setup error on your machine and not something that can be fixed/corrected on the LAMMPS side. If you activate MPI from an environment module, you must - of course - make certain that you always have the same setting whenever you run CMake or rebuild LAMMPS. Again, this is clearly an issue on your side and not something that LAMMPS can correct for or would even have the ability to compensate.