Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
31ed3f71
Commit
31ed3f71
authored
6 years ago
by
Steven J. Plimpton
Browse files
Options
Downloads
Patches
Plain Diff
more changes to insure each triplet IJK computed exactly once
parent
c01fb5f7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/atm/log.27Aug18.g++.1
+16
-16
16 additions, 16 deletions
examples/atm/log.27Aug18.g++.1
examples/atm/log.27Aug18.g++.4
+16
-16
16 additions, 16 deletions
examples/atm/log.27Aug18.g++.4
src/MANYBODY/pair_atm.cpp
+21
-33
21 additions, 33 deletions
src/MANYBODY/pair_atm.cpp
with
53 additions
and
65 deletions
examples/atm/log.2
3
Aug18.
atm.
g++.1
→
examples/atm/log.2
7
Aug18.g++.1
+
16
−
16
View file @
31ed3f71
...
@@ -26,7 +26,7 @@ Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
...
@@ -26,7 +26,7 @@ Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
1 by 1 by 1 MPI processor grid
1 by 1 by 1 MPI processor grid
create_atoms 1 box
create_atoms 1 box
Created 4000 atoms
Created 4000 atoms
Time spent = 0.001
26314
secs
Time spent = 0.001
39618
secs
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * lj/cut 1.0 1.0
...
@@ -60,26 +60,26 @@ Neighbor list info ...
...
@@ -60,26 +60,26 @@ Neighbor list info ...
bin: standard
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.47 | 11.47 | 11.47 Mbytes
Per MPI rank memory allocation (min/avg/max) = 11.47 | 11.47 | 11.47 Mbytes
Step Temp E_pair E_mol TotEng Press
Step Temp E_pair E_mol TotEng Press
0 1.033 -4.8
899813
0 -3.
340868
6 -4.
2298176
0 1.033 -4.8
404387
0
-3.
29132
6 -4.
1332095
5 1.0337
853
-4.8
928208
0 -3.
3425304 -4.2233154
5 1.0337
247
-4.8
402263
0
-3.
290027 -4.1207962
10 1.035
8056
-4.8
953304
0 -3.
3420104 -4.1897183
10 1.035
5935
-4.8
425889
0 -3.
2895869 -4.0870158
15 1.03
80938
-4.899
0457
0 -3.
3422942 -4.1310148
15 1.03
76519
-4.8
45
99 0 -3.
2899013 -4.0278711
20 1.038
9566
-4.
9014345
0 -3.
3433892 -4.0406616
20 1.038
2257
-4.
8478854
0 -3.
2909361 -3.9368052
25 1.03
58313
-4.8
98966
3 0 -3.
3456079 -3.909301
9
25 1.03
47886
-4.8
447
3 0 -3.
2929351 -3.804446
9
Loop time of 1
2.2062
on 1 procs for 25 steps with 4000 atoms
Loop time of 1
5.95
on 1 procs for 25 steps with 4000 atoms
Performance:
353.920
tau/day,
2.048
timesteps/s
Performance:
270.846
tau/day,
1.567
timesteps/s
99.9
% CPU use with 1 MPI tasks x no OpenMP threads
100.0
% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
---------------------------------------------------------------
Pair | 1
2.202
| 1
2.202
| 1
2.202
| 0.0 | 99.9
6
Pair | 1
5.946
| 1
5.946
| 1
5.946
| 0.0 | 99.9
7
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0015
621
| 0.0015
621
| 0.0015
621
| 0.0 | 0.01
Comm | 0.0015
042
| 0.0015
042
| 0.0015
042
| 0.0 | 0.01
Output | 0.000
20
81
4
| 0.000
20
81
4
| 0.000
20
81
4
| 0.0 | 0.00
Output | 0.000
137
81 | 0.000
137
81 | 0.000
137
81 | 0.0 | 0.00
Modify | 0.001
9698
| 0.001
9698
| 0.001
9698
| 0.0 | 0.0
2
Modify | 0.001
7776
| 0.001
7776
| 0.001
7776
| 0.0 | 0.0
1
Other | | 0.00077
34
| | | 0.0
1
Other | | 0.000
6
77
1
| | | 0.0
0
Nlocal: 4000 ave 4000 max 4000 min
Nlocal: 4000 ave 4000 max 4000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Histogram: 1 0 0 0 0 0 0 0 0 0
...
@@ -97,4 +97,4 @@ Dangerous builds = 0
...
@@ -97,4 +97,4 @@ Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:1
3
Total wall time: 0:00:1
6
This diff is collapsed.
Click to expand it.
examples/atm/log.2
3
Aug18.
atm.
g++.4
→
examples/atm/log.2
7
Aug18.g++.4
+
16
−
16
View file @
31ed3f71
...
@@ -26,7 +26,7 @@ Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
...
@@ -26,7 +26,7 @@ Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
1 by 2 by 2 MPI processor grid
1 by 2 by 2 MPI processor grid
create_atoms 1 box
create_atoms 1 box
Created 4000 atoms
Created 4000 atoms
Time spent = 0.000
785112
secs
Time spent = 0.000
900984
secs
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * lj/cut 1.0 1.0
...
@@ -60,26 +60,26 @@ Neighbor list info ...
...
@@ -60,26 +60,26 @@ Neighbor list info ...
bin: standard
bin: standard
Per MPI rank memory allocation (min/avg/max) = 5.532 | 5.532 | 5.532 Mbytes
Per MPI rank memory allocation (min/avg/max) = 5.532 | 5.532 | 5.532 Mbytes
Step Temp E_pair E_mol TotEng Press
Step Temp E_pair E_mol TotEng Press
0 1.033 -4.8
92154
7 0 -3.
343042 -4.2340557
0 1.033 -4.8
40438
7 0 -3.
291326 -4.1332095
5 1.0337
949
-4.8
947881
0 -3.
3444835 -4.2271456
5 1.0337
247
-4.8
402263
0
-3.
290027 -4.1207962
10 1.035
8286
-4.8
973178
0 -3.
3439632 -4.1935779
10 1.035
5935
-4.8
425889
0 -3.
2895869 -4.0870158
15 1.03
81322
-4.
9010593
0 -3.
3442503 -4.134913
15 1.03
76519
-4.
84599
0 -3.
2899013 -4.0278711
20 1.03
9010
7 -4.
9034
854 0 -3.
3453589 -4.044616
2
20 1.03
8225
7 -4.
8478
854 0 -3.
2909361 -3.936805
2
25 1.03
58988 -4.9010506
0 -3.
3475908 -3.9133006
25 1.03
47886 -4.84473
0 -3.
2929351 -3.8044469
Loop time of
3.20
63
2
on 4 procs for 25 steps with 4000 atoms
Loop time of
4.34
63
6
on 4 procs for 25 steps with 4000 atoms
Performance:
1347.340
tau/day,
7
.7
97
timesteps/s
Performance:
993.935
tau/day,
5
.7
52
timesteps/s
100.0
% CPU use with 4 MPI tasks x no OpenMP threads
99.6
% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
---------------------------------------------------------------
Pair | 3.
120
7 |
3
.1
553
|
3.1859
|
1.5
| 9
8
.41
Pair | 3.
997
7 |
4
.1
036
|
4.209
|
4.9
| 9
4
.41
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.
019466
| 0.
05009
| 0.
08460
2 |
12.0
|
1
.5
6
Comm | 0.
13588
| 0.
24134
| 0.
3472
2
|
20.4
|
5
.5
5
Output |
7.1049e-05 | 8.2076e-05
| 0.0001
1325
| 0.0 | 0.00
Output |
0.00013757 | 0.00015104
| 0.0001
6761
| 0.0 | 0.00
Modify | 0.000
56338
| 0.000
57292
| 0.000
58413
| 0.0 | 0.02
Modify | 0.000
87953
| 0.000
91547
| 0.000
95582
| 0.0 | 0.02
Other | | 0.0003
092
| | | 0.01
Other | | 0.0003
656
| | | 0.01
Nlocal: 1000 ave 1000 max 1000 min
Nlocal: 1000 ave 1000 max 1000 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Histogram: 4 0 0 0 0 0 0 0 0 0
...
@@ -97,4 +97,4 @@ Dangerous builds = 0
...
@@ -97,4 +97,4 @@ Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:0
3
Total wall time: 0:00:0
4
This diff is collapsed.
Click to expand it.
src/MANYBODY/pair_atm.cpp
+
21
−
33
View file @
31ed3f71
...
@@ -98,9 +98,15 @@ void PairATM::compute(int eflag, int vflag)
...
@@ -98,9 +98,15 @@ void PairATM::compute(int eflag, int vflag)
numneigh
=
list
->
numneigh
;
numneigh
=
list
->
numneigh
;
firstneigh
=
list
->
firstneigh
;
firstneigh
=
list
->
firstneigh
;
int
count1
=
0
;
// triple loop over local atoms and neighbors twice
int
count2
=
0
;
// must compute each IJK triplet interaction exactly once
int
count3
=
0
;
// by proc that owns the triplet atom with smallest x coord
// special logic to break ties if multiple atoms have same x or y coords
// inner two loops for jj=1,Jnum and kk=jj+1,Jnum insure
// the pair of other 2 non-minimum-x atoms is only considered once
// triplet geometry criteria for calculation:
// each pair distance <= cutoff
// produce of 3 pair distances <= cutoff_triple^3
for
(
ii
=
0
;
ii
<
inum
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
inum
;
ii
++
)
{
i
=
ilist
[
ii
];
i
=
ilist
[
ii
];
...
@@ -112,12 +118,10 @@ void PairATM::compute(int eflag, int vflag)
...
@@ -112,12 +118,10 @@ void PairATM::compute(int eflag, int vflag)
jnum
=
numneigh
[
i
];
jnum
=
numneigh
[
i
];
jnumm1
=
jnum
-
1
;
jnumm1
=
jnum
-
1
;
// for (jj = 0; jj < jnumm1; jj++) {
for
(
jj
=
0
;
jj
<
jnumm1
;
jj
++
)
{
// replace with this line:
for
(
jj
=
0
;
jj
<
jnum
;
jj
++
)
{
j
=
jlist
[
jj
];
j
=
jlist
[
jj
];
j
&=
NEIGHMASK
;
j
&=
NEIGHMASK
;
rij
[
0
]
=
x
[
j
][
0
]
-
xi
;
rij
[
0
]
=
x
[
j
][
0
]
-
xi
;
if
(
rij
[
0
]
<
0.0
)
continue
;
if
(
rij
[
0
]
<
0.0
)
continue
;
rij
[
1
]
=
x
[
j
][
1
]
-
yi
;
rij
[
1
]
=
x
[
j
][
1
]
-
yi
;
...
@@ -125,40 +129,33 @@ void PairATM::compute(int eflag, int vflag)
...
@@ -125,40 +129,33 @@ void PairATM::compute(int eflag, int vflag)
rij
[
2
]
=
x
[
j
][
2
]
-
zi
;
rij
[
2
]
=
x
[
j
][
2
]
-
zi
;
if
(
rij
[
0
]
==
0.0
and
rij
[
1
]
==
0.0
and
rij
[
2
]
<
0.0
)
continue
;
if
(
rij
[
0
]
==
0.0
and
rij
[
1
]
==
0.0
and
rij
[
2
]
<
0.0
)
continue
;
rij2
=
rij
[
0
]
*
rij
[
0
]
+
rij
[
1
]
*
rij
[
1
]
+
rij
[
2
]
*
rij
[
2
];
rij2
=
rij
[
0
]
*
rij
[
0
]
+
rij
[
1
]
*
rij
[
1
]
+
rij
[
2
]
*
rij
[
2
];
count1
++
;
if
(
rij2
>
cutoff_squared
)
continue
;
if
(
rij2
>
cutoff_squared
)
continue
;
count2
++
;
//for (kk = jj+1; kk < jnum; kk++) {
// replace with these two lines:
for
(
kk
=
0
;
kk
<
jnum
;
kk
++
)
{
if
(
kk
==
jj
)
continue
;
for
(
kk
=
jj
+
1
;
kk
<
jnum
;
kk
++
)
{
k
=
jlist
[
kk
];
k
=
jlist
[
kk
];
k
&=
NEIGHMASK
;
k
&=
NEIGHMASK
;
rjk
[
0
]
=
x
[
k
][
0
]
-
x
[
j
][
0
];
if
(
rjk
[
0
]
<
0.0
)
continue
;
rjk
[
1
]
=
x
[
k
][
1
]
-
x
[
j
][
1
];
if
(
rjk
[
0
]
==
0.0
and
rjk
[
1
]
<
0.0
)
continue
;
rjk
[
2
]
=
x
[
k
][
2
]
-
x
[
j
][
2
];
if
(
rjk
[
0
]
==
0.0
and
rjk
[
1
]
==
0.0
and
rjk
[
2
]
<
0.0
)
continue
;
rjk2
=
rjk
[
0
]
*
rjk
[
0
]
+
rjk
[
1
]
*
rjk
[
1
]
+
rjk
[
2
]
*
rjk
[
2
];
if
(
rjk2
>
cutoff_squared
)
continue
;
rik
[
0
]
=
x
[
k
][
0
]
-
xi
;
rik
[
0
]
=
x
[
k
][
0
]
-
xi
;
if
(
rik
[
0
]
<
0.0
)
continue
;
rik
[
1
]
=
x
[
k
][
1
]
-
yi
;
rik
[
1
]
=
x
[
k
][
1
]
-
yi
;
if
(
rik
[
0
]
==
0.0
and
rik
[
1
]
<
0.0
)
continue
;
rik
[
2
]
=
x
[
k
][
2
]
-
zi
;
rik
[
2
]
=
x
[
k
][
2
]
-
zi
;
if
(
rik
[
0
]
==
0.0
and
rik
[
1
]
==
0.0
and
rik
[
2
]
<
0.0
)
continue
;
rik2
=
rik
[
0
]
*
rik
[
0
]
+
rik
[
1
]
*
rik
[
1
]
+
rik
[
2
]
*
rik
[
2
];
rik2
=
rik
[
0
]
*
rik
[
0
]
+
rik
[
1
]
*
rik
[
1
]
+
rik
[
2
]
*
rik
[
2
];
if
(
rik2
>
cutoff_squared
)
continue
;
if
(
rik2
>
cutoff_squared
)
continue
;
rjk
[
0
]
=
x
[
k
][
0
]
-
x
[
j
][
0
];
rjk
[
1
]
=
x
[
k
][
1
]
-
x
[
j
][
1
];
rjk
[
2
]
=
x
[
k
][
2
]
-
x
[
j
][
2
];
rjk2
=
rjk
[
0
]
*
rjk
[
0
]
+
rjk
[
1
]
*
rjk
[
1
]
+
rjk
[
2
]
*
rjk
[
2
];
if
(
rjk2
>
cutoff_squared
)
continue
;
double
r6
=
rij2
*
rjk2
*
rik2
;
double
r6
=
rij2
*
rjk2
*
rik2
;
if
(
r6
>
cutoff_triple_sixth
)
continue
;
if
(
r6
>
cutoff_triple_sixth
)
continue
;
nu_local
=
nu
[
type
[
i
]][
type
[
j
]][
type
[
k
]];
nu_local
=
nu
[
type
[
i
]][
type
[
j
]][
type
[
k
]];
if
(
nu_local
==
0.0
)
continue
;
if
(
nu_local
==
0.0
)
continue
;
count3
++
;
interaction_ddd
(
nu_local
,
interaction_ddd
(
nu_local
,
r6
,
rij2
,
rik2
,
rjk2
,
rij
,
rik
,
rjk
,
fj
,
fk
,
eflag
,
evdwl
);
r6
,
rij2
,
rik2
,
rjk2
,
rij
,
rik
,
rjk
,
fj
,
fk
,
eflag
,
evdwl
);
...
@@ -177,15 +174,6 @@ void PairATM::compute(int eflag, int vflag)
...
@@ -177,15 +174,6 @@ void PairATM::compute(int eflag, int vflag)
}
}
}
}
int
count
=
count1
;
MPI_Allreduce
(
&
count
,
&
count1
,
1
,
MPI_INT
,
MPI_SUM
,
world
);
count
=
count2
;
MPI_Allreduce
(
&
count
,
&
count2
,
1
,
MPI_INT
,
MPI_SUM
,
world
);
count
=
count3
;
MPI_Allreduce
(
&
count
,
&
count3
,
1
,
MPI_INT
,
MPI_SUM
,
world
);
printf
(
"FORCE %g %d %d %d
\n
"
,
cutoff_squared
,
count1
,
count2
,
count3
);
if
(
vflag_fdotr
)
virial_fdotr_compute
();
if
(
vflag_fdotr
)
virial_fdotr_compute
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment