Miscellaneous Functions and Values


Up: Other Functions Next: Context Management Previous: Queue Information

The ADI must provide routines to initialize and terminate use of the ADI (much like MPI_Init and MPI_Finalize) and to provide some information about the environment. First, here are the functions.

MPID_Init( int *argc, char ***argv, void *config_info, *error_code )
Initialize the ADI. We may also want to include char *envp. Note the the MPI-2 Forum is considering severe restrictions on how an implementation may use the command line. The item config_info can be used to pass special information needed by the MPID_Init routine; current src/env/initutil.c passes (void *)0 for this parameter.
MPID_End()
Terminate the ADI.
MPID_Wtime( double *time )
Give time in seconds. This has the same interpretation as MPI_Wtime; it is an elapsed time from some fixed but unspecified time in the past. This form simplifies implementing this routine as a macro; to further simplify that, the implementation should provide a mpid_time.h include file.
MPID_Wtick( double *tick )
Give resolution of MPID_Wtime in seconds.
MPID_Node_name( char *name, int len )
Give the name of the node.
MPID_Abort( MPI_Comm comm, int error_code, char *facility, char *string )
Abort an MPI job with a message; if possible, return error_code to the invoking environment. If string is null, prints a default message. The string facility is used to indicate who called the routine; for example, the user (from MPI_Abort) or the MPI implementation. If null, it is ignored.

In addition, the ADI provides global variables that contain the size of MPI_COMM_WORLD and the rank of the process in MPI_COMM_WORLD. These values are MPID_MyWorldSize and MPID_MyWorldRank, respectively. These refer to MPI_COMM_WORLD only. This approach will simplify the eventual extension to dynamic process creation. By making these global variables, it is easier to handle the common special case of MPI_COMM_WORLD and to check for valid argument ranges for source and destination; it also simplifies writing error messages.



Up: Other Functions Next: Context Management Previous: Queue Information