forked from open-mpi/ompi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
related to open-mpi#7993 Signed-off-by: Howard Pritchard <[email protected]>
- Loading branch information
Showing
22 changed files
with
363 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
.. _mpi_info_create_env: | ||
|
||
|
||
MPI_Info_create_env | ||
=================== | ||
|
||
.. include_body | ||
:ref:`MPI_Info_create_env` - Creates a new info object with the same construction as MPI_INFO_ENV as created during :ref:`MPI_Init` or :ref:`MPI_Init_thread` when the same arguments | ||
are used. | ||
|
||
|
||
SYNTAX | ||
------ | ||
|
||
|
||
C Syntax | ||
^^^^^^^^ | ||
|
||
.. code-block:: c | ||
#include <mpi.h> | ||
int MPI_Info_create_env(int argc, char *argv[], MPI_Info *info) | ||
Fortran Syntax | ||
^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: fortran | ||
USE MPI | ||
! or the older form: INCLUDE 'mpif.h' | ||
MPI_INFO_CREATE_ENV(INFO, IERROR) | ||
INTEGER INFO, IERROR | ||
Fortran 2008 Syntax | ||
^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: fortran | ||
USE mpi_f08 | ||
MPI_Info_create_env(info, ierror) | ||
TYPE(MPI_Info), INTENT(OUT) :: info | ||
INTEGER, OPTIONAL, INTENT(OUT) :: ierror | ||
OUTPUT PARAMETERS | ||
----------------- | ||
* ``info``: Info object created (handle). | ||
* ``IERROR``: Fortran only: Error status (integer). | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
:ref:`MPI_Info_create_env` creates a new info object and populates it with the same key/value pairs as are present in MPI_INFO_ENV. | ||
|
||
Note | ||
---- | ||
|
||
:ref:`MPI_Info_create_env` is one of the few functions that can be called | ||
before :ref:`MPI_Init` and after :ref:`MPI_Finalize`. | ||
|
||
ERRORS | ||
------ | ||
|
||
Almost all MPI routines return an error value; C routines as the value | ||
of the function and Fortran routines in the last argument. | ||
|
||
Before the error value is returned, the current MPI error handler is | ||
called. By default, this error handler aborts the MPI job, except for | ||
I/O function errors. The error handler may be changed with | ||
:ref:`MPI_Comm_set_errhandler`; the predefined error handler MPI_ERRORS_RETURN | ||
may be used to cause error values to be returned. Note that MPI does not | ||
guarantee that an MPI program can continue past an error. | ||
|
||
|
||
.. seealso:: | ||
:ref:`MPI_Info_delete` :ref:`MPI_Info_dup` :ref:`MPI_Info_free` :ref:`MPI_Info_get` :ref:`MPI_Info_set` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | ||
/* | ||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana | ||
* University Research and Technology | ||
* Corporation. All rights reserved. | ||
* Copyright (c) 2004-2020 The University of Tennessee and The University | ||
* of Tennessee Research Foundation. All rights | ||
* reserved. | ||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, | ||
* University of Stuttgart. All rights reserved. | ||
* Copyright (c) 2004-2005 The Regents of the University of California. | ||
* All rights reserved. | ||
* Copyright (c) 2015 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* Copyright (c) 2018-2021 Triad National Security, LLC. All rights | ||
* reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
#include "ompi_config.h" | ||
|
||
#include "ompi/mpi/c/bindings.h" | ||
#include "ompi/runtime/params.h" | ||
#include "ompi/communicator/communicator.h" | ||
#include "ompi/errhandler/errhandler.h" | ||
#include "ompi/info/info.h" | ||
|
||
#if OMPI_BUILD_MPI_PROFILING | ||
#if OPAL_HAVE_WEAK_SYMBOLS | ||
#pragma weak MPI_Info_create_env = PMPI_Info_create_env | ||
#endif | ||
#define MPI_Info_create_env PMPI_Info_create_env | ||
#endif | ||
|
||
static const char FUNC_NAME[] = "MPI_Info_create_env"; | ||
|
||
/** | ||
* Returns an info object with the same construction as MPI_INFO_ENV as created | ||
* during MPI_INIT or MPI_INIT_THREAD when the same arguments are used. | ||
* | ||
* @param argc number or arguments (Integer) | ||
* @param argv Pointer to array of arguments | ||
* @param info Pointer to the MPI_Info handle | ||
* | ||
* @retval MPI_SUCCESS | ||
* @retval MPI_ERR_INFO | ||
* @retval MPI_ERR_NO_MEM | ||
* | ||
* When an MPI_Info object is not being used, it should be freed using | ||
* MPI_Info_free | ||
*/ | ||
int MPI_Info_create_env(int argc, char *argv[], MPI_Info *info) | ||
{ | ||
int rc; | ||
ompi_info_t *the_info; | ||
|
||
if (MPI_PARAM_CHECK) { | ||
if (NULL == info) { | ||
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_INFO, | ||
FUNC_NAME); | ||
} | ||
} | ||
|
||
the_info = ompi_info_allocate (); | ||
if (NULL == the_info) { | ||
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_NO_MEM, | ||
FUNC_NAME); | ||
} | ||
|
||
*info = the_info; | ||
|
||
rc = ompi_mpiinfo_init_env(argc, argv, the_info); | ||
OMPI_ERRHANDLER_NOHANDLE_CHECK(rc, rc, FUNC_NAME); | ||
return MPI_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.