Create a gist now

Instantly share code, notes, and snippets.

@RolfRabenseifner /inquiry.diff Secret
Last active Aug 29, 2015

Index: inquiry.tex
===================================================================
--- inquiry.tex (Revision 1750)
+++ inquiry.tex (Revision 2013)
@@ -24,7 +24,7 @@
%%ENDHEADER
\begin{verbatim}
#define MPI_VERSION 3
- #define MPI_SUBVERSION 0
+ #define MPI_SUBVERSION 1
\end{verbatim}
in Fortran,
%%HEADER
@@ -33,7 +33,7 @@
\begin{verbatim}
INTEGER :: MPI_VERSION, MPI_SUBVERSION
PARAMETER (MPI_VERSION = 3)
- PARAMETER (MPI_SUBVERSION = 0)
+ PARAMETER (MPI_SUBVERSION = 1)
\end{verbatim}
\noindent
@@ -46,15 +46,19 @@
\mpibind{MPI\_Get\_version(int~*version, int~*subversion)}
-\mpifnewbind{MPI\_Get\_version(version, subversion, ierror) BIND(C) \fargs INTEGER, INTENT(OUT) :: version, subversion \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Get\_version(version, subversion, ierror) \fargs INTEGER, INTENT(OUT) :: version, subversion \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_GET\_VERSION(VERSION, SUBVERSION, IERROR) \fargs INTEGER VERSION, SUBVERSION, IERROR}
\mpicppemptybind{MPI::Get\_version(int\& version, int\& subversion)}{void}
\mpifunc{MPI\_GET\_VERSION} can be called
before \mpifunc{MPI\_INIT} and after \mpifunc{MPI\_FINALIZE}.
+This function is callable from threads without restriction,
+see Section~\ref{sec:ei-threads}.
Valid (\const{MPI\_VERSION}, \const{MPI\_SUBVERSION}) pairs in
this and previous versions of the \MPI/ standard
-are (3,0), (2,2), (2,1), (2,0), and (1,2).
+are (3,1), (3,0), (2,2), (2,1), (2,0), and (1,2).
\begin{funcdef}{MPI\_GET\_LIBRARY\_VERSION( version, resultlen )}
\funcarg{\OUT}{version}{version string (string)}
@@ -63,8 +67,8 @@
\mpibind{MPI\_Get\_library\_version(char *version, int *resultlen)}
-\mpifnewbind{MPI\_Get\_library\_version(version, resulten, ierror) BIND(C) \fargs CHARACTER(LEN=MPI\_MAX\_LIBRARY\_VERSION\_STRING), INTENT(OUT) :: version \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
-\mpifbind{MPI\_GET\_LIBRARY\_VERSION(VERSION, RESULTEN, IERROR)\fargs CHARACTER*(*) VERSION\\INTEGER RESULTLEN,IERROR}
+\mpifnewbind{MPI\_Get\_library\_version(version, resultlen, ierror) \fargs CHARACTER(LEN=MPI\_MAX\_LIBRARY\_VERSION\_STRING), INTENT(OUT) :: version \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifbind{MPI\_GET\_LIBRARY\_VERSION(VERSION, RESULTLEN, IERROR)\fargs CHARACTER*(*) VERSION\\INTEGER RESULTLEN,IERROR}
This routine returns a string representing the version of the \MPI/ library. The version argument is a
character string for maximum flexibility.
@@ -91,6 +95,8 @@
\mpifunc{MPI\_GET\_LIBRARY\_VERSION} can be called
before \mpifunc{MPI\_INIT} and after \mpifunc{MPI\_FINALIZE}.
+This function is callable from threads without restriction,
+see Section~\ref{sec:ei-threads}.
\subsection{Environmental Inquiries}
\label{subsec:inquiry-inquiry}
@@ -215,7 +221,7 @@
\mpibind{MPI\_Get\_processor\_name(char~*name, int~*resultlen)}
-\mpifnewbind{MPI\_Get\_processor\_name(name, resultlen, ierror) BIND(C) \fargs CHARACTER(LEN=MPI\_MAX\_PROCESSOR\_NAME), INTENT(OUT) :: name \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Get\_processor\_name(name, resultlen, ierror) \fargs CHARACTER(LEN=MPI\_MAX\_PROCESSOR\_NAME), INTENT(OUT) :: name \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_GET\_PROCESSOR\_NAME( NAME, RESULTLEN, IERROR)\fargs CHARACTER*(*) NAME\\INTEGER RESULTLEN,IERROR}
\mpicppemptybind{MPI::Get\_processor\_name(char*~name, int\&~resultlen)}{void}
@@ -275,33 +281,39 @@
\cdeclindex{MPI\_Info}%
\mpibind{MPI\_Alloc\_mem(MPI\_Aint~size, MPI\_Info~info, void~*baseptr)}
-\mpifnewbind{MPI\_Alloc\_mem(size, info, baseptr, ierror) BIND(C) \fargs USE, INTRINSIC :: ISO\_C\_BINDING, ONLY : C\_PTR \\ INTEGER(KIND=MPI\_ADDRESS\_KIND), INTENT(IN) :: size \\ TYPE(MPI\_Info), INTENT(IN) :: info \\ TYPE(C\_PTR), INTENT(OUT) :: baseptr \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
-\mpifbind{MPI\_ALLOC\_MEM(SIZE, INFO, BASEPTR, IERROR) \fargs INTEGER INFO, IERROR \\ INTEGER(KIND=MPI\_ADDRESS\_KIND) SIZE, BASEPTR \mpifoverloadOnlyInAnnex{\>INTERFACE MPI\_ALLOC\_MEM \\ \>\>SUBROUTINE MPI\_ALLOC\_MEM\_CPTR(SIZE, INFO, BASEPTR, IERROR) \\ \>\>\>USE, INTRINSIC :: ISO\_C\_BINDING, ONLY : C\_PTR \\ \>\>\>INTEGER :: INFO, IERROR \\ \>\>\>INTEGER(KIND=MPI\_ADDRESS\_KIND) :: SIZE \\ \>\>\>TYPE(C\_PTR) :: BASEPTR \\ \>\>END SUBROUTINE \\ \>END INTERFACE}}
+\mpifnewbind{MPI\_Alloc\_mem(size, info, baseptr, ierror) \fargs USE, INTRINSIC :: ISO\_C\_BINDING, ONLY : C\_PTR \\ INTEGER(KIND=MPI\_ADDRESS\_KIND), INTENT(IN) :: size \\ TYPE(MPI\_Info), INTENT(IN) :: info \\ TYPE(C\_PTR), INTENT(OUT) :: baseptr \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifbind{MPI\_ALLOC\_MEM(SIZE, INFO, BASEPTR, IERROR) \fargs INTEGER INFO, IERROR \\ INTEGER(KIND=MPI\_ADDRESS\_KIND) SIZE, BASEPTR \mpifoverloadOnlyInAnnex{\>INTERFACE MPI\_ALLOC\_MEM \\ \>\>SUBROUTINE MPI\_ALLOC\_MEM(SIZE, INFO, BASEPTR, IERROR) \\ \>\>\>IMPORT :: MPI\_ADDRESS\_KIND \\ \>\>\>INTEGER :: INFO, IERROR \\ \>\>\>INTEGER(KIND=MPI\_ADDRESS\_KIND) :: SIZE, BASEPTR \\ \>\>END SUBROUTINE \\ \>\>SUBROUTINE MPI\_ALLOC\_MEM\_CPTR(SIZE, INFO, BASEPTR, IERROR) \\ \>\>\>USE, INTRINSIC :: ISO\_C\_BINDING, ONLY : C\_PTR \\ \>\>\>IMPORT :: MPI\_ADDRESS\_KIND \\ \>\>\>INTEGER :: INFO, IERROR \\ \>\>\>INTEGER(KIND=MPI\_ADDRESS\_KIND) :: SIZE \\ \>\>\>TYPE(C\_PTR) :: BASEPTR \\ \>\>END SUBROUTINE \\ \>END INTERFACE}}
\mpicppemptybind{MPI::Alloc\_mem(MPI::Aint size, const MPI::Info\& info)}{void*}
If the Fortran compiler provides \ftype{TYPE(C\_PTR)},
-then the following interface must be provided in the \code{mpi}
+then the following generic interface must be provided in the \code{mpi}
module and should be provided in \code{mpif.h} through overloading,
i.e., with the same routine name as the
routine with \ftype{INTEGER(KIND=MPI\_ADDRESS\_KIND) BASEPTR},
-but with a different linker name:
+but with a different specific procedure name:
%%HEADER
%%SKIP
%%ENDHEADER
\begin{verbatim}
INTERFACE MPI_ALLOC_MEM
- SUBROUTINE MPI_ALLOC_MEM_CPTR(SIZE, INFO, BASEPTR, IERROR)
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
- INTEGER :: INFO, IERROR
- INTEGER(KIND=MPI_ADDRESS_KIND) :: SIZE
- TYPE(C_PTR) :: BASEPTR
- END SUBROUTINE
+ SUBROUTINE MPI_ALLOC_MEM(SIZE, INFO, BASEPTR, IERROR)
+ IMPORT :: MPI_ADDRESS_KIND
+ INTEGER INFO, IERROR
+ INTEGER(KIND=MPI_ADDRESS_KIND) SIZE, BASEPTR
+ END SUBROUTINE
+ SUBROUTINE MPI_ALLOC_MEM_CPTR(SIZE, INFO, BASEPTR, IERROR)
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
+ IMPORT :: MPI_ADDRESS_KIND
+ INTEGER :: INFO, IERROR
+ INTEGER(KIND=MPI_ADDRESS_KIND) :: SIZE
+ TYPE(C_PTR) :: BASEPTR
+ END SUBROUTINE
END INTERFACE
\end{verbatim}
-The linker name base of this overloaded function is \mpifunc{MPI\_ALLOC\_MEM\_CPTR}. The implied linker names
+The base procedure name of this overloaded function is \mpifunc{MPI\_ALLOC\_MEM\_CPTR}. The implied specific procedure names
are described in \sectionref{sec:f90:linker-names}.
The \mpiarg{info} argument can be used to provide
@@ -323,7 +335,7 @@
\mpibind{MPI\_Free\_mem(void~*base)}
-\mpifnewbind{MPI\_Free\_mem(base, ierror) BIND(C) \fargs TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: base \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Free\_mem(base, ierror) \fargs TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: base \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FREE\_MEM(BASE, IERROR) \fargs <type> BASE(*) \\INTEGER IERROR}
\mpicppemptybind{MPI::Free\_mem(void *base)}{void}
@@ -376,7 +388,7 @@
TYPE(C_PTR) :: p
REAL, DIMENSION(:,:), POINTER :: a ! no memory is allocated
INTEGER, DIMENSION(2) :: shape
- INTEGER(KIND=MPI\_ADDRESS\_KIND) :: size
+ INTEGER(KIND=MPI_ADDRESS_KIND) :: size
shape = (/100,100/)
size = 4 * shape(1) * shape(2) ! assuming 4 bytes per REAL
CALL MPI_Alloc_mem(size,MPI_INFO_NULL,p,ierr) ! memory is allocated and
@@ -402,7 +414,7 @@
\begin{verbatim}
REAL A
POINTER (P, A(100,100)) ! no memory is allocated
- INTEGER(KIND=MPI\_ADDRESS\_KIND) SIZE
+ INTEGER(KIND=MPI_ADDRESS_KIND) SIZE
SIZE = 4*100*100
CALL MPI_ALLOC_MEM(SIZE, MPI_INFO_NULL, P, IERR)
! memory is allocated
@@ -595,7 +607,7 @@
\cdeclmainindex{MPI\_Errhandler}%
\mpibind{MPI\_Comm\_create\_errhandler(MPI\_Comm\_errhandler\_function *comm\_errhandler\_fn, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_Comm\_create\_errhandler(comm\_errhandler\_fn, errhandler, ierror) BIND(C) \fargs PROCEDURE(MPI\_Comm\_errhandler\_function) :: comm\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Comm\_create\_errhandler(comm\_errhandler\_fn, errhandler, ierror) \fargs PROCEDURE(MPI\_Comm\_errhandler\_function) :: comm\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_COMM\_CREATE\_ERRHANDLER(COMM\_ERRHANDLER\_FN, ERRHANDLER, IERROR)\fargs EXTERNAL COMM\_ERRHANDLER\_FN \\ INTEGER ERRHANDLER, IERROR}
Creates an error handler that can be attached to communicators.
@@ -619,7 +631,7 @@
\noindent
With the Fortran \code{mpi\_f08} module, the user routine \mpiarg{comm\_errhandler\_fn} should be of the form:
-\mpifnewsubbind{MPI\_Comm\_errhandler\_function(comm, error\_code) BIND(C) \fargs TYPE(MPI\_Comm) :: comm \\ INTEGER :: error\_code }
+\mpifnewsubbind{MPI\_Comm\_errhandler\_function(comm, error\_code) \fargs TYPE(MPI\_Comm) :: comm \\ INTEGER :: error\_code }
\noindent
With the Fortran \code{mpi} module and \code{mpif.h},
@@ -654,7 +666,7 @@
\cdeclindex{MPI\_Errhandler}%
\mpibind{MPI\_Comm\_set\_errhandler(MPI\_Comm comm, MPI\_Errhandler errhandler)}
-\mpifnewbind{MPI\_Comm\_set\_errhandler(comm, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Comm\_set\_errhandler(comm, errhandler, ierror) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_COMM\_SET\_ERRHANDLER(COMM, ERRHANDLER, IERROR) \fargs INTEGER COMM, ERRHANDLER, IERROR}
Attaches a new error handler to a communicator.
@@ -671,7 +683,7 @@
\cdeclindex{MPI\_Errhandler}%
\mpibind{MPI\_Comm\_get\_errhandler(MPI\_Comm comm, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_Comm\_get\_errhandler(comm, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Comm\_get\_errhandler(comm, errhandler, ierror) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_COMM\_GET\_ERRHANDLER(COMM, ERRHANDLER, IERROR) \fargs INTEGER COMM, ERRHANDLER, IERROR}
\mpicppemptybind{MPI::Comm::Get\_errhandler() const}{MPI::Errhandler}
@@ -695,7 +707,7 @@
\cdeclindex{MPI\_Errhandler}%
\mpibind{MPI\_Win\_create\_errhandler(MPI\_Win\_errhandler\_function *win\_errhandler\_fn, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_Win\_create\_errhandler(win\_errhandler\_fn, errhandler, ierror) BIND(C) \fargs PROCEDURE(MPI\_Win\_errhandler\_function) :: win\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Win\_create\_errhandler(win\_errhandler\_fn, errhandler, ierror) \fargs PROCEDURE(MPI\_Win\_errhandler\_function) :: win\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_WIN\_CREATE\_ERRHANDLER(WIN\_ERRHANDLER\_FN, ERRHANDLER, IERROR) \fargs EXTERNAL WIN\_ERRHANDLER\_FN \\ INTEGER ERRHANDLER, IERROR}
\mpicppemptybind{MPI::Win::Create\_errhandler(MPI::Win::Errhandler\_function* win\_errhandler\_fn)}{static MPI::Errhandler}
@@ -715,7 +727,7 @@
\noindent
With the Fortran \code{mpi\_f08} module, the user routine \mpiarg{win\_errhandler\_fn} should be of the form:
-\mpifnewsubbind{MPI\_Win\_errhandler\_function(win, error\_code) BIND(C) \fargs TYPE(MPI\_Win) :: win \\ INTEGER :: error\_code }
+\mpifnewsubbind{MPI\_Win\_errhandler\_function(win, error\_code) \fargs TYPE(MPI\_Win) :: win \\ INTEGER :: error\_code }
\noindent
With the Fortran \code{mpi} module and \code{mpif.h},
@@ -732,7 +744,7 @@
\cdeclindex{MPI\_Win}%
\mpibind{MPI\_Win\_set\_errhandler(MPI\_Win win, MPI\_Errhandler errhandler)}
-\mpifnewbind{MPI\_Win\_set\_errhandler(win, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Win\_set\_errhandler(win, errhandler, ierror) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_WIN\_SET\_ERRHANDLER(WIN, ERRHANDLER, IERROR) \fargs INTEGER WIN, ERRHANDLER, IERROR}
\mpicppemptybind{MPI::Win::Set\_errhandler(const MPI::Errhandler\& errhandler)}{void}
@@ -752,7 +764,7 @@
\cdeclindex{MPI\_Win}%
\mpibind{MPI\_Win\_get\_errhandler(MPI\_Win win, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_Win\_get\_errhandler(win, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Win\_get\_errhandler(win, errhandler, ierror) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_WIN\_GET\_ERRHANDLER(WIN, ERRHANDLER, IERROR) \fargs INTEGER WIN, ERRHANDLER, IERROR}
\mpicppemptybind{MPI::Win::Get\_errhandler() const}{MPI::Errhandler}
@@ -769,7 +781,7 @@
\cdeclindex{MPI\_Errhandler}%
\mpibind{MPI\_File\_create\_errhandler(MPI\_File\_errhandler\_function *file\_errhandler\_fn, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_File\_create\_errhandler(file\_errhandler\_fn, errhandler, ierror) BIND(C) \fargs PROCEDURE(MPI\_File\_errhandler\_function) :: file\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_File\_create\_errhandler(file\_errhandler\_fn, errhandler, ierror) \fargs PROCEDURE(MPI\_File\_errhandler\_function) :: file\_errhandler\_fn \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FILE\_CREATE\_ERRHANDLER(FILE\_ERRHANDLER\_FN, ERRHANDLER, IERROR)\fargs EXTERNAL FILE\_ERRHANDLER\_FN \\ INTEGER ERRHANDLER, IERROR}
\mpicppemptybind{MPI::File::Create\_errhandler(MPI::File::Errhandler\_function* file\_errhandler\_fn)}{static MPI::Errhandler}
@@ -788,7 +800,7 @@
\noindent
With the Fortran \code{mpi\_f08} module, the user routine \mpiarg{file\_errhandler\_fn} should be of the form:
-\mpifnewsubbind{MPI\_File\_errhandler\_function(file, error\_code) BIND(C) \fargs TYPE(MPI\_File) :: file \\ INTEGER :: error\_code }
+\mpifnewsubbind{MPI\_File\_errhandler\_function(file, error\_code) \fargs TYPE(MPI\_File) :: file \\ INTEGER :: error\_code }
\noindent
With the Fortran \code{mpi} module and \code{mpif.h},
@@ -805,7 +817,7 @@
\cdeclindex{MPI\_File}%
\mpibind{MPI\_File\_set\_errhandler(MPI\_File file, MPI\_Errhandler errhandler)}
-\mpifnewbind{MPI\_File\_set\_errhandler(file, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_File), INTENT(IN) :: file \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_File\_set\_errhandler(file, errhandler, ierror) \fargs TYPE(MPI\_File), INTENT(IN) :: file \\ TYPE(MPI\_Errhandler), INTENT(IN) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FILE\_SET\_ERRHANDLER(FILE, ERRHANDLER, IERROR) \fargs INTEGER FILE, ERRHANDLER, IERROR}
\mpicppemptybind{MPI::File::Set\_errhandler(const MPI::Errhandler\& errhandler)}{void}
@@ -825,7 +837,7 @@
\cdeclindex{MPI\_File}%
\mpibind{MPI\_File\_get\_errhandler(MPI\_File file, MPI\_Errhandler *errhandler)}
-\mpifnewbind{MPI\_File\_get\_errhandler(file, errhandler, ierror) BIND(C) \fargs TYPE(MPI\_File), INTENT(IN) :: file \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_File\_get\_errhandler(file, errhandler, ierror) \fargs TYPE(MPI\_File), INTENT(IN) :: file \\ TYPE(MPI\_Errhandler), INTENT(OUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FILE\_GET\_ERRHANDLER(FILE, ERRHANDLER, IERROR) \fargs INTEGER FILE, ERRHANDLER, IERROR}
\mpicppemptybind{MPI::File::Get\_errhandler() const}{MPI::Errhandler}
@@ -842,7 +854,7 @@
\cdeclindex{MPI\_Errhandler}%
\mpibind{MPI\_Errhandler\_free(MPI\_Errhandler~*errhandler)}
-\mpifnewbind{MPI\_Errhandler\_free(errhandler, ierror) BIND(C) \fargs TYPE(MPI\_Errhandler), INTENT(INOUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Errhandler\_free(errhandler, ierror) \fargs TYPE(MPI\_Errhandler), INTENT(INOUT) :: errhandler \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ERRHANDLER\_FREE(ERRHANDLER, IERROR)\fargs INTEGER ERRHANDLER, IERROR}
\mpicppemptybind{MPI::Errhandler::Free()}{void}
Marks the error handler associated with \mpiarg{errhandler} for
@@ -865,7 +877,7 @@
\mpibind{MPI\_Error\_string(int~errorcode, char~*string, int~*resultlen)}
-\mpifnewbind{MPI\_Error\_string(errorcode, string, resultlen, ierror) BIND(C) \fargs INTEGER, INTENT(IN) :: errorcode \\ CHARACTER(LEN=MPI\_MAX\_ERROR\_STRING), INTENT(OUT) :: string \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Error\_string(errorcode, string, resultlen, ierror) \fargs INTEGER, INTENT(IN) :: errorcode \\ CHARACTER(LEN=MPI\_MAX\_ERROR\_STRING), INTENT(OUT) :: string \\ INTEGER, INTENT(OUT) :: resultlen \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ERROR\_STRING(ERRORCODE, STRING, RESULTLEN, IERROR)\fargs INTEGER ERRORCODE, RESULTLEN, IERROR \\ CHARACTER*(*) STRING}
\mpicppemptybind{MPI::Get\_error\_string(int~errorcode, char*~name, int\&~resultlen)}{void}
@@ -1064,7 +1076,7 @@
\mpibind{MPI\_Error\_class(int~errorcode, int~*errorclass)}
-\mpifnewbind{MPI\_Error\_class(errorcode, errorclass, ierror) BIND(C) \fargs INTEGER, INTENT(IN) :: errorcode \\ INTEGER, INTENT(OUT) :: errorclass \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Error\_class(errorcode, errorclass, ierror) \fargs INTEGER, INTENT(IN) :: errorcode \\ INTEGER, INTENT(OUT) :: errorclass \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ERROR\_CLASS(ERRORCODE, ERRORCLASS, IERROR)\fargs INTEGER ERRORCODE, ERRORCLASS, IERROR}
\mpicppemptybind{MPI::Get\_error\_class(int~errorcode)}{int}
@@ -1106,7 +1118,7 @@
\mpibind{MPI\_Add\_error\_class(int *errorclass)}
-\mpifnewbind{MPI\_Add\_error\_class(errorclass, ierror) BIND(C) \fargs INTEGER, INTENT(OUT) :: errorclass \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Add\_error\_class(errorclass, ierror) \fargs INTEGER, INTENT(OUT) :: errorclass \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ADD\_ERROR\_CLASS(ERRORCLASS, IERROR)\fargs INTEGER ERRORCLASS, IERROR}
\mpicppemptybind{MPI::Add\_error\_class()}{int}
@@ -1168,7 +1180,7 @@
\mpibind{MPI\_Add\_error\_code(int errorclass, int *errorcode)}
-\mpifnewbind{MPI\_Add\_error\_code(errorclass, errorcode, ierror) BIND(C) \fargs INTEGER, INTENT(IN) :: errorclass \\ INTEGER, INTENT(OUT) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Add\_error\_code(errorclass, errorcode, ierror) \fargs INTEGER, INTENT(IN) :: errorclass \\ INTEGER, INTENT(OUT) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ADD\_ERROR\_CODE(ERRORCLASS, ERRORCODE, IERROR)\fargs INTEGER ERRORCLASS, ERRORCODE, IERROR}
\mpicppemptybind{MPI::Add\_error\_code(int errorclass)}{int}
@@ -1194,7 +1206,7 @@
\mpibind{MPI\_Add\_error\_string(int errorcode, const char *string)}
-\mpifnewbind{MPI\_Add\_error\_string(errorcode, string, ierror) BIND(C) \fargs INTEGER, INTENT(IN) :: errorcode \\ CHARACTER(LEN=*), INTENT(IN) :: string \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Add\_error\_string(errorcode, string, ierror) \fargs INTEGER, INTENT(IN) :: errorcode \\ CHARACTER(LEN=*), INTENT(IN) :: string \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ADD\_ERROR\_STRING(ERRORCODE, STRING, IERROR)\fargs INTEGER ERRORCODE, IERROR \\ CHARACTER*(*) STRING}
\mpicppemptybind{MPI::Add\_error\_string(int errorcode, const char* string)}{void}
@@ -1223,7 +1235,7 @@
\mpibind{MPI\_Comm\_call\_errhandler(MPI\_Comm comm, int errorcode)}
-\mpifnewbind{MPI\_Comm\_call\_errhandler(comm, errorcode, ierror) BIND(C) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Comm\_call\_errhandler(comm, errorcode, ierror) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_COMM\_CALL\_ERRHANDLER(COMM, ERRORCODE, IERROR)\fargs INTEGER COMM, ERRORCODE, IERROR}
\mpicppemptybind{MPI::Comm::Call\_errhandler(int errorcode) const}{void}
@@ -1250,7 +1262,7 @@
\cdeclindex{MPI\_Win}%
\mpibind{MPI\_Win\_call\_errhandler(MPI\_Win win, int errorcode)}
-\mpifnewbind{MPI\_Win\_call\_errhandler(win, errorcode, ierror) BIND(C) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Win\_call\_errhandler(win, errorcode, ierror) \fargs TYPE(MPI\_Win), INTENT(IN) :: win \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_WIN\_CALL\_ERRHANDLER(WIN, ERRORCODE, IERROR)\fargs INTEGER WIN, ERRORCODE, IERROR}
\mpicppemptybind{MPI::Win::Call\_errhandler(int errorcode) const}{void}
@@ -1274,7 +1286,7 @@
\cdeclindex{MPI\_File}%
\mpibind{MPI\_File\_call\_errhandler(MPI\_File fh, int errorcode)}
-\mpifnewbind{MPI\_File\_call\_errhandler(fh, errorcode, ierror) BIND(C) \fargs TYPE(MPI\_File), INTENT(IN) :: fh \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_File\_call\_errhandler(fh, errorcode, ierror) \fargs TYPE(MPI\_File), INTENT(IN) :: fh \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FILE\_CALL\_ERRHANDLER(FH, ERRORCODE, IERROR)\fargs INTEGER FH, ERRORCODE, IERROR}
\mpicppemptybind{MPI::File::Call\_errhandler(int errorcode) const}{void}
@@ -1325,7 +1337,7 @@
\begin{funcdefna}{MPI\_WTIME()}
\end{funcdefna}
\mpibindnotint{double MPI\_Wtime(void)}
-\mpifnewbind{DOUBLE PRECISION MPI\_Wtime() BIND(C)}
+\mpifnewbind{DOUBLE PRECISION MPI\_Wtime()}
\mpifbind{DOUBLE PRECISION MPI\_WTIME()}
\mpicppemptybind{MPI::Wtime()}{double}
\mpifunc{MPI\_WTIME} returns a floating-point number of seconds,
@@ -1363,7 +1375,7 @@
\begin{funcdefna}{MPI\_WTICK()}
\end{funcdefna}
\mpibindnotint{double MPI\_Wtick(void)}
-\mpifnewbind{DOUBLE PRECISION MPI\_Wtick() BIND(C)}
+\mpifnewbind{DOUBLE PRECISION MPI\_Wtick()}
\mpifbind{DOUBLE PRECISION MPI\_WTICK()}
\mpicppemptybind{MPI::Wtick()}{double}
\mpifunc{MPI\_WTICK} returns the resolution of
@@ -1396,7 +1408,7 @@
\mpibind{MPI\_Init(int~*argc, char~***argv)}
-\mpifnewbind{MPI\_Init(ierror) BIND(C) \fargs INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Init(ierror) \fargs INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_INIT(IERROR)\fargs INTEGER IERROR}
\mpicppemptybind{MPI::Init(int\&~argc, char**\&~argv)}{void}
\mpicppemptybind{MPI::Init()}{void}
@@ -1486,8 +1498,8 @@
\const{(maxprocs, 5)},
and \const{(arch, sun)}. The next 10 processes will have in
\const{MPI\_INFO\_ENV} \const{(command, atmos)},
-\const{(maxprocs, 10)},
-and \const{(arch, rs600)}
+\const{(maxprocs, 10)},
+and \const{(arch, rs6000)}
\end{example}
\begin{users}
@@ -1510,7 +1522,7 @@
\mpibind{MPI\_Finalize(void)}
-\mpifnewbind{MPI\_Finalize(ierror) BIND(C) \fargs INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Finalize(ierror) \fargs INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FINALIZE(IERROR)\fargs INTEGER IERROR}
\mpicppemptybind{MPI::Finalize()}{void}
@@ -1721,7 +1733,7 @@
\mpibind{MPI\_Initialized(int~*flag)}
-\mpifnewbind{MPI\_Initialized(flag, ierror) BIND(C) \fargs LOGICAL, INTENT(OUT) :: flag \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Initialized(flag, ierror) \fargs LOGICAL, INTENT(OUT) :: flag \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_INITIALIZED(FLAG, IERROR)\fargs LOGICAL FLAG \\ INTEGER IERROR}
\mpicppemptybind{MPI::Is\_initialized()}{bool}
@@ -1734,6 +1746,8 @@
called does not affect the behavior of \mpifunc{MPI\_INITIALIZED}.
It is one of the few routines that may be called before
\mpifunc{MPI\_INIT} is called.
+This function is callable from threads without restriction,
+see Section~\ref{sec:ei-threads}.
\begin{funcdef}{MPI\_ABORT(comm, errorcode)}
\funcarg{\IN}{comm}{communicator of tasks to abort}
@@ -1742,7 +1756,7 @@
\mpibind{MPI\_Abort(MPI\_Comm~comm, int~errorcode)}
-\mpifnewbind{MPI\_Abort(comm, errorcode, ierror) BIND(C) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Abort(comm, errorcode, ierror) \fargs TYPE(MPI\_Comm), INTENT(IN) :: comm \\ INTEGER, INTENT(IN) :: errorcode \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_ABORT(COMM, ERRORCODE, IERROR)\fargs INTEGER COMM, ERRORCODE, IERROR}
\mpicppemptybind{MPI::Comm::Abort(int~errorcode)}{void}
@@ -1834,7 +1848,7 @@
\mpibind{MPI\_Finalized(int *flag)}
-\mpifnewbind{MPI\_Finalized(flag, ierror) BIND(C) \fargs LOGICAL, INTENT(OUT) :: flag \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
+\mpifnewbind{MPI\_Finalized(flag, ierror) \fargs LOGICAL, INTENT(OUT) :: flag \\ INTEGER, OPTIONAL, INTENT(OUT) :: ierror}
\mpifbind{MPI\_FINALIZED(FLAG, IERROR)\fargs LOGICAL FLAG\\INTEGER IERROR}
\mpicppemptybind{MPI::Is\_finalized()}{bool}
@@ -1842,6 +1856,8 @@
This routine returns \mpiarg{true} if \mpifunc{MPI\_FINALIZE} has completed.
It is valid to call \mpifunc{MPI\_FINALIZED}
before \mpifunc{MPI\_INIT} and after \mpifunc{MPI\_FINALIZE}.
+This function is callable from threads without restriction,
+see Section~\ref{sec:ei-threads}.
\begin{users}
\mpi/ is ``active'' and it is thus safe to call \mpi/ functions if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment