I’m using loops to heat and cool the models. But I found it was very inefficient and can not be speeded up by MPIRUN command. Whenever I try, it alwasys reports errors. I did not find any other way to hyper the loops.
So, does anyone know how to speed up loops in lammps?
This is a very general question and you could be asking for any number of different things. To get more specific help you’ll need to give more specific information – ideally a script showing what you’re trying to do and some information about the system you’re trying to run on (laptop? Desktop? Multi-node cluster?).
I’m running a simple heating process which heat the structure at a constant pace 10 K/ps, from 300 K to 700 K. So, I think I’d better to apply for a loop script. It really works, but less efficient on my laptop. When I try to speedup the lammps calculations by ‘mpirun -np 4’ command, it will return an error.
Nobody can help you without knowing the error, and I am very confident that the error has nothing to do with the looping but rather some other issue that would also happen without the looping.
Not to mention, that you cannot “parallelize over loops” since looping by its very nature is a sequential operation due to requiring the state of the simulation from the end of the previous iteration as start of the next.