utils.cpp 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#include "utils.h"

void MPIIOInfo ( MPI_File fileHandle )
{
  MPI_Info info;
  int flag, rank;
  char value[1024];

  MPI_Comm_rank(MPI_COMM_WORLD, &rank);

  if ( rank == 0 ) {
    MPI_File_get_info ( fileHandle, &info );

    fprintf ( stdout, "[INFO] MPI Two-phases I/O\n");

    MPI_Info_get ( info, "cb_buffer_size", 1024, value, &flag );
    fprintf ( stdout, "[INFO] cb_buffer_size = %s\n", value );

    MPI_Info_get ( info, "cb_nodes", 1024, value, &flag );
    fprintf ( stdout, "[INFO] cb_nodes = %s\n", value );

    MPI_Info_get ( info, "bg_nodes_pset", 1024, value, &flag );
    fprintf ( stdout, "[INFO] bg_nodes_pset = %s\n", value );

    MPI_Info_get ( info, "romio_cb_read", 1024, value, &flag );
    fprintf ( stdout, "[INFO] romio_cb_read = %s\n", value );

    MPI_Info_get ( info, "romio_cb_write", 1024, value, &flag );
    fprintf ( stdout, "[INFO] romio_cb_write = %s\n", value );

    MPI_Info_get ( info, "romio_no_indep_rw", 1024, value, &flag );
    fprintf ( stdout, "[INFO] romio_no_indep_rw = %s\n", value );
  }
}