MPICH2 only run one MPI

Hello to all,

I built lammps MPI (last version 15Apr2020),and MPICH2 (mpich2-1.4.1p1-win-x86-64.msi) in windows 7.

Excusing the command “mpiexec -localonly -np 26 lmp_mpi –in input.in”, but I found the message shown it only use one MPI, the same message repeat 26 times, and the compute speed was very slow.

Is it normal?

---------------- Step 838 ----- CPU = 38.1375 (sec) ----------------

TotEng = 57322.3734 KinEng = 26218.8598 Temp = 1.9865

PotEng = 31103.5135 E_bond = 8748.3296 E_angle = 2328.6804

E_dihed = 29230.9879 E_impro = 0.0000 E_vdwl = -9204.4843

E_coul = 0.0000 E_long = 0.0000 Press = 0.0157

Loop time of 38.1376 on 1 procs for 838 steps with 8800 atoms

100.0% CPU use with 1 MPI tasks x 1 OpenMP threads

Kind Regards,

Jack Lin

What is the output of?
lmp_mpi - h

Dear dr. Axel,
I had this problem initially some time ago, and i had resolved it, which i do not remember for now. Could you please guide me what will be the reasons for such problems?
The problem was that invoking mpirun -np 4 lmp_mpi -in in.file command, i would get 4 separate simulations on a single processor, lammps printing the same messages 4 times on the screen. I want to know where the problem lies in such circumstances. I was waiting for this person jack lin to reply for his problem. but he did not, so i am writing here.

there are two possible reasons:

  • you have a LAMMPS binary that was compiled without MPI support
  • you are using the mpirun command form a different MPI library.

on windows there are currently two different and incompatible versions of MPICH available and on Linux the MPICH, OpenMPI and IntelMPI are most commonly used.

with a recent LAMMPS binary on Linux, you should get info about compiler and MPI library when running LAMMPS with the “-h” or “-help” flag.
you would get (among other information) something like:

OS: Linux 5.6.18-200.fc31.x86_64 on x86_64

Compiler: Clang C++ Clang 9.0.1 (Fedora 9.0.1-2.fc31) with OpenMP 3.1
C++ standard: C++11
MPI v3.1: Open MPI v4.0.2, package: Open MPI [email protected]…9259… Distribution, ident: 4.0.2, repo re
v: v4.0.2, Oct 07, 2019

or:

OS: Linux 5.6.18-200.fc31.x86_64 on x86_64

Compiler: GNU C++ 9.3.1 20200408 (Red Hat 9.3.1-2) with OpenMP 4.5
C++ standard: C++11
MPI v3.1: MPICH Version: 3.3.2
MPICH Release date: Tue Nov 12 21:23:16 CST 2019
MPICH ABI: 13:8:1

This is on a machine where you can switch between MPI libraries using environment modules with the “module” command.

HTH,
Axel.

P.S: the response from jack was off-list: it was on windows with a mismatch of MPI libraries.

I trying to modify the command to “C:\Program Files\MPICH2\bin\mpiexec.exe” -n 4 -localonly lmp_mpi –in input.in to assign correct MPI package, and solved it.

In my OS, I also install other MPI package, maybe it would be the root cause.

Best,

Jack

Thank you dr axel for the information.