2
0
mirror of https://github.com/HDFGroup/hdf5.git synced 2025-03-25 17:00:45 +08:00

[svn-r6414] Purpose:

Bug fix (no id, just noticed myself)
Description:
    Added a barrier before doing file cleanup to ensure all tests are
    completed by then.
    Moved the MPI_Finalize to be very end and insert an H5close before
    it to ensure all potential MPI activities by HDF5 are done by then.
Platforms tested:
    Tested h5committest {arabica (fortran), eirene (fortran, C++)
	modi4 (parallel, fortran)}?  Yes.
This commit is contained in:
Albert Cheng 2003-02-18 00:12:58 -05:00
parent a3254796e9
commit 7ff7845b3a

@ -409,11 +409,20 @@ finish:
}
printf("===================================\n");
}
MPI_Finalize();
if (dowrite)
/* make sure all processes are finished before starting cleanup and exit */
MPI_Barrier(MPI_COMM_WORLD);
if (dowrite){
h5_cleanup(FILENAME, fapl);
else
} else {
/* h5_cleanup would have closed fapl. Now must do it explicitedly */
H5Pclose(fapl);
}
/* close HDF5 library */
H5close();
/* MPI_Finalize must be called AFTER H5close which may use MPI calls */
MPI_Finalize();
return(nerrors);
}