Number of processors

Hello lammps users,

My system has 20 number of cores each containing 2 threads. So my question is for multicore processing we write the command “mpirun -np 8 lmp_mpi -in…”. So my system has 40 np or 20?



-np usually specifies the number of MPI tasks

that will be launched. Some systems would

let you do 40. Other expect 20 and you can

run with OpenMP (e.g. see the USER-OMP package

in LAMMPS) to use 2 threads/task.


Thank you steve. I again compiled my lammps after installing user-omp package and used command “mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script” to rum the simulations. But after this also I didnt notice any appreciable speed increase. Any suggestion??



Does your log file say that it ran on 16 cores with 4 threads per task?
Then the performance is what it is. You should compare
to running on 16 MPI cores (no threading). The latter
is often faster. It depends on a lot of things.


I dont see such lines in my logfile. I have attached a logfile please have a look


log.lammps (462 KB)

Well, your log file says:

No /omp style for force computation currently active

and you are using pair_style reax/c

for which there is no OMP version of it in LAMMPS.

So that is why: mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script

doesn’t give you any OMP speed-up.

Why don’t you try running directly with MPI on all the physical

cores you have. Drop the OMP.


Thank you Steve.
How can I achieve that without OMP package?? I mean which command I should use??

Thank you.


usually just don't specify that you want to use OMP.


OK thank you.