Skip to content
Snippets Groups Projects
Commit 53700b8b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'interleave-as-default' into 'master'

Make memory interleaving the default NUMA memory policy

See merge request swift/swiftsim!1707
parents b93baf4c ffb78897
No related branches found
No related tags found
2 merge requests!1715Update planetary strength after planetary plus's master rebase,!1707Make memory interleaving the default NUMA memory policy
......@@ -70,7 +70,7 @@ Parameters:
Control options:
-a, --pin Pin runners using processor affinity.
--interleave Interleave memory allocations across
--nointerleave Do not interleave memory allocations across
NUMA regions.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
......
......@@ -164,7 +164,7 @@ Parameters:
Control options:
-a, --pin Pin runners using processor affinity.
--interleave Interleave memory allocations across
--nointerleave Do not interleave memory allocations across
NUMA regions.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
......
......@@ -67,7 +67,7 @@ can be found by typing ``./swift -h``:
Control options:
-a, --pin Pin runners using processor affinity.
--interleave Interleave memory allocations across
--nointerleave Do not interleave memory allocations across
NUMA regions.
-d, --dry-run Dry run. Read the parameter file, allocates
memory but does not read the particles
......
......@@ -7,5 +7,5 @@ then
./getIC.sh
fi
../../../swift -v 1 --interleave --hydro --threads=4 -n 16 -y 1 eagle_6.yml | tee output.log
../../../swift -v 1 --hydro --threads=4 -n 16 -y 1 eagle_6.yml | tee output.log
......@@ -157,7 +157,8 @@ int main(int argc, char *argv[]) {
if (myrank == 0) greetings(/*fof=*/0);
int with_aff = 0;
int with_interleave = 0;
int with_nointerleave = 0;
int with_interleave = 0; /* Deprecated. */
int dry_run = 0;
int dump_tasks = 0;
int dump_cells = 0;
......@@ -286,9 +287,11 @@ int main(int argc, char *argv[]) {
OPT_GROUP(" Control options:\n"),
OPT_BOOLEAN('a', "pin", &with_aff,
"Pin runners using processor affinity.", NULL, 0, 0),
OPT_BOOLEAN(0, "nointerleave", &with_nointerleave,
"Do not interleave memory allocations across NUMA regions.",
NULL, 0, 0),
OPT_BOOLEAN(0, "interleave", &with_interleave,
"Interleave memory allocations across NUMA regions.", NULL, 0,
0),
"Deprecated option, now default", NULL, 0, 0),
OPT_BOOLEAN('d', "dry-run", &dry_run,
"Dry run. Read the parameter file, allocates memory but does "
"not read the particles from ICs. Exits before the start of "
......@@ -410,8 +413,12 @@ int main(int argc, char *argv[]) {
return 1;
}
#endif
if (with_interleave)
message("WARNING: the --interleave option is deprecated and ignored.");
#if !defined(HAVE_LIBNUMA)
if (with_interleave) {
if (!with_nointerleave || with_interleave) {
printf("Error: no NUMA support for interleaving memory\n");
return 1;
}
......@@ -657,7 +664,7 @@ int main(int argc, char *argv[]) {
#if defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
/* Set the NUMA memory policy to interleave. */
if (with_interleave) engine_numa_policies(myrank, verbose);
if (!with_nointerleave) engine_numa_policies(myrank, verbose);
#endif
/* Genesis 1.1: And then, there was time ! */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment