diff --git a/README b/README index b3c32f001f123064b20cb524cb546a729a5bfce5..53b802dfab8dc6cc8d68e320d0d0b8af6b07183d 100644 --- a/README +++ b/README @@ -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 diff --git a/README.md b/README.md index bdc64676714a6fd516907d828c9b026be569cc58..a7e163e05d0bb0061e3d8e79cef7b01fb8a04c57 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/doc/RTD/source/CommandLineOptions/index.rst b/doc/RTD/source/CommandLineOptions/index.rst index 7900a90967f842769616db010208865c348e48bb..eff27aeadba821fb04774e2caa6ba071170c33c9 100644 --- a/doc/RTD/source/CommandLineOptions/index.rst +++ b/doc/RTD/source/CommandLineOptions/index.rst @@ -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 diff --git a/examples/EAGLE_low_z/EAGLE_6/run.sh b/examples/EAGLE_low_z/EAGLE_6/run.sh index f7db75e6e3667f20c8fb50003955a0f82c19a32c..1f7be1e09fd4289a904c94bb0f38912a23695db8 100755 --- a/examples/EAGLE_low_z/EAGLE_6/run.sh +++ b/examples/EAGLE_low_z/EAGLE_6/run.sh @@ -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 diff --git a/swift.c b/swift.c index 130cdc871d1865757c01ece10b5fd265061a3324..252437a599b976deb3a830e904fc9991b5b104ce 100644 --- a/swift.c +++ b/swift.c @@ -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 ! */