I have a question regarding the difference between different lammps executables…
If I launch a sequential lammps simulation, would there be any major difference between the 3 following methods ?
mpirun -np 1 lmp_mpi -in in.file
lmp_mpi -in in.file
lmp_serial -in in.file
And would lmp_mpi and lmp_serial be exactly the same (except name) if they are built with the same packages and options ?
I recently built lmp_mpi and lmp_serial with the same options and they seem to behave exactly the same. Would there be any boost on single-core serial simulation if I build lmp_serial without parallel libraries like MPI or OpenMP ?
I recently start studying small systems which don’t require running in parallel… And I wish to know if there exist any possibility for single-thread acceleration.
Thank you so much in advance for any information that you provide.
They should produce the same output. The major difference is that an executable linked to an MPI library does run some additional initialization. This will make little difference unless the runs are extremely short.
The styles in the INTEL, OPT, and OPENMP packages (suffix intel, opt, or omp) have additional (serial) code optimizations that will make them execute faster even if compiled without threading enabled.
They also have special code paths for the case of 1 thread to reduce overhead in case OpenMP is enabled in the executable but not used at runtime.
Thank you so much for the information !
Since my workstation has AMD CPUs, suffix intel should not work for me… But I will definitely test OPT and OPENMP in my serial simulations !
That is not correct. If your CPU has suitable vector instructions (SSE4, AVX, AVX2) it will work. Also, you do not need the Intel compilers, but they will create better vectorized binaries. And then, again, if you specify the correct architecture that matches the instructions available on your CPU, it will work well.