⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmdline.c

📁 Path MPICH-V for MPICH the MPI Implementation
💻 C
📖 第 1 页 / 共 2 页
字号:
          if (args_info->n_procs_given && ! override)            continue;          local_args_info.n_procs_given = 1;          args_info->n_procs_given = 1;          args_info->n_procs_arg = strtol (optarg,&stop_char,0);          break;        case 'j':	/* unique id for the job. (default=rand).  */          if (local_args_info.jobid_given)            {              fprintf (stderr, "%s: `--jobid' (`-j') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));              goto failure;            }          if (args_info->jobid_given && ! override)            continue;          local_args_info.jobid_given = 1;          args_info->jobid_given = 1;          args_info->jobid_arg = strtol (optarg,&stop_char,0);          break;        case 'm':	/* machines file like for any MPICH device (typical deployment may use at least 3 more machines than np).  */          if (local_args_info.machines_file_given)            {              fprintf (stderr, "%s: `--machines-file' (`-m') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));              goto failure;            }          if (args_info->machines_file_given && ! override)            continue;          local_args_info.machines_file_given = 1;          args_info->machines_file_given = 1;          if (args_info->machines_file_arg)            free (args_info->machines_file_arg); /* free previous string */          args_info->machines_file_arg = gengetopt_strdup (optarg);          break;        case 'e':	/* number of event loggers.  */          if (local_args_info.n_el_given)            {              fprintf (stderr, "%s: `--n-el' (`-e') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));              goto failure;            }          if (args_info->n_el_given && ! override)            continue;          local_args_info.n_el_given = 1;          args_info->n_el_given = 1;          args_info->n_el_arg = strtol (optarg,&stop_char,0);          break;        case 'c':	/* number of checkpoint servers (default=np/5).  */          if (local_args_info.n_cs_given)            {              fprintf (stderr, "%s: `--n-cs' (`-c') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));              goto failure;            }          if (args_info->n_cs_given && ! override)            continue;          local_args_info.n_cs_given = 1;          args_info->n_cs_given = 1;          args_info->n_cs_arg = strtol (optarg,&stop_char,0);          break;        case 'd':	/* debugging options. First part is the target, second part the selection. Target may be %filename for storing in a file, or ip:[port] for sending debugs to a debug server. Selection use +label or -label to force or prevent the displaying of certain informations..  */          if (local_args_info.debug_given)            {              fprintf (stderr, "%s: `--debug' (`-d') option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));              goto failure;            }          if (args_info->debug_given && ! override)            continue;          local_args_info.debug_given = 1;          args_info->debug_given = 1;          if (args_info->debug_arg)            free (args_info->debug_arg); /* free previous string */          args_info->debug_arg = gengetopt_strdup (optarg);          break;        case 0:	/* Long option with no short option */          /* file of stable machines (machines having a high MTBF).  */          if (strcmp (long_options[option_index].name, "stable-machines-file") == 0)          {            if (local_args_info.stable_machines_file_given)              {                fprintf (stderr, "%s: `--stable-machines-file' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->stable_machines_file_given && ! override)              continue;            local_args_info.stable_machines_file_given = 1;            args_info->stable_machines_file_given = 1;            if (args_info->stable_machines_file_arg)              free (args_info->stable_machines_file_arg); /* free previous string */            args_info->stable_machines_file_arg = gengetopt_strdup (optarg);          }                    /* port for the runtime process (default=autoselect).  */          else if (strcmp (long_options[option_index].name, "runtime-port") == 0)          {            if (local_args_info.runtime_port_given)              {                fprintf (stderr, "%s: `--runtime-port' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->runtime_port_given && ! override)              continue;            local_args_info.runtime_port_given = 1;            args_info->runtime_port_given = 1;            args_info->runtime_port_arg = (short)strtol (optarg,&stop_char,0);          }                    /* port for the event logger (default=autoselect).  */          else if (strcmp (long_options[option_index].name, "el-port") == 0)          {            if (local_args_info.el_port_given)              {                fprintf (stderr, "%s: `--el-port' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->el_port_given && ! override)              continue;            local_args_info.el_port_given = 1;            args_info->el_port_given = 1;            args_info->el_port_arg = (short)strtol (optarg,&stop_char,0);          }                    /* port for the checkpoint server (default=autoselect).  */          else if (strcmp (long_options[option_index].name, "cs-port") == 0)          {            if (local_args_info.cs_port_given)              {                fprintf (stderr, "%s: `--cs-port' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->cs_port_given && ! override)              continue;            local_args_info.cs_port_given = 1;            args_info->cs_port_given = 1;            args_info->cs_port_arg = (short)strtol (optarg,&stop_char,0);          }                    /* port for the checkpoint scheduler (default=autoselect).  */          else if (strcmp (long_options[option_index].name, "sc-port") == 0)          {            if (local_args_info.sc_port_given)              {                fprintf (stderr, "%s: `--sc-port' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->sc_port_given && ! override)              continue;            local_args_info.sc_port_given = 1;            args_info->sc_port_given = 1;            args_info->sc_port_arg = (short)strtol (optarg,&stop_char,0);          }                    /* remote shell program for executing remote commands.  */          else if (strcmp (long_options[option_index].name, "rsh") == 0)          {            if (local_args_info.rsh_given)              {                fprintf (stderr, "%s: `--rsh' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->rsh_given && ! override)              continue;            local_args_info.rsh_given = 1;            args_info->rsh_given = 1;            if (args_info->rsh_arg)              free (args_info->rsh_arg); /* free previous string */            args_info->rsh_arg = gengetopt_strdup (optarg);          }                    /* working directory for running the MPI application (default=current pwd).  */          else if (strcmp (long_options[option_index].name, "working-dir") == 0)          {            if (local_args_info.working_dir_given)              {                fprintf (stderr, "%s: `--working-dir' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->working_dir_given && ! override)              continue;            local_args_info.working_dir_given = 1;            args_info->working_dir_given = 1;            if (args_info->working_dir_arg)              free (args_info->working_dir_arg); /* free previous string */            args_info->working_dir_arg = gengetopt_strdup (optarg);          }                    /* writeable directory (this directory must be writeable on all machines of the machines file and stable machines file. A local filesystem is necessary for performances).  */          else if (strcmp (long_options[option_index].name, "tmp-dir") == 0)          {            if (local_args_info.tmp_dir_given)              {                fprintf (stderr, "%s: `--tmp-dir' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->tmp_dir_given && ! override)              continue;            local_args_info.tmp_dir_given = 1;            args_info->tmp_dir_given = 1;            if (args_info->tmp_dir_arg)              free (args_info->tmp_dir_arg); /* free previous string */            args_info->tmp_dir_arg = gengetopt_strdup (optarg);          }                    /* directory with the helpers (checkpointserver, etc...) (default=same directory as vrun).  */          else if (strcmp (long_options[option_index].name, "helpers-dir") == 0)          {            if (local_args_info.helpers_dir_given)              {                fprintf (stderr, "%s: `--helpers-dir' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->helpers_dir_given && ! override)              continue;            local_args_info.helpers_dir_given = 1;            args_info->helpers_dir_given = 1;            if (args_info->helpers_dir_arg)              free (args_info->helpers_dir_arg); /* free previous string */            args_info->helpers_dir_arg = gengetopt_strdup (optarg);          }                    /* address of the master scheduler (only for multiple applications scheduling).  */          else if (strcmp (long_options[option_index].name, "master-sched") == 0)          {            if (local_args_info.master_sched_given)              {                fprintf (stderr, "%s: `--master-sched' option given more than once%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));                goto failure;              }            if (args_info->master_sched_given && ! override)              continue;            local_args_info.master_sched_given = 1;            args_info->master_sched_given = 1;            if (args_info->master_sched_arg)              free (args_info->master_sched_arg); /* free previous string */            args_info->master_sched_arg = gengetopt_strdup (optarg);          }                    break;        case '?':	/* Invalid option.  */          /* `getopt_long' already printed an error message.  */          goto failure;        default:	/* bug: option not considered.  */          fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : ""));          abort ();        } /* switch */    } /* while */  if (check_required)    {      if (! args_info->n_procs_given)        {          fprintf (stderr, "%s: '--n-procs' ('-n') option required%s\n", CMDLINE_PARSER_PACKAGE, (additional_error ? additional_error : ""));          error = 1;        }    }  if ( error )    return (EXIT_FAILURE);  if (optind < argc)    {      int i = 0 ;      args_info->inputs_num = argc - optind ;      args_info->inputs =        (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;      while (optind < argc)        args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;    }  return 0;failure:  return (EXIT_FAILURE);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -