Include Files in MPICH
Include Files in MPICH2
The include files in MPICH2 are designed to provide good separation of concerns among the various parts of MPICH2 (at least, that was the original plan).
In some cases, include files are organized hierarchically to better isolate each feature. This is particularly true for the
- mpiimpl.h -
- nmpi.h - Provides definition of NMPI_ routines (allows selection of PMPI or MPI for routines used internally)
- mpichconfconst.h - Definitions needed before mpichconf.h (e.g., available thread levels)
- mpichconf.h - Created by configure, this describes the properties of the build environment and the selection of features in MPICH2
- mpl.h - ??
- mpibase.h - Some definitions that may also be used alone (without mpiimpl.h)
- mpitypedefs.h - Define the basic datatypes used within the MPICH2 implementation
- mpidpre.h' - Definitions exported from the ADI implementation to the MPICH2 implementation. These are only the definitions required before the rest of mpiimpl.h is defined.
- mpiimplthread.h - Thread implementation definitions
- mpiutil.h - Additional helper definitions (should some of these be in mpibase.h?)
- mpidbg.h - Defines the MPIU_DBG_xxx macros
- mpimem.h - Definitions for internal memory management
- mpi_lang.h - Defines type defs for attribute copying (?)
- mpihandlemem.h - Defines the macros for the encoded MPI handles
- mpiparam.h - Parameter handling interface
- mpiattr.h -
- mpichtimer.h -
- One of the following is included to define the expansion of the function enter and exit macros.
- mpifuncmem.h -
- mpifunclog.h -
- mpitimerimpl.h -
- mpierror.h -
- mpierrs.h -
- mpidpost.h - Definitions exported from the ADI implementation to the MPICH2 implementation
Comments: This file has grown over time and probably needs to be refactored. In particular, there are a number of files that should be combined; other definitions may be best moved out of mpiimpl.h. Finally, some definitions in mpiimpl.h are not universally needed, and should be moved into the appropriate subdirectory.
The following are as defined for the CH3 implementation of ADI3.
src/mpid/ch3/include/mpidimpl.h for CH3
- mpidimpl.h - Included only within the ADI3 implementation
- mpichconf.h - The master configure definition file
- mpiimpl.h - As defined above (note includes mpidpre.h and mpidpost.h)
- mpidftb.h - ?
- mpidpkt.h -
- mpidi_ch3_mpid.h -
This file should be used only within the particular channel.
The dllchan is a special channel that permits the dynamic loading of other channels. In addition to providing a runtime option to select the channel, it provides a strong test of appropriate information compartmentalization in the channels.
The key issue for the dllchan is that the ADI3 is built with the mpidi_ch3_impl.h include file, but each channel must be built with that channels mpidi_ch3_impl.h file . Those files must be compatible (not make any inconsistent definitions).