GROMACS version: 2020/2021
I have an algorithm which is based on spawning many short simulations. These simulations are very short 30ps or so and last only a few minutes. Is there some way to make the start-up more efficient for these short runs? gmx is designed for single long simulations so maybe there are some optimizations done by mdrun that I don’t need or that I should change.
Thank you very much for your help!
Can you run them in parallel? A bunch of slightly longer simulations would probably increase your throughput overall if startup costs are really dragging.
However, have you actually measured a performance problem? It might not be as bad as you think, depending on the system I find Gromacs gets up to speed pretty well within a few thousand steps, which is only a fraction of even your simulation length. I’d be interested to see what kind of slowdown you’re getting, and what simulation length you need to actually max out performance - I work on Gromacs benchmarking tools, and in my experience the cutoffs for the part of the simulation to measure steady-state performance aren’t always clear.
Another option may be to check out the gmxapi, which would let you spawn your simulations in sequence without exiting the program - I don’t know if that would reduce your overhead or not.
Actually, I am running them in parallel and with gmxapi. I should have given more details in this. Normally there are many simulations running in parallel with few threads each (sometimes with a gpu to go along).
For the moment, the only optimization I have tried is to do -tunepme only on a trial run and use the parameters obtained for the production and add -notunepme. This has led to a 14% speed-up which is not nothing but not too incredible.