This HTML automatically generated with rman for NEMO
Table of Contents

Name

gravidy, rungravidy - direct summation CPU/MPI/GPU hermite N-body integrator

with variable block timesteps

Synopsis

gravidy -i input_file ...

rungravidy in= outdir= ...

Description

GraviDy is a direct-summation N-body integrator based on the Hermite scheme. It can be compiled in a CPU (including openMP), an MPI, and a GPU (using CUDA) version. Depending on your needs, a single core version using GNU parallel can be a faster way to get survey results.

gravidy is not installed by default in NEMO. See INSTALL below. The rungravidy NEMO frontend is available for those who want to work with NEMO’s snapshot(5NEMO) files.

Parameters

The following NEMO parameters are recognized for rungravidy, where the correspoding short and long flag for gravidy is mentioned as well:
in=
Input file, required (-i --input) [???]
outdir=
Output run directory, required (-o --output) [???]
eta=
Time-step parameter for irregular force polynomial (-e --eta) [0.01]
deltat=
Output time interval in units of the crossing (-z --interval) [0.125]
tcrit=
Termination time in units of the crossing time (-t --time) [1]
eps=
Gravitational softening parameter (-s --softening) [0.0001]
lagrange=
Print information of the Lagrange Radii in every integration time (-l --lagrange) [t]
all=
Print all the information of N-particles in every integration time (-a --all) [f]
gpu=
GPUs to use, by default is the maximum available devices (use even numbers) (-g --gpu) [0]
dryrun=
If set, would only display the shell commands [f]
exe=
Name of the executable [gravidy]

Note the current version of rungravidy does not support the -p (screen output) and -r (resume an old run) options.


GraviDy:
  -h [ --help ]         Display this message
Required options:
  -i [ --input ] <filename>       Input data filename
  -t [ --time ] <value> (=1)      Integration time (In N-body units)
  -r [ --resume ] <filename>.info Resume a simulation with an .info file
Elective options:
  -o [ --output ] <filename>      Output data filename
  -s [ --softening ] <value>      Softening parameter (default 1e-4)
  -e [ --eta ] <value>            ETA of time-step calculation (default 0.01)
  -p [ --screen ]                 Print summary in the screen instead of a
file
  -z [ --interval ] <value>       Output time interval (default 0.125)
Extra options:
  -l [ --lagrange ]               Print information of the Lagrange Radii
in every
                                  integration time
  -a [ --all ]                    Print all the information of N-particles
in every
                                  integration time
  -g [ --gpu ] <value> (=0)       GPUs to use, by default is the maximum available
                                  devices (use even numbers)

Example

Here is an example integrating gravidy with NEMO files
  mkplummer p128 128
  snapprint p128 i,m,x,y,z,vx,vy,vz format=%.15f > p128.tab
  gravidy --input p128.tab --output p128 --interval 0.1 --time 10 --eta 0.01 --softening
0.05
  cat p128.out.snapshot_0* | sed ’s/# Time://’ | tabtos - - time skip,m,pos,vel
nbody=128 | csf - p128.out SnapShot
  
although note that the last snapshot (time=10.0 in this case) might be replicated in versions of gravidy before June 2023. The rungravidy frontend would simplify this to
  mkplummer p128 128
  mkdir p128.d
  rungravidy p128 p128.d deltat=0.1 tcrit=10 eta=0.01 eps=0.05
  snapplot p128.d/OUT3.snap
  
with the caveat that rungravidy enforces the use of a run directory.

Benchmark

The bench1 runs a single core OpenMP, a Plummer 1024 body integration to T=10. bench2 runs this same benchmark with 1,2,4 and 8 cores to check the OpenMP performance. Note no output files are produced.
   cd $NEMO/usr/gravidy
   make bench1
and some example timings
k2-bat    21.9    i7-1260P
lma    35.0?
jansky    12.0?    i9-12xxxK

Install

Example from NEMO/usr/gravidy. See README file for dependencies such as the BOOST library
   cd $NEMO/usr/gravidy
   make clean install
   make cmp34
   
this will install the vanilla "cpu" version. The "gpu" and "mpi" version will need more guidance.

The "cmp34" target will compare the results of a direct run of gravidy with the same one of rungravidy. There should be no differences.

Author

Cristian Maureira-Fredes, and Pao Amaro-Seoane (gravidy), Peter Teuben (rungravidy)

Files


NEMO/usr/gravidy - root directory
rungravidy.c - example NEMO frontend

Ads

@ads 2018MNRAS.473.3113M

See Also

nbody1(1NEMO) , snapshot(5NEMO)

Maureira-Fredes, C and Amaro-Seoane, P. "GraviDy, a GPU modular, parallel direct-summation N-body integrator: Dynamics with softening", MNRAS, vol. 473, pp. 3113-3127, Jan . 2018. https://ui.adsabs.harvard.edu/abs/2018MNRAS.473.3113M

http://github.com/cmaureir/gravidy.git

History


12-feb-2017    example added    PJT
6-apr-2023    add install note    PJT
16-jun-2023    (rungravidy v0.4 now using gravidy default parameters    PJT
21-jun-2023    fixed gravidy last duplicated snapshot    PJT


Table of Contents