[mpich-discuss] Tracing MPI-IO calls

Wei-keng Liao wkliao at ece.northwestern.edu
Tue Apr 12 09:21:34 CDT 2011


Here is source code flow that I understand. I am not an MPICH developer,
this is just my 2 cents.

The MPI-IO implementation of MPICH is called ROMIO, which is located in
src/mpi/romio of the mpich2 source tree.

All MPI-IO calls are defined in src/mpi/romio/mpi-io. For example,
MPI_File_open() is defined in src/mpi/romio/mpi-io/open.c

If you read src/mpi/romio/mpi-io/open.c, you will find a call to
ADIO_Open(). This is the corresponding file open call in ADIO driver.

All ADIO drivers are located in src/mpi/romio/adio. For example,
src/mpi/romio/adio/ad_ufs is the ADIO driver for Unix file system (UFS).

ADIO_open() is defined in src/mpi/romio/adio/common/ad_open.c.
It calls ADIOI_OpenColl().

In adioi.h, ADIOI_OpenColl() is defined to point to the right file system driver,
in this case, UFS.
  #define ADIOI_OpenColl(fd, rank, access_mode, error_code) \
        (*(fd->fns->ADIOI_xxx_OpenColl))(fd, rank, access_mode, error_code)

xxx here is replaced by UFS and hence ADIOI_UFS_OpenColl.
If you check adio/ad_ufs/ad_ufs.c, you will see it points to ADIOI_GEN_OpenColl()
and this functions is located in common/ad_opencoll.c because of the name "_GEN_" in it.

ADIOI_GEN_OpenColl() calls ADIOI_xxx_Open which becomes ADIOI_UFS_Open and ADIOI_UFS_open
is defined in ad_ufs/ad_open.c. You will find a file system call to open() in ad_ufs/ad_open.c.

Other MPI-IO calls have the similar source tree structure and flow.

Wei-keng

On Apr 12, 2011, at 8:02 AM, Kaveri Zanje wrote:

> I want to study all adio calls for all file system ,
> how this calls flow in IO stack like MPIIO -> ADIO , which calls are get
> invoked in underlying libraries till local file system call.
> 
> actually I am interested in, How MPICH2 links all MPI-IO calls to underlying
> file system's calls.
> I thought call tracing will help me out to understand the call sequence made
> by MPICH.
> 
> I have used valgrind and c flow,
> In valgrind i am not able to trace the call, how can i do this???
> Is any other tool which can help me??
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list