gitlab is upgraded to version 13, please report any issues and enjoy

Commit 10979e50 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'rt-cmdline-flag' into 'master'

added radiation cmdline flags and rt engine policy

See merge request !1145
parents fdbe2069 4db0400f
......@@ -22,7 +22,7 @@ Parameters:
-h, --help show this help message and exit
Simulation options:
-b, --feedback Run with stars feedback.
-c, --cosmology Run with cosmological time integration.
--temperature Run with temperature calculation.
......@@ -30,36 +30,43 @@ Parameters:
-D, --drift-all Always drift all particles even the ones
far from active particles. This emulates
Gadget-[23] and GIZMO's default behaviours.
-F, --star-formation Run with star formation.
-F, --star-formation Run with star formation.
-g, --external-gravity Run with an external gravitational potential.
-G, --self-gravity Run with self-gravity.
-M, --multipole-reconstruction Reconstruct the multipoles every time-step.
-s, --hydro Run with hydrodynamics.
-S, --stars Run with stars.
-B, --black-holes Run with black holes.
-k, --sinks Run with sink particles.
-u, --fof Run Friends-of-Friends algorithm and
black holes seeding.
-k, --sinks Run with sink particles.
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
--logger Run with the particle logger.
--logger Run with the particle logger.
-R, --radiation Run with radiative transfer. Work in
progress, currently has no effect.
Simulation meta-options:
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--cooling.
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--gear Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
Control options:
-a, --pin Pin runners using processor affinity.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
......@@ -85,14 +92,15 @@ Parameters:
-T, --timers=<int> Print timers every time-step.
-v, --verbose=<int> Run in verbose mode, in MPI mode 2 outputs
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-y, --task-dumps=<int> Time-step frequency at which task graphs
are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
See the file examples/parameter_example.yml for an example of parameter file.
......@@ -109,7 +109,7 @@ Parameters:
-h, --help show this help message and exit
Simulation options:
-b, --feedback Run with stars feedback.
-c, --cosmology Run with cosmological time integration.
--temperature Run with temperature calculation.
......@@ -117,7 +117,7 @@ Parameters:
-D, --drift-all Always drift all particles even the ones
far from active particles. This emulates
Gadget-[23] and GIZMO's default behaviours.
-F, --star-formation Run with star formation.
-F, --star-formation Run with star formation.
-g, --external-gravity Run with an external gravitational potential.
-G, --self-gravity Run with self-gravity.
-M, --multipole-reconstruction Reconstruct the multipoles every time-step.
......@@ -132,22 +132,28 @@ Parameters:
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
--logger Run with the particle logger.
--logger Run with the particle logger.
-R, --radiation Run with radiative transfer. Work in
progress, currently has no effect.
Simulation meta-options:
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--cooling.
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--gear Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
Control options:
-a, --pin Pin runners using processor affinity.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
......@@ -173,14 +179,15 @@ Parameters:
-T, --timers=<int> Print timers every time-step.
-v, --verbose=<int> Run in verbose mode, in MPI mode 2 outputs
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-y, --task-dumps=<int> Time-step frequency at which task graphs
are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
See the file examples/parameter_example.yml for an example of parameter file.
```
......@@ -2258,7 +2258,7 @@ AC_DEFINE_UNQUOTED([SELF_GRAVITY_MULTIPOLE_ORDER], [$with_multipole_order], [Mul
# Radiative transfer scheme
AC_ARG_WITH([rt],
[AS_HELP_STRING([--with-rt=<scheme>],
[Radiative transfer scheme to use @<:@none, M1closure, debug default: none@:>@]
[Radiative transfer scheme to use @<:@none, M1closure, debug default: none@:>@. This is still work in progress, currently no scheme works.]
)],
[with_rt="$withval"],
[with_rt="none"]
......
......@@ -22,19 +22,19 @@ can be found by typing ``./swift -h``:
-b, --feedback Run with stars feedback.
-c, --cosmology Run with cosmological time integration.
--temperature Run with temperature calculation.
--temperature Run with temperature calculation.
-C, --cooling Run with cooling (also switches on --temperature).
-D, --drift-all Always drift all particles even the ones
far from active particles. This emulates
Gadget-[23] and GIZMO's default behaviours.
-F, --star-formation Run with star formation.
-F, --star-formation Run with star formation.
-g, --external-gravity Run with an external gravitational potential.
-G, --self-gravity Run with self-gravity.
-M, --multipole-reconstruction Reconstruct the multipoles every time-step.
-s, --hydro Run with hydrodynamics.
-S, --stars Run with stars.
-B, --black-holes Run with black holes.
-k, --sinks Run with sink particles.
-k, --sinks Run with sink particles.
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
......@@ -42,19 +42,26 @@ can be found by typing ``./swift -h``:
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
--logger Run with the particle logger.
--logger Run with the particle logger.
-R, --radiation Run with radiative transfer. Work in
progress, currently has no effect.
Simulation meta-options:
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--quick-lyman-alpha Run with all the options needed for the
quick Lyman-alpha model. This is equivalent
to --hydro --self-gravity --stars --star-formation
--cooling.
--eagle Run with all the options needed for the
EAGLE model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback
--black-holes --fof.
--gear Run with all the options needed for the
GEAR model. This is equivalent to --hydro
--limiter --sync --self-gravity --stars
--star-formation --cooling --feedback.
Control options:
-a, --pin Pin runners using processor affinity.
......@@ -82,12 +89,15 @@ can be found by typing ``./swift -h``:
-T, --timers=<int> Print timers every time-step.
-v, --verbose=<int> Run in verbose mode, in MPI mode 2 outputs
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-y, --task-dumps=<int> Time-step frequency at which task graphs
are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
--dump-tasks-threshold=<flt> Fraction of the total step's time spent
in a task to trigger a dump of the task plot
on this step
See the file examples/parameter_example.yml for an example of parameter file.
......@@ -177,6 +177,7 @@ int main(int argc, char *argv[]) {
int with_eagle = 0;
int with_gear = 0;
int with_line_of_sight = 0;
int with_rt = 0;
int verbose = 0;
int nr_threads = 1;
int with_verbose_timers = 0;
......@@ -241,6 +242,10 @@ int main(int argc, char *argv[]) {
NULL, 0, 0),
OPT_BOOLEAN(0, "logger", &with_logger, "Run with the particle logger.",
NULL, 0, 0),
OPT_BOOLEAN('R', "radiation", &with_rt,
"Run with radiative transfer. Work in progress, currently "
"has no effect.",
NULL, 0, 0),
OPT_GROUP(" Simulation meta-options:\n"),
OPT_BOOLEAN(0, "quick-lyman-alpha", &with_qla,
......@@ -558,6 +563,23 @@ int main(int argc, char *argv[]) {
return 1;
}
#ifdef RT_NONE
if (with_rt) {
error("Running with radiative transfer but compiled without it!");
}
#else
if (with_rt && !with_hydro) {
error(
"Error: Cannot use radiative transfer without gas, --hydro must be "
"chosen\n");
}
if (with_rt && !with_stars) {
error(
"Error: Cannot use radiative transfer without stars, --stars must be "
"chosen\n");
}
#endif
/* Let's pin the main thread, now we know if affinity will be used. */
#if defined(HAVE_SETAFFINITY) && defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
if (with_aff &&
......@@ -1277,6 +1299,7 @@ int main(int argc, char *argv[]) {
if (with_logger) engine_policies |= engine_policy_logger;
if (with_line_of_sight) engine_policies |= engine_policy_line_of_sight;
if (with_sink) engine_policies |= engine_policy_sink;
if (with_rt) engine_policies |= engine_policy_rt;
/* Initialize the engine with the space and policies. */
if (myrank == 0) clocks_gettime(&tic);
......
......@@ -129,7 +129,8 @@ const char *engine_policy_names[] = {"none",
"time-step sync",
"logger",
"line of sight",
"sink"};
"sink",
"rt"};
/** The rank of the engine as a global variable (for messages). */
int engine_rank;
......
......@@ -82,8 +82,9 @@ enum engine_policy {
engine_policy_logger = (1 << 23),
engine_policy_line_of_sight = (1 << 24),
engine_policy_sink = (1 << 25),
engine_policy_rt = (1 << 26),
};
#define engine_maxpolicy 26
#define engine_maxpolicy 27
extern const char *engine_policy_names[engine_maxpolicy + 1];
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment