propose a new API ncmpi_get_file_info()

Wei-keng Liao wkliao at ece.northwestern.edu
Tue Jul 3 23:59:26 CDT 2007


I propose a new API to obtain the MPI file info object from an opened 
netcdf dataset. The syntax and implementation of this API are given below. 
This code segment can be added into mpinetcdf.c and the API declaration 
added in header file pnetcdf.h. This API may enable IOR benchmark to 
provide showHints option.

Wei-keng


int
ncmpi_get_file_info(int ncid, MPI_Info *info_used) {
   int status = NC_NOERR;
   int mpireturn;
   NC *ncp;

   status = ncmpii_NC_check_id(ncid, &ncp);
   if (status != NC_NOERR)
     return status;

   mpireturn = MPI_File_get_info(ncp->nciop->collective_fh, info_used);
   if (mpireturn != MPI_SUCCESS) {
       int rank;
       MPI_Comm_rank(ncp->nciop->comm, &rank);
       ncmpii_handle_error(rank, mpireturn, "MPI_File_sync");
       MPI_Finalize();
       return NC_EFILE;
   }
   return status;
}





More information about the parallel-netcdf mailing list