[lammps-users] Fwd: Problem to build with Cmake using CLI

Dear Irslan Ulalh Ashraf,

Please reply to the mailing-list when asking for more help, not to me personally. Concerning your question it appears that a ‘liblammps.a’ library and ‘lmp’ executable are in your directory. Congrats! If you can execute it in the build directory you’re nearly there (typing ‘./lmp -h’ in the directory should throw lots of LAMMPS commands at you).

Now, you still need to install it and everything you need to know concerning the installation process is in the page I already provided you. It is (usually) the easier step. Please read it carefully. If using the CLI is not your thing maybe getting in touch with more skilled CLI users in your department, or finding dedicated tutorials might be a better way of learning about it.

Best regards,


Dear Dr. Germain Clavier
copy to all Lammps users

hope you are well. I am trying to rebuild and recompile the LAMMPS to sort my run error.
can you please suggest me how to install FFMPEG_Executable, As it is shown when i try to run cmake . command.
cmake .
– Running check for auto-generated files from make-based build system
– Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE)

please accept my best regards
Irslan Ullah Ashraf

Which “run error”?

If it is not related to using dump movie, then you don’t need to worry about installing FFmpeg.

Dear Dr. Axel Kohlmeyer
Thanks for clarifying I have solved it.
please accept my best regards
Irslan Ullah Ashraf

Solved what?

Dear Dr. Axel Kohlmeyer
since I was sorting the run problem I thinking the problem may be related to installing FFmpeg, but you was right I didn’t need FFmpeg to run LAMMPS. After deleting the build directory and reinstallation solved the problem.
however rightnow I am facing another problem, hope if you would help me in this regard. please check the input command to run an example dipole calculation and respective output.
mpirun -np 2 lmp -var f tmp.out -log my.log -screen none -in in.dipole

This is a problem with the OpenMPI setup on the machine you are using and not with LAMMPS and will affect any parallel MPI application. You need to consult with your local sysadmins about this. Either you are running in parallel on a machine where you are not supposed to be running or you have adjusted or modified configuration settings for OpenMPI incorrectly or have an incorrect OpenMPI installation.

Dear Dr. Axel Kolmeyer
I am not using parallel processing , I am using LAMMPS on my laptop. Since I am using it first time , did I need to perform OpenMPI installation for my laptop?
moreover can you please explain the given run commands meaning (e.g, {mpirun -np 2 means the calculation should run on 2 cores})

mpirun -np 2 lmp -var f tmp.out -log my.log -screen none -in in.dipole


best regards
Irslan Ullah Ashraf

Dear Irslan Ullah Ashraf,

LAMMPS and OpenMPI are two separate programs. The former uses the latter to run using several processors and improve computation time (if set up correctly and suited for the problem). This is not mandatory, and if you do not want to use several processors for any reason, you do not need to tell cmake to check for OpenMPI while compiling LAMMPS and you can remove it from the cmake preset file before compiling (I can refer you to our previous mail exchange). However, as Axel was mentioning, there appears to be OpenMPI issues on your computer and this can be troublesome for you in general, but, if so, LAMMPS mailing list is not the place to deal with it. You should definitely find someone competent to check your OpenMPI installation or go through the related documentation.

It is hard for me to understand what you want to achieve here. When you say:

I am not using parallel processing […] mpirun -np 2 means the calculation should run on 2 cores

I see a contradiction. You say you do not want to make parallel computation, yet you understand that you try to run on several threads. If you still want to use mpirun command, you have to solve the previously mentioned issues with OpenMPI. If you do not want to run in parallel, simply remove mpirun -np 2 part of the command. If you wonder what the other options mean, I advise you to read the dedicated page from which the command was apparently partially copy-pasted:

A detailed explanation of every option is given just below, and you might end-up using options that correspond better to what you want to achieve.