From a7ea880d0a6bdf74aabbc01eb36a4df27ebb2a12 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 11 Sep 2012 21:12:06 +0000 Subject: [PATCH] Refs trac:3309 * Minor man page tweaks * Use existing ompi_mpi_thread_requested global This commit was SVN r27308. The following Trac tickets were found above: Ticket 3309 --> https://svn.open-mpi.org/trac/ompi/ticket/3309 --- ompi/info/info.c | 44 +++++++++++++----------------- ompi/mpi/man/man3/MPI_Info_env.3in | 20 ++++++++++---- ompi/runtime/ompi_mpi_init.c | 4 +-- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ompi/info/info.c b/ompi/info/info.c index 7c7651488f..723125bd57 100644 --- a/ompi/info/info.c +++ b/ompi/info/info.c @@ -47,6 +47,7 @@ #include "opal/util/strncpy.h" #include "ompi/info/info.h" +#include "ompi/runtime/mpiruntime.h" #include "ompi/runtime/params.h" @@ -161,33 +162,26 @@ int ompi_info_init(void) } /* provide the REQUESTED thread level - may be different - * than the ACTUAL thread level you get - */ - if (NULL != (cptr = getenv("OMPI_REQUESTED_THREAD_LEVEL"))) { - /* harvest the integer */ - lvl = strtol(cptr, NULL, 10); - /* ugly, but have to do a switch to find the string representation */ - switch(lvl) { - case MPI_THREAD_SINGLE: - ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_SINGLE"); - break; - case MPI_THREAD_FUNNELED: - ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_FUNNELED"); - break; - case MPI_THREAD_SERIALIZED: - ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_SERIALIZED"); - break; - case MPI_THREAD_MULTIPLE: - ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_MULTIPLE"); - break; - default: - /* do nothing - don't know the value */ - break; - } + * than the ACTUAL thread level you get. + * ugly, but have to do a switch to find the string representation */ + switch (ompi_mpi_thread_requested) { + case MPI_THREAD_SINGLE: + ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_SINGLE"); + break; + case MPI_THREAD_FUNNELED: + ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_FUNNELED"); + break; + case MPI_THREAD_SERIALIZED: + ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_SERIALIZED"); + break; + case MPI_THREAD_MULTIPLE: + ompi_info_set(&ompi_mpi_info_env.info, "thread_level", "MPI_THREAD_MULTIPLE"); + break; + default: + /* do nothing - don't know the value */ + break; } - - /**** now some OMPI-specific values that other MPIs may not provide ****/ /* the number of app_contexts in this job */ diff --git a/ompi/mpi/man/man3/MPI_Info_env.3in b/ompi/mpi/man/man3/MPI_Info_env.3in index 31e72c010d..e0926df59f 100644 --- a/ompi/mpi/man/man3/MPI_Info_env.3in +++ b/ompi/mpi/man/man3/MPI_Info_env.3in @@ -19,13 +19,13 @@ argv The argv given for the application. If no arguments are passed to the application, then this value will not be set. It will also not be set in the case of a singleton that calls MPI_Init with NULL parameters, or a Fortran program. .TP 1i maxprocs -The number of processes in the job +The number of processes in the job. .TP 1i soft -Open MPI does not support the \fIsoft\fP option for specifying the number of processes to be executed, so this value is set to the same as \fImaxprocs\fP +Open MPI does not support the \fIsoft\fP option for specifying the number of processes to be executed, so this value is set to the same as \fImaxprocs\fP. .TP 1i host -The name of the host this process is executing upon - the value returned from \fIgethostname()\fP +The name of the host this process is executing upon - the value returned from \fIgethostname()\fP. .TP 1i arch The architecture of the host this process is executing upon. This value indicates the underlying chip architecture (e.g., x86_64), if it can be determined. @@ -40,17 +40,25 @@ thread_level The requested MPI thread level - note that this may differ from the \fIactual\fP MPI thread level of the application. .TP 1i ompi_num_apps -The number of application contexts in an MPMD job +The number of application contexts in an MPMD job. +This is an Open MPI-specific field and value. .TP 1i ompi_np -The number of processes in each application context, provided as a space-delimited list of integers +The number of processes in each application context, provided as a space-delimited list of integers. +This is an Open MPI-specific field and value. .TP 1i ompi_first_rank The MPI rank of the first process in each application context, provided as a space-delimited list of integers +This is an Open MPI-specific field and value. .TP 1i ompi_positioned_file_dir If Open MPI was asked to pre-position files, this field provides the top-level directory where those files were place. +This is an Open MPI-specific field and value. .SH ERRORS -The \fIflag\fP parameter will be set to zero (false) if a value for the field has not been set. +When calling MPI_INFO_GET(3), the \fIflag\fP parameter will be set to zero (false) if a value for the field has not been set. .br + +.SH SEE ALSO +.ft r +MPI_Info_get diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 3ec06b40dd..c474f75dbd 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -324,7 +324,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) char *event_val = NULL; bool orte_setup = false; orte_grpcomm_collective_t *coll; - char *cmd=NULL, *av=NULL, *tv=NULL; + char *cmd=NULL, *av=NULL; /* bitflag of the thread level support provided. To be used * for the modex in order to work in heterogeneous environments. */ @@ -400,8 +400,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) free(tmp); putenv(av); } - asprintf(&tv, "OMPI_REQUESTED_THREAD_LEVEL=%d", requested); - putenv(tv); /* Setup ORTE - note that we are an MPI process */ if (ORTE_SUCCESS != (ret = orte_init(NULL, NULL, ORTE_PROC_MPI))) {