A derivative of John E. Chambers' MERCURY6 with GPU acceleration for BS, BS2, RADAU, MVS and HYBRID, solar 1PN relativity, radiation pressure and Poynting–Robertson (PR) drag, and Yarkovsky drift. CPU mode also includes integration fixes and faster setup for large particle counts.
Keep your usual .in files and run the same programs without new command line
options. The additional choices are:
-
Build:
makeincludes GPU support if it finds NVIDIA's CUDA toolkit (nvcc). Otherwise it builds a CPU-only version.make cpualways builds CPU only. Runmake clean-buildbefore changing build settings. It keeps your simulation files. -
Enable GPU: append this line after all existing settings in
param.in:execution backend = cudaCPU is the default if the line is missing.
autochooses a backend from the particle count and GPU availability. CUDA needs an NVIDIA GPU, its driver and the CUDA toolkit. -
Check force settings: relativity (PN) uses the existing switch in
param.in. Yarkovsky drift usesyar=<value>on the body's parameter line inbig.inorsmall.in, in AU/day² at 1 AU (default zero). PR usesb=<beta>for massless bodies. Use BS or RADAU for PN, PR or Yarkovsky.A1,A2andA3keep their original cometary meaning. -
Run:
./mercury6, then./element6or./close6as usual. Checkinfo.outto confirm whether CPU or CUDA ran. Custommfo_userforces need CPU. -
Restart or rerun: a restart reads the dynamics from the dump files, and only the backend can be changed in
param.in. To rerun from the inputs, runmake rm-gen, which deletes outputs and dumps, so save your results first.make cleanalso deletes.infiles.
- MERCUDA guide: a first run, GPU setup, force settings and restarts.
- MERCURY6 manual: standard inputs, outputs, postprocessing and restarts, adapted for this package. The unmodified original is in mercury6.man, but its build instructions do not apply.
- Technical notes: equations, integration changes and the CUDA implementation.
- Benchmarks: accuracy, runtime, particle-count and integration-time scaling.
- Validation: regression tests, independent accuracy checks and coverage limits.
- References: integrator and force-model literature.
In this stable-orbit example, MERCUDA CUDA is 16–32× faster than original MERCURY6, with similar endpoint accuracy. The test used eight planets, 100,000 massless particles and 365 days with extra forces off, on an RTX 4070 compared with one i5-13600KF CPU thread. The speedup includes CPU improvements, and small or short runs can be faster on CPU. Full results, matched-force comparisons and methodology.
Please cite Chambers (1999)
and record the MERCUDA version (for example v1.0.0) and the force settings you
used. Additional references · Original MERCURY6 repository.
MERCUDA is distributed under GNU GPL version 3, following the upstream MERCURY6 license. See NOTICE for attribution and modification dates.
