Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
80c4998
openaccPTM: split the tasks of the GPU actions between the MPI processes
carlocamilloni Nov 15, 2026
6ac334e
openaccPTM: first process by default, one-pass force gathering, sums …
carlocamilloni Nov 16, 2026
e67f342
openaccPTM NeighborSums: fix the nvc++ build
carlocamilloni Nov 16, 2026
222d8ca
Q1-Q6 with USEGPU: the norm of the sums on the CPU
carlocamilloni Nov 16, 2026
ce2c938
fused symfunc on cpu and gpu with unified cells
carlocamilloni Nov 16, 2026
a33b94f
fix warning
carlocamilloni Nov 16, 2026
82b7278
NeighborSums: sum only the column force buffers of the threads that ran
carlocamilloni Nov 16, 2026
185eb76
NeighborSums: values and forces copied in parallel; no subdivision en…
carlocamilloni Nov 16, 2026
6a5d8e9
NeighborSums: Q1-Q6 coordination numbers and norms in the fused path,…
carlocamilloni Nov 17, 2026
a91a3a9
NeighborList: no cells when one group has at most 8 atoms; docs for o…
carlocamilloni Nov 17, 2026
97476ce
The two copy loops now live in the core’s NeighborSums.cpp, so they a…
carlocamilloni Nov 17, 2026
ec9c4cf
NeighborSums: GPU and CPU timings in CHANGES and in the README of the…
carlocamilloni Nov 17, 2026
d242ca9
LinkCells: faster and threaded building of the cells
carlocamilloni Nov 17, 2026
d5ed95e
NeighborSums: CPU few-rows threshold = number of threads; round-9 tim…
carlocamilloni Nov 17, 2026
2f2da21
openaccPTM: keep the action data on the device between the calls
claude Nov 17, 2026
403dbcc
ANTIBETARMSD, PARABETARMSD: the number of segments from a single action
claude Nov 17, 2026
70e406d
Merge branch 'ss-fused' into acc-resident-actiondata
carlocamilloni Nov 17, 2026
15f2880
ANTIBETARMSD, PARABETARMSD: the number of segments on the GPU
claude Nov 17, 2026
d7ee50f
openaccPTM: interleaved order of the tasks in the force kernel
claude Nov 17, 2026
1bb6640
SheetCount: clear the buffers of all the threads before the parallel …
claude Nov 18, 2026
8ccf137
openaccPTM: no continue in the force kernel and in the sheet kernel
claude Nov 18, 2026
ff0a1d6
openaccPTM: drop the interleaved order of the tasks, GPU timings of t…
claude Nov 18, 2026
7f388ed
ALPHARMSD: the number of segments from a single action
claude Nov 18, 2026
5123986
ANTIBETARMSD, PARABETARMSD: STRANDS_CUTOFF=1 and D_MAX by default, sk…
claude Nov 18, 2026
6663c1c
ALPHARMSD: D_MAX by default; D_MAX in the LESS_THAN examples
claude Nov 18, 2026
8e65c5e
SecondaryStructureCount: clear and sum the buffers of the threads in …
claude Nov 18, 2026
47abad9
secondary structure: timings on 32 cores after the parallel clear and…
claude Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions CHANGES/v2.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ The entries below give the details; the main cases are:
- Replica exchange through GREX evaluates both configurations with the same updated time-dependent bias. This changes exchange probabilities with the 2.11 kernel also when using older GROMACS patches; GROMACS does not need to be patched again.
- [UPPER_WALLS](UPPER_WALLS.md) and [LOWER_WALLS](LOWER_WALLS.md) acting on a periodic argument do not apply the periodic boundary conditions to the difference between the argument and `AT`.
- [JCOUPLING](JCOUPLING.md) with `TYPE=CUSTOM` needs `A`, `B` and `C`, and `SHIFT` is zero by default. `ARG=*` leaves out the values that the action cannot use.
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) use `STRANDS_CUTOFF=1` (nm) by default (`STRANDS_CUTOFF=0` uses all the pairs of strands).
The default switching function of these two and of [ALPHARMSD](ALPHARMSD.md) is stretched to be zero at `D_MAX`, where it is 1e-5, as in the other actions
that take `R_0`, `NN` and `MM` (the number of segments changes by at most 1e-5 per segment within the cutoff).
- Functions of vectors are evaluated also where all their arguments are zero (e.g. [CUSTOM](CUSTOM.md) with `FUNC=x+1`); [MOMENTS](MOMENTS.md) of periodic variables were wrong.
- [COORD_ANGLES](COORD_ANGLES.md) with more than one central atom; [GYRATION](GYRATION.md) with `TYPE=RGYR_1` and `TYPE=RGYR_3` (they were swapped).
- Wrong forces were fixed in [CENTER](CENTER.md) and [COM](COM.md) with `PHASES` in non-orthorhombic cells, [MATRIX_PRODUCT](MATRIX_PRODUCT.md) of sparse matrices,
Expand Down Expand Up @@ -81,6 +84,14 @@ The entries below give the details; the main cases are:
- [READ](READ.md) has an `IGNORE_COMPONENT` flag, to read a component (e.g. `d.x`) as a plain value.
- The experimental openaccPTM plugin (`plugins/openaccPTM`, compiled separately with the NVIDIA HPC SDK) adds the `USEGPU` flag to some actions,
e.g. [DISTANCE](DISTANCE.md), [KDE](KDE.md), [SAXS](SAXS.md) and [SANS](SANS.md), computed on the GPU with OpenACC.
With MPI the first rank computes these actions on its GPU; with `MULTIGPU` their tasks are split between the ranks, each using its own GPU.
With several GPUs on a node and no MD code (e.g. `mpirun -np 4 plumed driver`) the ranks of the node use the GPUs in turn.
With `USEGPU`, [COORDINATIONNUMBER](COORDINATIONNUMBER.md) and [Q1](Q1.md)-[Q6](Q6.md) compute the sums over the neighbours on the GPU
without building the contact matrix, with the kernels and the linked cells of the CPU version (on one A100, 20000 atoms:
3.6 ms per step for COORDINATIONNUMBER and 12.6 ms for Q6; 4.0 and 15.7 ms on 32 CPU cores). On the GPU the forces of the matrices are gathered in one pass by default (`AVOID_THREAD_GATHER` for the
low memory version, which was the default and is about two times slower).
The data of the actions (e.g. the list of the segments of [ALPHARMSD](ALPHARMSD.md), [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md)) stays on the GPU between the steps
and is copied again only when the action may have changed it, instead of being copied twice per step.

#### Restart and checkpoints

Expand Down Expand Up @@ -183,6 +194,17 @@ The entries below give the details; the main cases are:
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) with `STYLE=inter` crashed when a chain contained a single residue; they are now an error only when no pair of strands can be built.
- `TYPE` of the three shortcuts is not case sensitive (`TYPE=drmsd` was an error).
- The secondary structure collective variables with `TYPE=DRMSD` (the default) are faster: the derivatives are accumulated per atom and the virial is computed from the atoms of each segment, which reduces the cost of the force calculation by about 40%. The setup of [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) for large proteins, which build hundreds of thousands of segments, is about 20% faster. Their documentation has been revised (default `R_0`, periodic boundary conditions, `STRANDS_CUTOFF`, `STYLE`).
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) compute the number of segments that are similar to a sheet with a single action
(`ANTIBETARMSD_SCALAR`, `PARABETARMSD_SCALAR`), which skips the pairs of strands further apart than `STRANDS_CUTOFF`, adds the derivatives of each segment
directly to the atoms and does not create a vector with an element per segment; the vectors of the expanded input are computed only if they are used elsewhere.
The results are the same. With 144 peptides (370k pairs of strands, 20k atoms) and `STRANDS_CUTOFF=1` the three secondary structure variables take 41 ms per step
instead of 298 ms on one CPU core (6.1 ms instead of 100 ms on 32 cores). The derivatives of a segment are computed only when its switching function
is not constant. With `USEGPU` and `TYPE=DRMSD` the same calculation is done on the GPU (`ANTIBETARMSD_SCALAR_ACC` and `PARABETARMSD_SCALAR_ACC`
in the openaccPTM plugin: 1.8 ms per step for the three variables of the example above on one A100); with `USEGPU` and the other types the vectors are still used.
[ALPHARMSD](ALPHARMSD.md) is computed in the same way (`ALPHARMSD_SCALAR`, `ALPHARMSD_SCALAR_ACC`), which is about 1.7 times faster on the CPU.
`STRANDS_CUTOFF` is 1 nm by default. When the switching function goes to zero at a finite distance (as the default one now does, or with `D_MAX` in `LESS_THAN`), the single action
also skips the pairs of strands that are so far apart that their segment certainly has a distance from the reference beyond it: the result does not
change, and with `STRANDS_CUTOFF=0` ANTIBETARMSD for the 144 peptides above takes 160 ms per step on one CPU core instead of 930 ms (0.6 ms on one A100).
- Fixes in the collective variables:
- [DIHEDRAL_CORRELATION](DIHEDRAL_CORRELATION.md) with `ATOMS` (a single variable) crashed: the atoms were never requested.
- [CHARGE](CHARGE.md) returned the masses of the atoms instead of their charges, and an error is given when the MD code does not provide the charges.
Expand Down Expand Up @@ -502,6 +524,11 @@ The entries below give the details; the main cases are:
took time proportional to their number. With 10 atoms, a 0.6 nm cutoff and a 20 nm box, [COORDINATIONNUMBER](COORDINATIONNUMBER.md) took 0.75 ms per step
and now takes 0.01 ms, [COORDINATION](COORDINATION.md) with `NLISTCELLS` and `NL_STRIDE=1` 0.66 ms and now 0.04 ms.
The pairs found are the same; with `NLISTCELLS`, when there are fewer cells than before, the order of the pairs, and so the last digits of the results, can change.
- Building the linked cells (used by [CONTACT_MATRIX](CONTACT_MATRIX.md) and the variables built on it, by `NLISTCELLS`, by the fused
[COORDINATIONNUMBER](COORDINATIONNUMBER.md) and [Q6](Q6.md) and by other actions) is about 2 times faster on one thread, as the cell of each
atom and its position wrapped in the box are found with one change of coordinates instead of four, and it is split among the OpenMP threads also when the atoms
are placed in the cells (it was serial). With 20000 atoms it took 0.86 ms on one thread and 0.30 ms on 32, and now takes 0.40 and 0.09 ms;
[COORDINATIONNUMBER](COORDINATIONNUMBER.md) of 20000 atoms on 32 cores is 16% faster. The cells and the order of their atoms are identical.
- Making the molecules whole no longer opens an OpenMP parallel region when it runs on one thread, which happens for every action with few atoms
(e.g. [DISTANCE](DISTANCE.md)) at every step. With 200 [DISTANCE](DISTANCE.md) and a [RESTRAINT](RESTRAINT.md) on them the calculation is almost twice as fast.
- The virial of the collective variables that compute it from the atomic derivatives (e.g. [DISTANCE](DISTANCE.md), [GYRATION](GYRATION.md) and the multicolvars)
Expand All @@ -520,6 +547,20 @@ The entries below give the details; the main cases are:
[COORDINATIONNUMBER](COORDINATIONNUMBER.md) is a further 1.4 times faster in the orthorhombic box and in the rhombic dodecahedron and 1.25 in a truncated octahedron,
and building the list of [COORDINATION](COORDINATION.md) with `NLISTCELLS` 1.5 and 2.4 times faster. The order of the neighbors changes, so the results
can change in the last digits (relative differences of 1e-14).
- [COORDINATIONNUMBER](COORDINATIONNUMBER.md) and [Q1](Q1.md), [Q3](Q3.md), [Q4](Q4.md), [Q6](Q6.md) (and so the actions that use them, e.g.
[LOCAL_Q6](LOCAL_Q6.md) and [LOCAL_AVERAGE](LOCAL_AVERAGE.md)) compute the sums over the neighbours of each atom in one pass over the linked cells,
without building the contact matrix (and, for the Steinhardt parameters, the matrices of the spherical harmonics); with `SPECIES` the force on each atom
is gathered from its own neighbours, so that the forces on the atoms do not depend on the number of OpenMP threads. On two cores, with 2000 to 20000 atoms
and a 0.6 nm cutoff, [COORDINATIONNUMBER](COORDINATIONNUMBER.md) is 1.6-2.3 times faster and [Q6](Q6.md) 2.4-4 times faster, and the small inputs
are not slower (64 atoms: 1.3 times faster). The values are the same and the forces change in the last digits (relative differences of 1e-14).
With `MASK`, and for [COORDINATION_MOMENTS](COORDINATION_MOMENTS.md), the contact matrix is used as before. The actions of the contact matrix
(e.g. `q6_mat`, `q6_sh`) are still created, and are computed only when another action uses them.
For the Steinhardt parameters the coordination numbers (`q6_denom`) are computed in the same pass as the sums of the spherical harmonics, the forces
are contracted pair by pair, and the norms of the sums (`q6_norm`) are computed by one action: [Q6](Q6.md) is a further 1.9 times faster on two cores.
With few atoms in `SPECIESA` (e.g. one ion against all the water molecules) the linked cells are not built: the atoms of `SPECIESB` are
shared between the threads (one atom against 100000 water oxygens: 2.7 times faster, and faster than [COORDINATION](COORDINATION.md) without a neighbor list).
- [COORDINATION](COORDINATION.md) with `NLISTCELLS` builds the list as with `NLIST` when one of the groups has at most 8 atoms: sorting all the atoms
into cells costs more than one distance per pair (one atom against 100000 water oxygens: 2.4 times faster when the list is updated at every step).
- [DFSCLUSTERING](DFSCLUSTERING.md) (and so the cluster actions that use it, e.g. [CLUSTER_WITHSURFACE](CLUSTER_WITHSURFACE.md)) wrote outside the list of
the neighbors of a node when the adjacency matrix was not flagged as symmetric, as for a product of matrices: each edge was then stored twice, and a node with
more connections than half the columns of the matrix overwrote the list of the next node. The clusters could then depend on the order of the neighbors.
Expand Down
5 changes: 5 additions & 0 deletions developer-doc/Migration211.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ These keywords are still read, as the keyword that replaces them, with a warning
- UPPER_WALLS and LOWER_WALLS acting on a periodic argument do not apply the periodic boundary conditions to the difference
between the argument and `AT` any more.
- `ARG=*` leaves out the values that the action cannot use (e.g. in PRINT).
- ANTIBETARMSD and PARABETARMSD use `STRANDS_CUTOFF=1` (nm) by default: the segments whose strands are further apart do not
contribute to the number of segments. Write `STRANDS_CUTOFF=0` to use all the pairs of strands as before.
- ALPHARMSD, ANTIBETARMSD and PARABETARMSD: with R_0, NN, MM and D_0 (and not LESS_THAN) the switching function is stretched to be
zero where it is 1e-5 (its D_MAX), as in the other actions that take these keywords; `LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12}`
gives the function of v2.10.
- A function of a sparse matrix that is not zero for zero arguments (e.g. CUSTOM with `FUNC=1-x` on a CONTACT_MATRIX
with `D_MAX`) stops with an error: the elements that the matrix does not store were silently taken as zero.
Give the function a `MASK` (e.g. the matrix itself) to compute it only on the stored elements, or remove `D_MAX`.
Expand Down
Loading
Loading