1
1
- app->num_procs changed to a size_t, which hosed the initialization
  of its value to -1 (not sure why the compiler didn't complain
  #$%@#$%), which was there to catch the case when the user forgot to
  specify -np (or some other equivalent).  Fixed.

This commit was SVN r5672.
Этот коммит содержится в:
Jeff Squyres 2005-05-10 17:14:53 +00:00
родитель 5d1e2c53b0
Коммит f8b1e19076
2 изменённых файлов: 28 добавлений и 7 удалений

Просмотреть файл

@ -60,3 +60,17 @@ following process:
You must specify how many processes to launch, either via the -np
argument or by using the mapping argument (the C, N, cX, and/or nX
nomenclature).
[orterun:nothing-to-do]
%s could not find anything to do.
It is possible that you forgot to specify how many processes to run,
perhaps via the "-np" or "N" or "C" arguments.
[orterun:syscall-failed]
%s encountered a system call failure. This should not happen, and
usually indicates an error within the operating system itself.
Specifically, the following error occurred:
%s
The only other available information that may be helpful is the errno
that was returned: %d.

Просмотреть файл

@ -86,7 +86,7 @@ struct globals_t {
bool exit;
bool no_wait_for_job_completion;
bool debug;
int num_procs;
size_t num_procs;
int exit_status;
char *hostfile;
char *env_val;
@ -221,10 +221,17 @@ int main(int argc, char *argv[], char* env[])
pointers */
num_apps = ompi_pointer_array_get_size(&apps_pa);
if (0 == num_apps) {
/* This should never happen -- this case should be caught in
create_app(), but let's just double check... */
ompi_show_help("help-orterun.txt", "orterun:nothing-to-do",
orterun_basename);
exit(1);
}
apps = malloc(sizeof(orte_app_context_t *) * num_apps);
if (NULL == apps) {
/* JMS show_help */
ompi_output(0, "%s: malloc failed", orterun_basename);
ompi_show_help("help-orterun.txt", "orterun:syscall-failed",
orterun_basename, "malloc returned NULL", errno);
exit(1);
}
for (j = i = 0; i < num_apps; ++i) {
@ -234,8 +241,8 @@ int main(int argc, char *argv[], char* env[])
}
proc_infos = malloc(sizeof(struct proc_info_t) * j);
if (NULL == proc_infos) {
/* JMS show_help */
ompi_output(0, "%s: malloc failed", orterun_basename);
ompi_show_help("help-orterun.txt", "orterun:syscall-failed",
orterun_basename, "malloc returned NULL", errno);
exit(1);
}
for (i = 0; i < j; ++i) {
@ -511,7 +518,7 @@ static int init_globals(void)
false,
false,
false,
-1,
0,
0,
NULL,
NULL,
@ -869,7 +876,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
/* If the user didn't specify a num procs or any map data, then we
really have no idea what the launch... */
if (app->num_procs <= 0 && !map_data) {
if (app->num_procs == 0 && !map_data) {
ompi_show_help("help-orterun.txt", "orterun:num-procs-unspecified",
true, orterun_basename, app->argv[0]);
rc = ORTE_ERR_BAD_PARAM;