Quite different performace of HOOMD on simulations with L-J potential

167 views
Skip to first unread message

Hao Dong

unread,
Mar 31, 2016, 6:16:58 AM3/31/16
to hoomd-users
Hello all,

I tested the simulations with two set of parameters by using the L-J potential. They are "epsilon=1.0, sigma=1.0" in job-1, and "epsilon=2.0, sigma=1.0" in job-2. All of the rest parameters are the same in the two jobs. They were run separately on the same machine with 2 GeForce GTX Titan X GPUs, and the CPU is Intel xeon E5-2630 v3 2.4GHz (2-cores). And the version I used is HOOMD-blue 1.3.3.

Here is the command I used to submit job: mpirun -np 2 hoomd job.py --mode=gpu >& job.log &

However, the performance of the two jobs are quite different: The calculation speed for job-1 is pretty stable, with a "TPS" around 2800. But for job-2, the performance drops significantly from "TPS 2800" to "TPS 180" after 20e5 steps run.

So I checked the trajectory of the two simulations, and found that most of the particles in job-2 aggregate into a large cluster (as expected), while in job-1 they are randomly distributed (I know that this description is inaccurate). Probably my setup for the neighbor list has some problems. So I checked the "nlist" reference, and tested different parameters including r_buff, check_period, etc. But none of them shows a TPS more than 200.

Could anybody tell me what is wrong with my input? Or how to setup simulations that particles may aggregate into cluster(s)?

For your reference, I paste part of the output from job-2, as well as my input file for job-2 at the end of this post.

Any suggestions is highly appreciated!!

Hao


Time 00:00:10 | Step 23014 / 100000000 | TPS 2301.33 | ETA 12:04:03
Time 00:00:20 | Step 47030 / 100000000 | TPS 2401.53 | ETA 11:33:40
Time 00:00:30 | Step 67247 / 100000000 | TPS 2021.65 | ETA 13:43:51
Time 00:00:40 | Step 85456 / 100000000 | TPS 1820.82 | ETA 15:14:33
Time 00:00:50 | Step 101840 / 100000000 | TPS 1638.38 | ETA 16:56:13
Time 00:01:00 | Step 115992 / 100000000 | TPS 1415.17 | ETA 19:36:20
Time 00:01:10 | Step 130252 / 100000000 | TPS 1426 | ETA 19:27:14
Time 00:01:20 | Step 142509 / 100000000 | TPS 1225.69 | ETA 22:37:50
Time 00:01:30 | Step 154471 / 100000000 | TPS 1196.11 | ETA 23:11:15
Time 00:01:40 | Step 165457 / 100000000 | TPS 1098.5 | ETA 25:14:42
Time 00:01:50 | Step 175266 / 100000000 | TPS 980.859 | ETA 28:16:12
Time 00:02:00 | Step 182824 / 100000000 | TPS 755.791 | ETA 36:41:09
Time 00:02:10 | Step 189617 / 100000000 | TPS 679.278 | ETA 40:48:55
Time 00:02:20 | Step 196556 / 100000000 | TPS 693.89 | ETA 39:57:11
Time 00:02:30 | Step 203526 / 100000000 | TPS 696.917 | ETA 39:46:36
Time 00:02:40 | Step 210340 / 100000000 | TPS 681.326 | ETA 40:41:03
Time 00:02:50 | Step 217014 / 100000000 | TPS 667.378 | ETA 41:31:55
Time 00:03:00 | Step 223597 / 100000000 | TPS 658.126 | ETA 42:06:46
Time 00:03:10 | Step 230066 / 100000000 | TPS 646.818 | ETA 42:50:47
Time 00:03:20 | Step 236437 / 100000000 | TPS 637.1 | ETA 43:29:50
Time 00:03:30 | Step 242692 / 100000000 | TPS 625.306 | ETA 44:18:53
Time 00:03:40 | Step 248773 / 100000000 | TPS 608.095 | ETA 45:33:58
Time 00:03:50 | Step 254796 / 100000000 | TPS 602.135 | ETA 46:00:52
Time 00:04:00 | Step 260810 / 100000000 | TPS 601.314 | ETA 46:04:28
Time 00:04:10 | Step 266833 / 100000000 | TPS 602.09 | ETA 46:00:44
Time 00:04:20 | Step 272955 / 100000000 | TPS 612.124 | ETA 45:15:19
Time 00:04:30 | Step 279118 / 100000000 | TPS 616.098 | ETA 44:57:38
Time 00:04:40 | Step 285252 / 100000000 | TPS 613.256 | ETA 45:09:59
Time 00:04:50 | Step 291388 / 100000000 | TPS 613.589 | ETA 45:08:20
Time 00:05:00 | Step 297385 / 100000000 | TPS 599.555 | ETA 46:11:34
Time 00:05:10 | Step 303314 / 100000000 | TPS 592.87 | ETA 46:42:39
Time 00:05:20 | Step 309193 / 100000000 | TPS 587.8 | ETA 47:06:39



## my input for job-1

from hoomd_script import *
context.initialize()
# create 5000 random particles of name A
init.create_random(N=5000, phi_p=0.01, name='A')
## specify Lennard-Jones interactions between particle pairs
# specify the pair interaction via a given potential energy and force
def ljg(r, rmin, rmax, epsilon, sigma):
    V = 4 * epsilon * ( (sigma / r)**12 - (sigma / r)**6);
    F = 4 * epsilon / r * ( 12 * (sigma / r)**12 - 6 * (sigma / r)**6);
    return (V, F)
table = pair.table(width=1000);
table.pair_coeff.set('A', 'A', func=ljg, rmin=0.001, rmax=12.0, coeff=dict(epsilon=2.0, sigma=1.0))
# integrate at constant temperature
all = group.all();
integrate.mode_standard(dt=0.005)
integrate.nvt(group=all, T=1.2, tau=0.5)
# dump an xmle file for the structure information
xml = dump.xml(filename='dump_dcd.xml', vis=True)
# dump a .dcd file for the trajectory
dump.dcd(filename='dump_dcd.dcd', period=10000)
#dcd = dump.dcd(filename"data/dump.dcd", period=50)
# run 10,000 time steps
run(10e7)

Joshua Anderson

unread,
Mar 31, 2016, 6:23:15 AM3/31/16
to hoomd...@googlegroups.com
1) Try pair.lj instead of pair.table. It will be faster.
2) Performance will decrease with increasing density of the aggregate, there are more pair forces to evaluate.
3) Run on a single GPU, not two. 5000 particles is barely enough to saturate a single GPU.

------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
Phone: 734-647-8244
http://www-personal.umich.edu/~joaander/

--
You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
To post to this group, send email to hoomd...@googlegroups.com.
Visit this group at https://groups.google.com/group/hoomd-users.
For more options, visit https://groups.google.com/d/optout.

Michael Howard

unread,
Mar 31, 2016, 9:52:16 AM3/31/16
to hoomd-users
I agree 100% with Josh. To follow-up with a comment or two on the physics that you have -- in your system 1, you probably would not expect to get any aggregation (ever) because you have such a low density that it is outside the LJ binodal. You set the packing fraction to 0.01 when you initialize the system, so the density is about 0.02. The critical point of the LJ fluid is about Tc ~ 1.3 and rhoc ~ 0.3, so at T = 1.2 ~ 0.9Tc, you might guess that your density is so low that you are just in the gas phase. In system 2, where you double epsilon, you are effectively halving the temperature so that Teff ~ 0.6. The vapor density for the LJ fluid at this temperature is very low (almost zero), so you expect aggregation. The coexistence density at T ~ 0.6 is about 0.8, so the number of neighbors is 40x higher in the liquid phase of system 2 than the gas of system 1... and you must expect a corresponding slow down.

Regards... Mike
Reply all
Reply to author
Forward
0 new messages