Dear LAMMPS community,
I am encountering an issue where LAMMPS runs successfully in single-threaded mode (without MPI), but when executed with MPI, it gets stuck immediately after displaying the version information:
LAMMPS (4 Feb 2025)
No further output is produced, and the simulation does not start. The process does not crash but remains idle indefinitely. However, when running without MPI, the simulation executes correctly but much slower.
Execution Commands I Used:
MPI execution (not working, gets stuck):
mpiexec -np 8 lmp -in input_script.lmp
Single-threaded execution (working but slow):
lmp -in input_script.lmp
Troubleshooting Steps Taken:
- Verified MPI installation:
mpiexec --version confirms MS-MPI is installed correctly.
mpiexec -np 2 hostname prints correct output, proving MPI is functioning.
- Checked LAMMPS binary:
Running lmp -h correctly displays the help menu.
Running “lmp.exe” alone also gets stuck at the version banner when executed with MPI.
- Validated input script:
Confirmed that input_script.lmp is correctly formatted and not an incorrect .txt file.
- Attempted different execution approaches:
Running MPI with local-only option:
mpiexec -localonly -np 8 lmp -in input_script.lmp
“Unknown option: -localonly” output is received
- Checked log and output files:
log.lammps remains empty, suggesting LAMMPS never starts execution.
Redirecting output (mpiexec -np 8 lmp.exe -in input_script.lmp > output.log 2>&1) does not provide additional details.
Observations:
LAMMPS successfully runs without MPI, but is significantly slower.
When run with MPI, it starts, prints the version information, and then hangs indefinitely.
No CPU or memory usage is observed in Task Manager, suggesting MPI processes are not executing the simulation.
Questions:
-
Why does LAMMPS get stuck when executed with MPI but works fine without it?
-
Are there additional debugging steps I should take to identify the issue?
Any insights or suggestions would be greatly appreciated!
Best Regards