Skip to content

Examples running checking and benchmarking

Juvenal Yosa edited this page Nov 22, 2026 · 4 revisions

Tests, diagnostics and the benchmark suite.

Figures: calculations with the CPU build of v1.2.1-gpu, laptop (Intel Core i7-8850H), one core unless a caption says otherwise, or published numbers where the caption says so. Scripts: scripts/wiki_figures.

60. Check the installation

Runs crambin on the CPU and on the GPU and compares heats, gradients, the CPU fallback and NOGPU; it must end with all checks passed.

cd tests
python3 check_mozyme_gpu_tolerance.py ../build/mopac \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn.mop \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn_opt.mop \
    --handback ../benchmarks/publication_inputs/mop/protein_crambin_1crn_denout.mop
Largest difference between GPU and CPU heats in the benchmark checks

Largest difference between GPU and CPU heats in the benchmark checks; numbers published in the README (A100 benchmark, commit c85eb96d).

61. Check the solids path

Compares the device one-electron matrix, Fock matrix and gradient with the CPU loops for the repository cells.

python3 tests/check_materials_gpu.py build/mopac --medium quartz,silicon,rutile
The cells of tests/data/materials/small.

The cells of tests/data/materials/small.

62. Check the QM/MM long-range electrostatics

Twenty checks of the QM–MM PME against a direct Ewald sum (Madelung constant, potentials, forces); no MOPAC needed, --gpu also tests the CuPy grid.

python3 tests/check_qmmm_pme_ewald.py --gpu

Checked: without --gpu, all 11 checks passed on the main branch after commit ef0e500d, which fixed the test itself; in release v1.2-gpu the test stops with an AttributeError before its third check.

The 11 CPU checks of tests/check_qmmm_pme_ewald.py: value and tolerance of each (unit in brackets).

The 11 CPU checks of tests/check_qmmm_pme_ewald.py: value and tolerance of each (unit in brackets).

63. Where did the time go: TIMES and MOPAC_GPU_PROFILE

TIMES (standard MOPAC) prints the time of each stage; MOPAC_GPU_PROFILE=1 adds the device timings.

Copy next to the input: tests/data/mozyme_gpu_reference/1UAO_opt.pdb

PM7 MOZYME 1SCF TIMES GEO_DAT="1UAO_opt.pdb"
Chignolin, stage times
MOPAC_GPU_PROFILE=1 mopac job.mop

Checked: runs with the CPU build of release v1.2-gpu (commit 323b6076, 2026-11-20).

Time of the stages of the SCF reported by TIMES for this job.

Time of the stages of the SCF reported by TIMES for this job.

64. Show which GPU is used

MOPAC_GPU_DEBUG=1 prints the detected GPUs, the device chosen and the MOZYME GPU settings in the output.

MOPAC_GPU_DEBUG=1 mopac job.mop
nvidia-smi   # memory in use while it runs
FP64 rate and memory bandwidth of NVIDIA GPUs, vendor data as listed in the README (Which GPU?)

FP64 rate and memory bandwidth of NVIDIA GPUs, vendor data as listed in the README (Which GPU?); only the A100 and the T4 were timed with this code.

65. Run the benchmark suite

Every benchmark of the README tables. --quick runs one small case per experiment (a test of the pipeline); --exp picks experiments.

python3 scripts/paper/paper_bench.py --mopac build/mopac --libmopac build/libmopac.so --out results --quick
python3 scripts/paper/paper_bench.py --mopac build/mopac --out results --exp mozyme_sp,solids
python3 scripts/paper/paper_figures.py results
Speed-up of the A100 against the system size

Speed-up of the A100 against the system size; numbers published in the README (A100 benchmark, commit c85eb96d).

Clone this wiki locally