Skip to content

Commit

Permalink
Rename --threads long option of -j to --processors
Browse files Browse the repository at this point in the history
  • Loading branch information
niclas committed Aug 27, 2021
1 parent 59e9bc2 commit 32fd00d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mxqsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void print_usage(void)
" Scheduling is done based on the resources a job needs and\n"
" on the priority given to the job.\n"
"\n"
" -j, --threads=NUMBER set number of threads (default: 1)\n"
" -j, --processors=NUMBER set number of processors (default: 1)\n"
" -m, --memory=SIZE set amount of memory (default: 2G)\n"
" --tmpdir=SIZE set size of MXQ_JOB_TMPDIR (default: 0)\n"
" --blacklist=STRING set list of blacklisted servers (default: '')\n"
Expand Down Expand Up @@ -754,7 +754,8 @@ int main(int argc, char *argv[])
MX_OPTION_REQUIRED_ARG("umask", 'u'),
MX_OPTION_REQUIRED_ARG("priority", 'p'),

MX_OPTION_REQUIRED_ARG("threads", 'j'),
MX_OPTION_REQUIRED_ARG("threads", 1),
MX_OPTION_REQUIRED_ARG("processors", 'j'),
MX_OPTION_REQUIRED_ARG("memory", 'm'),
MX_OPTION_REQUIRED_ARG("runtime", 't'),

Expand Down Expand Up @@ -896,9 +897,10 @@ int main(int argc, char *argv[])
}
break;

case 1:
case 'j':
if (mx_strtou16(optctl.optarg, &arg_threads) < 0) {
mx_log_crit("--threads '%s': %m", optctl.optarg);
mx_log_crit("--processors '%s': %m", optctl.optarg);
exit(EX_CONFIG);
}
break;
Expand Down

0 comments on commit 32fd00d

Please sign in to comment.