From e48bdf1c007f9f85062504ee936d538504d0a881 Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Wed, 1 Jun 2016 10:54:08 +0100 Subject: [PATCH] Disable processor affinity by default, this is less surprising more often --- README | 1 + examples/main.c | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README b/README index 59c362415a..a010c4595a 100644 --- a/README +++ b/README @@ -14,6 +14,7 @@ See INSTALL.swift for install instructions. Usage: swift [OPTION] PARAMFILE Valid options are: + -a Pin runners using processor affinity -c Run with cosmological time integration -d Dry run. Read the parameter file, allocate memory but does not read the particles from ICs and exit before the start of time integration. diff --git a/examples/main.c b/examples/main.c index 0a3e1cbdfa..a35cf8776c 100644 --- a/examples/main.c +++ b/examples/main.c @@ -52,7 +52,7 @@ void print_help_message() { printf("\nUsage: swift [OPTION] PARAMFILE\n\n"); printf("Valid options are:\n"); - printf(" %2s %8s %s\n", "-a", "[01]", "Use processor affinity"); + printf(" %2s %8s %s\n", "-a", "", "Pin runners using processor affinity"); printf(" %2s %8s %s\n", "-c", "", "Run with cosmological time integration"); printf( " %2s %8s %s\n", "-d", "", @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) { /* Welcome to SWIFT, you made the right choice */ if (myrank == 0) greetings(); - int with_aff = 1; + int with_aff = 0; int dry_run = 0; int dump_tasks = 0; int with_cosmology = 0; @@ -148,13 +148,9 @@ int main(int argc, char *argv[]) { /* Parse the parameters */ int c; - while ((c = getopt(argc, argv, "a:cdef:gGhst:v:y:")) != -1) switch (c) { + while ((c = getopt(argc, argv, "acdef:gGhst:v:y:")) != -1) switch (c) { case 'a': - if (sscanf(optarg, "%d", &with_aff) != 1) { - if (myrank == 0) printf("Error parsing affinity switch (-a).\n"); - if (myrank == 0) print_help_message(); - return 1; - } + with_aff = 1; break; case 'c': with_cosmology = 1; -- GitLab