[MPICH] A doubt regarding the manner in the which MPI_init works

Krishna Chaitanya kris.c1986 at gmail.com
Tue Jan 15 14:25:53 CST 2008


Dear All,
             I have been trying to understand the types of data structures
used by MPICH2 and the way in which the various lists are maintained and how
they are initialized. I happen to observe that most of such routines have
been implemented as macros which has made my job slightly harder as they
dont appear while debugging with gdb.( Is there a way to trace through them
at run time?)

             For example, I was keen on observing how MPICH2 deals with the
MPI_COMM_WORLD data structure, which is of type MPID_COMM and it is a member
of MPICH_PerProcess_t. So, at the time of populating  this structure , the
library calls  [ from MPIR_Init_thread(...)    ]
         MPIU_Object_set_ref( MPIR_Process.comm_world, 1 );
         -- >   MPIU_DBG_MSG_FM ( .... )
                  -- > MPIU_DBG_MSG_FMT ( .. )
                         -- >  MPIU_DBG_Outevent ( ... )
                                 --> va_start and other such list related
macros.

However, when the MPIU_DBG_Outevent function is invoked, the paramater, int
kind is hard-coded to be 0. When the kind value is zero, the library does
not do any list related work.Instead, it prints some details into a file.
So, how does the MPICH library maintain reference to the
MPIR_Process.comm_world structure, without the invocation of macros like
va_start, va_arg etc.

Its quite possible that I have got things wrong as I am jumping from one
function to another using the ctags and I havent actually seen the code
behave as above during run-time as we are dealing with macros. So, please
correct me if I have got something wrong.

And, I am trying to draw an analogy between the OPEN-MPI and the MPICH2 when
it comes to the way the internal data structures are handled. In Open-MPI,
the OPAL library maitains such lists and has routines to manipulate them.
Does MPICH have any other way of working with the lists of objects other
than using the va_start and other related macros?

NOTE :  I am using the mpich2-1.0.6 version.

Thanks,
Krishna Chaitanya K,
National Institute of Technology,Karnataka ( NITK)
India.
-- 
In the middle of difficulty, lies opportunity
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080115/9b403d67/attachment.htm>


More information about the mpich-discuss mailing list