diff --git a/README b/README index 59c362415a9199d08fb6dfbb1ed044c66e647254..a010c4595a6e3a113879659390b373553c6e07d3 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 0a3e1cbdfa02642048a94a7dc8d78528b3f24324..a35cf8776c78b6cc7fcab40163fea0b9ea8f1439 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;