Dear All,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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?) 
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; this structure , the library calls&nbsp; [ from 
<span style="color: rgb(0, 0, 153);">MPIR_Init_thread</span>(...) &nbsp;&nbsp; ]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 153);">MPIU_Object_set_ref( MPIR_Process.comm_world, 1 ); </span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &gt;&nbsp;&nbsp; MPIU_DBG_MSG_FM ( .... ) </span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &gt; MPIU_DBG_MSG_FMT ( .. ) </span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- &gt;&nbsp; MPIU_DBG_Outevent ( ... ) </span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt; va_start and other such list related macros. <br><br>However, when the <span style="color: rgb(0, 0, 153);">MPIU_DBG_Outevent
</span> function is invoked, the paramater, <span style="color: rgb(0, 0, 153);">int kind </span>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.&nbsp; So, how does the MPICH library maintain reference to the&nbsp; MPIR_Process.comm_world structure, without the invocation of macros like va_start, va_arg etc. 
<br>&nbsp;<br clear="all">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. 
<br><br>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? 
<br><br>NOTE :&nbsp; I am using the mpich2-1.0.6 version. <br><br>Thanks,<br>Krishna Chaitanya K,<br>National Institute of Technology,Karnataka ( NITK) <br>India.<br>-- <br>In the middle of difficulty, lies opportunity