diff --git a/tools/adios2pio-nm/adios2pio-nm-lib.cxx b/tools/adios2pio-nm/adios2pio-nm-lib.cxx index 4e1084cd1..ca60f8e56 100644 --- a/tools/adios2pio-nm/adios2pio-nm-lib.cxx +++ b/tools/adios2pio-nm/adios2pio-nm-lib.cxx @@ -2282,6 +2282,8 @@ int ConvertBPFile(const string &infilepath, const string &outfilename, int w_mpirank, mpirank; int w_nproc, nproc; + GPTLstart("adios2pio:ConvertBPFile"); + w_comm = comm_in; MPI_Comm_set_errhandler(w_comm, MPI_ERRORS_RETURN); MPI_Comm_rank(w_comm, &w_mpirank); @@ -2314,7 +2316,6 @@ int ConvertBPFile(const string &infilepath, const string &outfilename, try { - GPTLstart("adios2pio:ConvertBPFile"); t1 = MPI_Wtime(); /* Allocate IO and Engine and open BP4 file */ @@ -2649,7 +2650,6 @@ int ConvertBPFile(const string &infilepath, const string &outfilename, << " at " << __func__ << ":" << __LINE__ << endl; ierr = BP2PIO_ERROR; } - GPTLstop("adios2pio:ConvertBPFile"); ret = PIOc_finalize(iosysid); if (ret != PIO_NOERR) @@ -2676,6 +2676,8 @@ int ConvertBPFile(const string &infilepath, const string &outfilename, MPI_Barrier(w_comm); + GPTLstop("adios2pio:ConvertBPFile"); + if (ierr != BP2PIO_NOERR) return ierr; diff --git a/tools/adios2pio-nm/adios2pio-nm.cxx b/tools/adios2pio-nm/adios2pio-nm.cxx index 40f697361..df16f2b6d 100644 --- a/tools/adios2pio-nm/adios2pio-nm.cxx +++ b/tools/adios2pio-nm/adios2pio-nm.cxx @@ -159,6 +159,8 @@ int main(int argc, char *argv[]) return ret; #endif + GPTLstart("adios2pio:main"); + SetDebugOutput(debug_lvl); MPI_Barrier(comm_in); if (idir.size() == 0) @@ -171,6 +173,8 @@ int main(int argc, char *argv[]) } MPI_Barrier(comm_in); + GPTLstop("adios2pio:main"); + #ifdef SPIO_ENABLE_GPTL_TIMING /* Write the GPTL summary/rank_0 output */ std::string summary_file("spioconvtoolrwgptlsummaryinfo0wrank.dat");