Experiments · E43

Can the quantum calculations be run in parallel in the cloud, cheaply?

Yes. A 16-atom calculation took 1,592 s on four cores for $0.09, and each machine deleted itself when done.

In the log: Density functional theory, in parallel, for nine cents a structure

recordedDate 2026-09-13, as written in the logunclassified0 predictions · 0 result paragraphsEXPERIMENTS.md lines 2184–2229
exp E43 diagram
What E43 did and how it came out, drawn from this record and the files it names (book/assets/diagrams/exp/E43.svg).

Results

No result paragraph for this entry was found in the log.

The full record

EXPERIMENTS.md · lines 2184–2229

E43 — Density functional theory, in parallel, for nine cents a structure

Date 2026-09-13 · Question DFT is the rung that decides whether anything else here is true, and we had seventeen structures from one laptop. Can it be run in parallel affordably? · Provenance cloud/qe_startup.sh, cloud/submit_batch.py

Shape. The calculation is embarrassingly parallel across compositions - each is independent - and Quantum ESPRESSO scales sub-linearly with cores, so many small instances beat a few large ones. Each instance installs what it needs, fetches one structure, computes it, writes the result to a bucket and deletes itself. Nothing is kept on the instance and nothing idles: a crash costs one structure, and a finished job stops billing the moment it ends rather than when somebody notices.

Verified end to end, 16 atoms, all eight species, 36 k-points, Marzari-Vanderbilt smearing:

total energy -8535.01649 Ry, JOB DONE
time 1,592 s on 4 cores (n2-standard-4)
cost $0.09 per structure
instance afterwards deleted itself; nothing left billing

It is faster than the same job here. Locally that size took 1h17m on twelve cores against 26.5 minutes on four in the cloud - because the local machine was running three Quantum ESPRESSO processes against each other. Isolation is worth more than cores.

Two faults the cloud smoke run caught, each in under two minutes and for about a cent:

  • nproc reports hyperthreads while OpenMPI counts physical cores, so asking for eight ranks on a four-core instance fails instantly with no calculation attempted. Physical cores are the right choice regardless - the pair sharing a core also share the memory bandwidth this code is bound by.
  • A sixteen-atom eight-species job is hours, not minutes. That was an assumption, not a measurement, and it is what makes many-small-instances the right shape rather than a preference.

Cost guard. submit_batch.py refuses to launch when the estimate exceeds a stated cap, priced from on-demand rates because this project has no preemptible quota - the cheap path is unavailable and assuming otherwise would understate every estimate fourfold.

Storage is no longer a constraint, and not because of the cloud. Setting disk_io = 'none' takes a job from about 700 MB of wavefunctions to 40 kB of result. Seventeen earlier jobs had left 12 GB of scratch behind for 772 kB of answers; a thousand jobs now cost 40 MB. The archive machinery built for cloud storage works but is solving a problem that a one-line setting removed.

Built with PRISMWebsite and visualizations made using Claude