Issues when switching from Hoomd ver 2 to 4.2 #2030
Replies: 2 comments 4 replies
-
Are you possibly running the v2 script on the GPU and the v4 on the CPU? Also, 4.2 is 18 months old at this point. You should upgrade to 5.1.1. In any case, you certainly did not provide enough context. There are no known performance bugs with the NPT integration methods in general. You didn't mention what forces you apply to particles -- in most simulations, the neighbor list and pair force take most of the time. If you can provide a full (and minimal!) example script that demonstrates what you think is slow performance on 5.1.1, I can run it with a profiler and see what I find, or perhaps the reason will be obvious when I see the full script. It is also possible that as you remove parts of your full script to create a minimal example, you discover the part that slows the simulation yourself. |
Beta Was this translation helpful? Give feedback.
-
Just as a quick update as I was chatting with @ShubhamsPhD over slack about this. I suspect performance differences are likely arising from Hoomd 2.9 being compiled with single-precision enabled, and Hoomd 4 using a mix of single and double (per the defaults). The simulations are being ran on an A40, which I think is especially bad with double precision compared to single. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I am currently updating my hoomd 2.9.7 code to 4.2. The script runs but it takes about almost 10 times the time longer to do identical tasks my ver 2 code did. I would love to hear some insights as to what or why this might be happening. A small snippet of the NPT step from both my codes are below:
The version 2.9.7 one (takes about 8 mins to run):
steps = 1e6
npt_int = hoomd.md.integrate.npt(group=all, kT=305/units['T'], tau=1000/units['t'],
P=1.0/units['P'], tauP=10000/units['t'], couple='xyz')
hoomd.run_upto(current+steps, limit_multiple=1e3)
npt_int.disable()
current = current + steps
The version 4.2.1 one (takes 81 mins to run):
npt = hoomd.md.methods.ConstantPressure(
filter=all_filter,
thermostat=hoomd.md.methods.thermostats.MTTK(kT=305/units['T'], tau=1000/units['t']),
S=1.0/units['P'],
tauS=10000/units['t'],
couple='xyz')
integrator.methods.append(npt)
sim.run(1000000)
integrator.methods.remove(npt)
hoomd.write.GSD.write(state=sim.state, mode='xb', filename='endNPTshort.gsd')
I would be glad to provide more context if required. And any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions