1
1

Add a check for now that invokes an MPI exception if you try to

SPAWN[_MULTIPLE] from a singleton (and displays a pretty help message
explaining that you need to use mpirun).  This can be removed when
fixes for ORTE come over that allow SPAWN[_MULTIPLE] from singletons. 

This commit was SVN r10898.
Этот коммит содержится в:
Jeff Squyres 2006-07-20 14:27:13 +00:00
родитель 90fc0c5cc7
Коммит 7899057d4e
4 изменённых файлов: 50 добавлений и 4 удалений

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

@ -9,6 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -16,6 +17,6 @@
# $HEADER$
#
SUBDIRS = c cxx f77 f90
dist_pkgdata_DATA = help-mpi-api.txt

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

@ -19,9 +19,9 @@
#include "ompi_config.h"
#include <stdio.h>
#include "ompi/mpi/c/bindings.h"
#include "orte/mca/oob/oob.h"
#include "opal/util/show_help.h"
#include "ompi/info/info.h"
#include "ompi/mpi/c/bindings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Comm_spawn = PMPI_Comm_spawn
@ -68,6 +68,17 @@ int MPI_Comm_spawn(char *command, char **argv, int maxprocs, MPI_Info info,
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INFO,
FUNC_NAME);
}
/* Do not allow MPI_COMM_SPAWN from a singleton. This check
will be removed when the ORTE 2.0 stuff comes over and
Makes This All Better(tm) */
if (orte_process_info.singleton) {
if (ompi_comm_rank(comm) == root) {
opal_show_help("help-mpi-api.txt", "spawn-from-singleton",
true, FUNC_NAME);
}
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}
}
rank = ompi_comm_rank ( comm );

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include <stdio.h>
#include "opal/util/show_help.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/info/info.h"
@ -75,6 +76,17 @@ int MPI_Comm_spawn_multiple(int count, char **array_of_commands, char ***array_o
FUNC_NAME);
}
}
/* Do not allow MPI_COMM_SPAWN from a singleton. This check
will be removed when the ORTE 2.0 stuff comes over and
Makes This All Better(tm) */
if (orte_process_info.singleton) {
if (ompi_comm_rank(comm) == root) {
opal_show_help("help-mpi-api.txt", "spawn-from-singleton",
true, FUNC_NAME);
}
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}
}
rank = ompi_comm_rank ( comm );

22
ompi/mpi/help-mpi-api.txt Обычный файл
Просмотреть файл

@ -0,0 +1,22 @@
# -*- text -*-
#
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the US/English general help file for Open MPI.
#
[spawn-from-singleton]
This version of Open MPI does not support %s from a
"singleton" application. Specifically, you cannot invoke an MPI
application like this:
shell$ ./a.out
and then have a.out use the MPI-2 dynamic spawn functions. Instead,
you must start your MPI application via mpirun:
shell: mpirun -np 1 ./a.out