An open-source DMRG code that distributes tensors across hundreds of GPUs, sustaining 9.6 PFLOPS on 512 GPUs for the nitrogenase P-cluster. If the scaling holds, bond dimensions above 10 000 become routine for strongly correlated molecules.
Going deeper
Operators in device memory along a forward sweep. At each bond the pair operators of the left block (blue) are read from the buffer that the previous renormalization wrote. The renormalization writes those of the grown block into the other buffer (dashed), which is the source at the next bond. As long as both buffers fit into device memory, these operators do not leave the device. A copy is written to disk in the background, and the operators of the right block (orange) are read from disk when their bond is prepared.
Forming of the complementary operators on six GPUs. Every formed operator (horizontal) is a sum over all stored pair operators (vertical), so the area of the rectangle is the work of the forming, and its colors show which GPU does which part. The bar at the left shows which pair operators a GPU stores, the bars below show the partial sums each GPU forms, which a reduction adds up. (a) Default mode: a GPU forms a partial sum of every complementary operator from its own pair operators. (b) Optional two-dimensional mode on two nodes with three GPUs each: every formed operator is cut along its symmetry sectors into three slices. A GPU forms one slice from the pair operators of its node, and a reduction over the nodes completes each slice. The partial sums are three times smaller.
Imagine a factory assembly line with 76 stations. At each station a worker makes one part and hands it to the next. The finished product — the energy of a molecule — comes off the end. The quality depends on how much each worker can hold in their hands: a bigger handful means a better product, but hands are small.
exa-dmrg is a way to give each worker access to a shared shelf. The shelf (hundreds of GPUs) is bigger than any single pair of hands (one GPU's memory), and a foreman (the memory plan) decides at each station what goes on the shelf, what stays in the worker's hands, and what is filed in a cabinet (disk). Parts that the next station needs stay on the shelf; parts nobody needs for a while go to the cabinet. The key trick is that some bulky sub-assemblies are never stored at all — each station rebuilds them from the smaller parts it already has.
With this arrangement the factory handled its hardest order yet: an iron-sulfur cluster with a handful size of 28 000 spread across 512 shelves, finishing one pass of the line in about two hours. It also started work on a drug-metabolism problem — how the body breaks down the blood thinner warfarin — though the largest versions of that order are on hold while the factory is being serviced.
The abstract, word for word, with the seven densest phrases unpacked.
The density matrix renormalization group (DMRG) is the method of choice for large active spaces in strongly correlated molecules. We present exa-dmrg, an open-source DMRG program that scales to hundreds of GPUs or thousands of CPU cores. The accuracy of DMRG is set by the bond dimension D, and on GPUs the largest affordable D is usually limited by device memory1. exa-dmrg is designed around this limit: the largest tensors are distributed across the GPUs, intermediates are formed on the fly rather than stored2, and at every step the program decides which data reside on the GPUs, in host memory, or on disk. Nearly all computation is cast as batched matrix multiplications3, which GPUs execute most efficiently. We demonstrate the scaling with ground-state calculations on both nitrogenase cofactors in established complete active space (CAS) models. The FeMo cofactor is treated in a (113,76) CAS with spin adaptation at D=10000 SU(2) multiplets4; on 256 GPUs a sweep takes about an hour even with tight thresholds, so a fully converged calculation completes in under a day. The P-cluster is treated in a (114,73) CAS with U(1) symmetry at D=28000 on 512 GPUs, where exa-dmrg sustains 12.2 PFLOPS in the matrix-vector products and 9.6 PFLOPS over a full sweep5, 12 × and 40 × the highest throughputs previously reported for DMRG (Xiang et al. 2024, https://doi.org/10.1021/acs.jctc.3c01228; Menczer et al. 2024, https://doi.org/10.1021/acs.jctc.4c00903). We also compute reactant and transition-state energies for the cytochrome P450 mediated hydroxylation of warfarin6, a classic case of drug metabolism. Beyond ground states, exa-dmrg provides excited states, reduced density matrices, orbital entanglement measures, leading Slater determinants, and orbital optimization (DMRG-CASSCF), all accessible through a Python interface, directly or as an active-space solver in PySCF7.
Two lines of work: making DMRG faster on parallel hardware, and applying it to iron-cluster active spaces.
Read five parts of it, in this order.
Skip Section 5 unless you need excited states, RDMs or CASSCF details. Skip Section 2.1 if you know DMRG with complementary operators.
If the scaling is less general than it looks, these places show why.
The two modes differ in how far they can scale. What limits a distribution is the part of a sweep whose cost per rank does not fall when ranks are added. In a weak scaling with D3proptonp the work per rank stays the same, but other parts grow as D2, that is as np2/3. For example, the completion of P, Q and S behaves in this way. It grows nearly in proportion to D2, from 4 % of the sweep on 64 GPUs to 6 % on 128, 9 % on 256 and 10 to 11 % on 512 GPUs in both modes. Estimating this growth to 4096 GPUs, it would then be 16 times as large as on 64 GPUs and lengthen the sweep execution to 1.6 times that on 64 GPUs. The efficiency would then be about 0.6 even if every other part scaled ideally. In the one-dimensional mode this is fixed by the layout, because every rank forms and receives a share of every complementary operator. In the two-dimensional mode the part of P and Q is divided by the number of columns nc (Section 2.6). Already with the four columns used here, and with S completed as in the one-dimensional mode, the completion takes 6 to 14 % less time per D2 than in the one-dimensional mode.
Notably, the calculations in the two larger active spaces, P450(77,76) at Dmax=9000 and P450(77,100) at Dmax=12000, have been started but could not be completed for this version, because of repeated interruptions of the operation of JUPITER and a longer scheduled maintenance. Their results will be added in an updated version of this paper as soon as the machine is back in regular operation.
This choice has two advantages. First, every block carries the same kinds of operators wherever it lies in the chain. Second, P and Q exist only at the bond that is being solved and only in device memory, so they are never written to disk or read back. There are also two costs. First, a block keeps the A and B of all its orbital pairs even when it has more orbitals than the other block. Second, the forming takes O(KN2KC2D2) operations per bond, where KN and KC are the numbers of orbitals in the normal and in the complementary block. Over a sweep this adds up to O(K5D2), where the standard algorithm spends O(K4D2) on updating its stored complementary operators [3, 4]. The term remains small against the O(K3D3) of the matrix–vector products as long as D is not small compared with K2, which is the case in the calculations the program is built for. In those of Section 3 the forming with its completion takes about a tenth of the time of a sweep or less in most runs and up to 28 % at the largest number of GPUs of a series, because a part of this work does not shrink with the number of GPUs (Sections 2.6 and 3.7).
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
Several Claude models (Anthropic) were used to optimize the implementation of the code, and Claude Fable 5.2 (Anthropic) to assist with the writing of this manuscript. All code was reviewed, tested and validated by the authors, and all text was reviewed and verified by them. The authors take full responsibility for the code and for the content of this paper.
More latest news
Read all