Skip to content
Snippets Groups Projects
Commit e48bdf1c authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Disable processor affinity by default, this is less surprising more often

parent 3d5f0127
No related branches found
No related tags found
1 merge request!120Simplify, permit user control over affinity
......@@ -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.
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment