2013-09-27 01:56:20 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2004-01-10 11:20:36 +03:00
|
|
|
/*
|
2010-07-30 22:59:34 +04:00
|
|
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2007-12-21 09:02:00 +03:00
|
|
|
* Copyright (c) 2004-2007 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
2009-02-24 20:17:33 +03:00
|
|
|
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
2013-09-27 01:56:20 +04:00
|
|
|
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
|
2012-08-12 05:28:23 +04:00
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
2013-09-27 01:56:20 +04:00
|
|
|
*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Additional copyrights may follow
|
2013-09-27 01:56:20 +04:00
|
|
|
*
|
2004-01-10 11:20:36 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#ifndef OMPI_INFO_H
|
|
|
|
#define OMPI_INFO_H
|
2004-01-10 11:20:36 +03:00
|
|
|
|
2009-03-04 18:35:54 +03:00
|
|
|
#include "ompi_config.h"
|
2004-02-10 03:09:36 +03:00
|
|
|
#include <string.h>
|
|
|
|
|
2004-01-10 11:20:36 +03:00
|
|
|
#include "mpi.h"
|
2005-07-03 20:22:16 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
2007-12-21 09:02:00 +03:00
|
|
|
#include "opal/class/opal_pointer_array.h"
|
2005-07-04 02:45:48 +04:00
|
|
|
#include "opal/threads/mutex.h"
|
2004-02-04 01:03:22 +03:00
|
|
|
|
2004-01-10 11:20:36 +03:00
|
|
|
|
2004-02-02 01:27:22 +03:00
|
|
|
/**
|
2004-08-12 20:56:24 +04:00
|
|
|
* \internal
|
2004-06-07 19:33:53 +04:00
|
|
|
* ompi_info_t structure. MPI_Info is a pointer to this structure
|
2004-02-02 01:27:22 +03:00
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
struct ompi_info_t {
|
2013-09-27 01:56:20 +04:00
|
|
|
opal_list_t super;
|
2004-08-12 20:56:24 +04:00
|
|
|
/**< generic list pointer which is the container for (key,value)
|
|
|
|
pairs */
|
2013-09-27 01:56:20 +04:00
|
|
|
int i_f_to_c_index;
|
2004-08-12 20:56:24 +04:00
|
|
|
/**< fortran handle for info. This is needed for translation from
|
|
|
|
fortran to C and vice versa */
|
2005-07-04 02:45:48 +04:00
|
|
|
opal_mutex_t *i_lock;
|
2004-08-12 20:56:24 +04:00
|
|
|
/**< Mutex for thread safety */
|
|
|
|
bool i_freed;
|
|
|
|
/**< Whether this info has been freed or not */
|
2004-01-10 20:10:29 +03:00
|
|
|
};
|
2004-08-12 20:56:24 +04:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
typedef struct ompi_info_t ompi_info_t;
|
2004-01-10 11:20:36 +03:00
|
|
|
|
2009-02-24 20:17:33 +03:00
|
|
|
/**
|
|
|
|
* Padded struct to maintain back compatibiltiy.
|
|
|
|
* See ompi/communicator/communicator.h comments with struct ompi_communicator_t
|
|
|
|
* for full explanation why we chose the following padding construct for predefines.
|
|
|
|
*/
|
|
|
|
#define PREDEFINED_INFO_PAD (sizeof(void*) * 32)
|
|
|
|
|
|
|
|
struct ompi_predefined_info_t {
|
|
|
|
struct ompi_info_t info;
|
|
|
|
char padding[PREDEFINED_INFO_PAD - sizeof(ompi_info_t)];
|
|
|
|
};
|
|
|
|
typedef struct ompi_predefined_info_t ompi_predefined_info_t;
|
|
|
|
|
|
|
|
|
2004-02-02 01:27:22 +03:00
|
|
|
/**
|
2004-08-12 20:56:24 +04:00
|
|
|
* \internal
|
|
|
|
*
|
2004-06-07 19:33:53 +04:00
|
|
|
* ompi_info_entry_t object. Each item in ompi_info_list is of this
|
2004-02-02 01:27:22 +03:00
|
|
|
* type. It contains (key,value) pairs
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
struct ompi_info_entry_t {
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t super; /**< required for opal_list_t type */
|
2004-02-04 01:03:22 +03:00
|
|
|
char *ie_value; /**< value part of the (key, value) pair.
|
2004-02-02 01:27:22 +03:00
|
|
|
* Maximum length is MPI_MAX_INFO_VAL */
|
2004-02-04 01:03:22 +03:00
|
|
|
char ie_key[MPI_MAX_INFO_KEY + 1]; /**< "key" part of the (key, value)
|
2013-09-27 01:56:20 +04:00
|
|
|
* pair */
|
2004-02-02 01:27:22 +03:00
|
|
|
};
|
2004-08-12 20:56:24 +04:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
2004-06-07 19:33:53 +04:00
|
|
|
typedef struct ompi_info_entry_t ompi_info_entry_t;
|
2004-02-02 01:27:22 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
BEGIN_C_DECLS
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Table for Fortran <-> C translation table
|
2013-09-27 01:56:20 +04:00
|
|
|
*/
|
2007-12-21 09:02:00 +03:00
|
|
|
extern opal_pointer_array_t ompi_info_f_to_c_table;
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Global instance for MPI_INFO_NULL
|
|
|
|
*/
|
2009-02-24 20:17:33 +03:00
|
|
|
OMPI_DECLSPEC extern ompi_predefined_info_t ompi_mpi_info_null;
|
2004-08-12 20:56:24 +04:00
|
|
|
|
== Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
1. The mpi module has been re-implemented and is significantly "mo' bettah"
1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module
This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.
== More details ==
Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation. We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.
Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:
* Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
* The Fortran J3 committee
* Tobias Burnus/gfortran
* Tony !Goetz/Absoft
* Terry !Donte/Oracle
* ...and probably others whom I'm forgetting :-(
There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.
Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module. gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module. The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations. This will take some time.
As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist. All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:
{{{
ompi/mpi/fortran/
base/ - glue code
mpif-h/ - what used to be ompi/mpi/f77
use-mpi-tkr/ - what used to be ompi/mpi/f90
use-mpi-ignore-tkr/ - new mpi module implementation
use-mpi-f08/ - new mpi_f08 module implementation
}}}
There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet. We did that to prove it to ourselves that it could be done once the compilers fully support it. This directory/implementation will likely eventually replace the use-mpi-f08 version.
Other things that were done:
* ompi_info grew a few new output fields to describe what level of Fortran support is included
* Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
* The old Fortran MPI libraries were renamed:
* libmpi_f77 -> libmpi_mpifh
* libmpi_f90 -> libmpi_usempi
* The configury for Fortran was consolidated and significantly slimmed down. Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}
All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket. This branch has got to be one of OMPI's longest-running branches. Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old! :-) We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).
I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base. We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.
This commit was SVN r26283.
2012-04-18 19:57:29 +04:00
|
|
|
/**
|
|
|
|
* Symbol for Fortran 03 bindings to bind to
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC extern ompi_predefined_info_t *ompi_mpi_info_null_addr;
|
|
|
|
|
2012-08-12 05:28:23 +04:00
|
|
|
/**
|
2012-08-12 09:00:57 +04:00
|
|
|
* Global instance for MPI_INFO_ENV
|
2012-08-12 05:28:23 +04:00
|
|
|
*/
|
2012-08-12 09:00:57 +04:00
|
|
|
OMPI_DECLSPEC extern ompi_predefined_info_t ompi_mpi_info_env;
|
2012-08-12 05:28:23 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
* Some declarations needed to use OBJ_NEW and OBJ_DESTRUCT macros
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_info_t);
|
2004-02-04 01:03:22 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* \internal
|
|
|
|
* Some declarations needed to use OBJ_NEW and OBJ_DESTRUCT macros
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_info_entry_t);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* This function is invoked during ompi_mpi_init() and sets up
|
|
|
|
* MPI_Info handling.
|
|
|
|
*/
|
2012-08-14 02:13:49 +04:00
|
|
|
int ompi_info_init(void);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* This functions is called during ompi_mpi_finalize() and shuts
|
|
|
|
* down MPI_Info handling.
|
|
|
|
*/
|
|
|
|
int ompi_info_finalize(void);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* ompi_info_dup - Duplicate an 'MPI_Info' object
|
|
|
|
*
|
|
|
|
* @param info source info object (handle)
|
|
|
|
* @param newinfo pointer to the new info object (handle)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS upon success
|
|
|
|
* @retval MPI_ERR_NO_MEM if out of memory
|
|
|
|
*
|
|
|
|
* Not only will the (key, value) pairs be duplicated, the order
|
|
|
|
* of keys will be the same in 'newinfo' as it is in 'info'. When
|
|
|
|
* an info object is no longer being used, it should be freed with
|
|
|
|
* 'MPI_Info_free'.
|
|
|
|
*/
|
|
|
|
int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set a new key,value pair on info.
|
|
|
|
*
|
|
|
|
* @param info pointer to ompi_info_t object
|
|
|
|
* @param key pointer to the new key object
|
|
|
|
* @param value pointer to the new value object
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS upon success
|
|
|
|
* @retval MPI_ERR_NO_MEM if out of memory
|
|
|
|
*/
|
2014-03-12 03:50:09 +04:00
|
|
|
OMPI_DECLSPEC int ompi_info_set (ompi_info_t *info, const char *key, const char *value);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* ompi_info_free - Free an 'MPI_Info' object.
|
|
|
|
*
|
|
|
|
* @param info pointer to info (ompi_info_t *) object to be freed (handle)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_ARG
|
|
|
|
*
|
|
|
|
* Upon successful completion, 'info' will be set to
|
|
|
|
* 'MPI_INFO_NULL'. Free the info handle and all of its keys and
|
|
|
|
* values.
|
|
|
|
*/
|
|
|
|
int ompi_info_free (ompi_info_t **info);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
/**
|
|
|
|
* Get a (key, value) pair from an 'MPI_Info' object and assign it
|
|
|
|
* into a boolen output.
|
|
|
|
*
|
|
|
|
* @param info Pointer to ompi_info_t object
|
|
|
|
* @param key null-terminated character string of the index key
|
|
|
|
* @param value Boolean output value
|
|
|
|
* @param flag true (1) if 'key' defined on 'info', false (0) if not
|
|
|
|
* (logical)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
*
|
|
|
|
* If found, the string value will be cast to the boolen output in
|
|
|
|
* the following manner:
|
|
|
|
*
|
|
|
|
* - If the string value is digits, the return value is "(bool)
|
|
|
|
* atoi(value)"
|
|
|
|
* - If the string value is (case-insensitive) "yes" or "true", the
|
|
|
|
* result is true
|
|
|
|
* - If the string value is (case-insensitive) "no" or "false", the
|
|
|
|
* result is false
|
|
|
|
* - All other values are false
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_info_get_bool (ompi_info_t *info, char *key, bool *value,
|
|
|
|
int *flag);
|
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Get a (key, value) pair from an 'MPI_Info' object
|
|
|
|
*
|
|
|
|
* @param info Pointer to ompi_info_t object
|
|
|
|
* @param key null-terminated character string of the index key
|
|
|
|
* @param valuelen maximum length of 'value' (integer)
|
|
|
|
* @param value null-terminated character string of the value
|
|
|
|
* @param flag true (1) if 'key' defined on 'info', false (0) if not
|
|
|
|
* (logical)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
*
|
|
|
|
* In C and C++, 'valuelen' should be one less than the allocated
|
|
|
|
* space to allow for for the null terminator.
|
|
|
|
*/
|
2013-09-27 01:56:20 +04:00
|
|
|
OMPI_DECLSPEC int ompi_info_get (ompi_info_t *info, const char *key, int valuelen,
|
2008-02-28 04:57:57 +03:00
|
|
|
char *value, int *flag);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Delete a (key,value) pair from "info"
|
|
|
|
*
|
|
|
|
* @param info ompi_info_t pointer on which we need to operate
|
|
|
|
* @param key The key portion of the (key,value) pair that
|
|
|
|
* needs to be deleted
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_NOKEY
|
|
|
|
*/
|
2013-09-27 01:56:20 +04:00
|
|
|
int ompi_info_delete (ompi_info_t *info, const char *key);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* @param info - ompi_info_t pointer object (handle)
|
|
|
|
* @param key - null-terminated character string of the index key
|
|
|
|
* @param valuelen - length of the value associated with 'key' (integer)
|
|
|
|
* @param flag - true (1) if 'key' defined on 'info', false (0) if not
|
|
|
|
* (logical)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_ARG
|
|
|
|
* @retval MPI_ERR_INFO_KEY
|
|
|
|
*
|
|
|
|
* The length returned in C and C++ does not include the end-of-string
|
|
|
|
* character. If the 'key' is not found on 'info', 'valuelen' is left
|
|
|
|
* alone.
|
|
|
|
*/
|
2013-09-27 01:56:20 +04:00
|
|
|
OMPI_DECLSPEC int ompi_info_get_valuelen (ompi_info_t *info, const char *key, int *valuelen,
|
|
|
|
int *flag);
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* ompi_info_get_nthkey - Get a key indexed by integer from an 'MPI_Info' o
|
|
|
|
*
|
|
|
|
* @param info Pointer to ompi_info_t object
|
|
|
|
* @param n index of key to retrieve (integer)
|
|
|
|
* @param key character string of at least 'MPI_MAX_INFO_KEY' characters
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_ARG
|
|
|
|
*/
|
|
|
|
int ompi_info_get_nthkey (ompi_info_t *info, int n, char *key);
|
2006-01-28 18:38:37 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Convert value string to boolean
|
|
|
|
*
|
|
|
|
* Convert value string \c value into a boolean, using the
|
|
|
|
* interpretation rules specified in MPI-2 Section 4.10. The
|
|
|
|
* strings "true", "false", and integer numbers can be converted
|
|
|
|
* into booleans. All others will return \c OMPI_ERR_BAD_PARAM
|
|
|
|
*
|
|
|
|
* @param value Value string for info key to interpret
|
|
|
|
* @param interp returned interpretation of the value key
|
|
|
|
*
|
|
|
|
* @retval OMPI_SUCCESS string was successfully interpreted
|
|
|
|
* @retval OMPI_ERR_BAD_PARAM string was not able to be interpreted
|
|
|
|
*/
|
2008-03-05 15:46:59 +03:00
|
|
|
OMPI_DECLSPEC int ompi_info_value_to_bool(char *value, bool *interp);
|
2006-01-28 18:38:37 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
/**
|
|
|
|
* Convert value string to integer
|
|
|
|
*
|
|
|
|
* Convert value string \c value into a integer, using the
|
2013-09-27 01:56:20 +04:00
|
|
|
* interpretation rules specified in MPI-2 Section 4.10.
|
2007-12-21 09:02:00 +03:00
|
|
|
* All others will return \c OMPI_ERR_BAD_PARAM
|
|
|
|
*
|
|
|
|
* @param value Value string for info key to interpret
|
|
|
|
* @param interp returned interpretation of the value key
|
|
|
|
*
|
|
|
|
* @retval OMPI_SUCCESS string was successfully interpreted
|
|
|
|
* @retval OMPI_ERR_BAD_PARAM string was not able to be interpreted
|
|
|
|
*/
|
2007-12-21 18:06:59 +03:00
|
|
|
int ompi_info_value_to_int(char *value, int *interp);
|
2004-02-04 01:03:22 +03:00
|
|
|
|
2007-12-21 09:02:00 +03:00
|
|
|
END_C_DECLS
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2004-02-04 01:03:22 +03:00
|
|
|
/**
|
2004-08-12 20:56:24 +04:00
|
|
|
* Return whether this info has been freed already or not.
|
2004-02-04 01:03:22 +03:00
|
|
|
*
|
2004-08-12 20:56:24 +04:00
|
|
|
* @param info Pointer to ompi_info_t object.
|
2004-02-04 01:03:22 +03:00
|
|
|
*
|
2004-08-12 20:56:24 +04:00
|
|
|
* @retval true If the info has already been freed
|
|
|
|
* @retval false If the info has not yet been freed
|
2004-02-04 01:03:22 +03:00
|
|
|
*
|
2004-08-12 20:56:24 +04:00
|
|
|
* If the info has been freed, return true. This will likely only
|
|
|
|
* happen in a reliable manner if ompi_debug_handle_never_free is
|
|
|
|
* true, in which case an extra OBJ_RETAIN is set on the object during
|
|
|
|
* OBJ_NEW, meaning that the user will never be able to actually free
|
|
|
|
* the underlying object. It's a good way to find out if a process is
|
|
|
|
* unintentionally using a freed handle.
|
2004-02-04 01:03:22 +03:00
|
|
|
*/
|
2004-08-12 20:56:24 +04:00
|
|
|
static inline bool ompi_info_is_freed(ompi_info_t *info)
|
|
|
|
{
|
|
|
|
return info->i_freed;
|
2004-02-04 01:03:22 +03:00
|
|
|
}
|
|
|
|
|
2004-08-12 20:56:24 +04:00
|
|
|
|
2004-02-11 18:30:51 +03:00
|
|
|
/**
|
|
|
|
* Get the number of keys defined on on an MPI_Info object
|
2004-06-07 19:33:53 +04:00
|
|
|
* @param info Pointer to ompi_info_t object.
|
2004-02-11 18:30:51 +03:00
|
|
|
* @param nkeys Pointer to nkeys, which needs to be filled up.
|
|
|
|
*
|
|
|
|
* @retval The number of keys defined on info
|
|
|
|
*/
|
2013-09-27 01:56:20 +04:00
|
|
|
static inline int
|
|
|
|
ompi_info_get_nkeys(ompi_info_t *info, int *nkeys)
|
2004-08-12 20:56:24 +04:00
|
|
|
{
|
2005-07-03 20:22:16 +04:00
|
|
|
*nkeys = (int) opal_list_get_size(&(info->super));
|
2004-02-11 18:30:51 +03:00
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#endif /* OMPI_INFO_H */
|