NVT simulation of rigid co2 molecules in parallel

Hello,

I am simulating 8 molecules of CO2 in an NVT ensemble using fix/rigid/small.
The simulation works perfectly in the serial mode but displays the error message pasted below,
when running on the parallel mode.

***** An error occurred in MPI_Wait**
***** reported by process [1912078337,1]**
***** on communicator MPI_COMM_WORLD**
***** MPI_ERR_TRUNCATE: message truncated**
***** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,**
***** and potentially your MPI job)**

After playing around with several box sizes, spacing between the CO2 molecules,
and the number of cores used,
I found that the error always occurred at an identical point in the simulation.
I have attached the input script and the log-file.
The log file does not contain any warnings / errors pertaining to this problem.

However, using fix/rigid seems to solve the problem.
From the manual, I understand that it is beneficial to use fix/rigid/small
in case of many rigid molecules in the system.

Hence, is there a way to run the simulation in parallel using fix/rigid/small ?

Cheers,
Thejas

simProg.log (12.1 KB)
simulation.in (3.5 KB)

This is a known phenomenon ([BUG] Fatal error in PMPI_Wait error running PACKAGES/drude/swm4-ndp/in.swm4-ndp.nh example with mpirun · Issue #3313 · lammps/lammps · GitHub).
We have not been able to fully understand what is causing this. This seems similar to the “missing bond atom” type of error, but in reference to the individual rigid bodies.

As you have noticed, the non-/small version does not suffer from it. Indeed it would be impossible due to the way how those styles use collective communications instead of distributed inter-domain communication. If your system is small enough and the number of MPI ranks small, then there is no significant performance penalty from using the non-small version. Its overhead will grow with system size (i.e. number of rigid bodies) and number of processors.

For a system with only 8 molecules there is no difference. Even regular MPI parallelization is not likely to give you much of a speedup. In fact, it may slow you down due to the constant overhead from exchanging box and subdomain information.

Thanks for the reply, Axel.

As you have noticed, the non-/small version does not suffer from it. Indeed it would be impossible due to the way how those styles use collective communications instead of distributed inter-domain communication. If your system is small enough and the number of MPI ranks small, then there is no significant performance penalty from using the non-small version. Its overhead will grow with system size (i.e. number of rigid bodies) and number of processors.

For a system with only 8 molecules there is no difference. Even regular MPI parallelization is not likely to give you much of a speedup. In fact, it may slow you down due to the constant overhead from exchanging box and subdomain information.

As you mentioned, for small system sizes I am better off using the non-small version. However, I plan to increase my system size to several thousand CO2 molecules. Even in this case, I would still have to opt for the non-small version because it works.