This HTML automatically generated with rman for NEMO
Table of Contents

Name

mkgrid - create a cube of equal massive stars equally spaced in space

Synopsis

mkgrid out=snapshot [parameter=value]

Description

mkgrid generates a distribution of particles in a cube on a regular lattice.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
out=
Output file name, in snapshot(5NEMO) format.
No default.
ngrid=
Number of particles per axis
[Default: 2].
size=
Size of cube.
[Default: 1].
zerocm=t|f
Center c.o.m. ?
[Default: t].
headline=
Text headline for output
Default: none.
nmodel=integer
Number of models to generate. All models will be different here. Although mostly meant for benchmarks, generating more then 1 model can be useful to process very large snapshots (that normally won’t fit in memory) in a serialized fashion. See also snapsplit. Most NEMO programs will only read the first snapshot. See also mkgrid nmodel= for a faster way to benchmark.
[Default: 1]

Examples

The curious nmodel= parameter was added for benchmarking the creation of large files. Very large Nbody snapshots would likely not fit in memory, so this routine writes more (otherwise identical) snapshots. There is a similar keyword in mkplummer(1NEMO) but the CPU overhead is killing the I/O bottleneck one likes to see with this keyword.

Here are examples of making 1000 snapshot of 1e6 particles each, totalling 5GB with both mkgrid and mkplummer, showing the impact of the CPU.

/usr/bin/time mkgrid c1M 100 nmodel=100 1.61user 3.85system 0:29.52elapsed 18%CPU

/usr/bin/time mkgrid . 100 nmodel=100 1.17user 1.21system 0:02.39elapsed 99%CPU

/usr/bin/time mkplummer p1M 1000000 nmodel=100 25.31user 6.36system 0:56.65elapsed 55%CPU

/usr/bin/time mkplummer . 1000000 nmodel=100 24.29user 4.47system 0:28.78elapsed 99%CPU

See Also

mkcube(1NEMO) , mkplummer(1NEMO) , snapshot(5NEMO)

Author

J.J.

Fleck

History


20-dec-05    created        JJF
6-may-2025    added nmodel=    PJT


Table of Contents