1
1

* Minor touch-ups to ompi/info/info.c to distinguish between keys and

vals.
 * Note that the pre-defined Info objects don't need to have fortran
   indexes assigned; they should already be assigned in the
   constructor.  So add an assert() to ensure that this really happens
   properly. 
 * Add MPI_ENV_INFO to the Fortran interfaces

This commit was SVN r27039.
Этот коммит содержится в:
Jeff Squyres 2012-08-14 23:05:41 +00:00
родитель 229e3f9b2a
Коммит 5594c90fce
4 изменённых файлов: 13 добавлений и 7 удалений

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

@ -185,6 +185,8 @@ $handles->{MPI_OFFSET} = 67;
$handles->{MPI_MESSAGE_NO_PROC} = 1;
$handles->{MPI_INFO_ENV} = 1;
#----------------------------------------------------------------------------
my $io_handles;

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

@ -39,6 +39,7 @@
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#include <assert.h>
#include "opal/util/argv.h"
#include "opal/util/opal_getcwd.h"
@ -95,7 +96,7 @@ opal_pointer_array_t ompi_info_f_to_c_table;
*/
int ompi_info_init(void)
{
char tmp[MPI_MAX_INFO_KEY];
char val[MPI_MAX_INFO_VAL];
char *cptr;
/* initialize table */
@ -108,11 +109,11 @@ int ompi_info_init(void)
/* Create MPI_INFO_NULL */
OBJ_CONSTRUCT(&ompi_mpi_info_null.info, ompi_info_t);
ompi_mpi_info_null.info.i_f_to_c_index = 0;
assert(ompi_mpi_info_null.info.i_f_to_c_index == 0);
/* Create MPI_INFO_ENV */
OBJ_CONSTRUCT(&ompi_mpi_info_env.info, ompi_info_t);
ompi_mpi_info_env.info.i_f_to_c_index = 1;
assert(ompi_mpi_info_env.info.i_f_to_c_index == 1);
/* fill the env info object */
@ -137,8 +138,8 @@ int ompi_info_init(void)
#endif
/* local host name */
gethostname(tmp, MPI_MAX_INFO_KEY);
ompi_info_set(&ompi_mpi_info_env.info, "host", tmp);
gethostname(val, MPI_MAX_INFO_VAL);
ompi_info_set(&ompi_mpi_info_env.info, "host", val);
/* architecture name */
if (NULL != (cptr = getenv("OMPI_MCA_orte_cpu_type"))) {
@ -154,8 +155,8 @@ int ompi_info_init(void)
#endif
/* working directory of this process */
opal_getcwd(tmp, MPI_MAX_INFO_KEY);
ompi_info_set(&ompi_mpi_info_env.info, "wdir", tmp);
opal_getcwd(val, MPI_MAX_INFO_VAL);
ompi_info_set(&ompi_mpi_info_env.info, "wdir", val);
/* the number of app_contexts in this job */
if (NULL != (cptr = getenv("OMPI_NUM_APP_CTX"))) {

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

@ -104,6 +104,8 @@ module mpi_f08_types
type(MPI_Message), protected, bind(C, name="ompi_f08_mpi_message_no_proc") :: MPI_MESSAGE_NO_PROC
type(MPI_Info), protected, bind(C, name="ompi_f08_mpi_info_env") :: MPI_INFO_ENV
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_max" ) :: MPI_MAX
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_min" ) :: MPI_MIN
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_sum" ) :: MPI_SUM

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

@ -26,6 +26,7 @@ OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_empty = {OMPI_MPI
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_are_fatal = {OMPI_MPI_ERRORS_ARE_FATAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_return = {OMPI_MPI_ERRORS_RETURN};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_message_no_proc = {OMPI_MPI_MESSAGE_NO_PROC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_info_env = {OMPI_MPI_INFO_ENV};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_max = {OMPI_MPI_MAX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_min = {OMPI_MPI_MIN};