[mpich-commits] r10671 - in mpich2/trunk/src/mpi/romio/adio: common include
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Mon Nov 26 17:49:26 CST 2012
Author: goodell
Date: 2012-11-26 17:49:26 -0600 (Mon, 26 Nov 2012)
New Revision: 10671
Modified:
mpich2/trunk/src/mpi/romio/adio/common/ad_close.c
mpich2/trunk/src/mpi/romio/adio/common/ad_delete.c
mpich2/trunk/src/mpi/romio/adio/include/adioi.h
Log:
Revert "only one task should actually delete in ADIO_Close"
This reverts r10641 and should fix most/all of tt#1758. A better fix
should be considered.
Modified: mpich2/trunk/src/mpi/romio/adio/common/ad_close.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/common/ad_close.c 2012-11-26 23:08:04 UTC (rev 10670)
+++ mpich2/trunk/src/mpi/romio/adio/common/ad_close.c 2012-11-26 23:49:26 UTC (rev 10671)
@@ -14,8 +14,7 @@
void ADIO_Close(ADIO_File fd, int *error_code)
{
- int err = MPI_SUCCESS;
- int i, j, k, combiner, myrank, is_contig;
+ int i, j, k, combiner, myrank, err, is_contig;
static char myname[] = "ADIO_CLOSE";
if (fd->async_count) {
@@ -48,21 +47,14 @@
}
if (fd->access_mode & ADIO_DELETE_ON_CLOSE) {
- int is_agg_ldr = 0;
- ADIOI_IS_AGG_LEADER(fd, &is_agg_ldr);
/* if we are doing aggregation and deferred open, then it's possible
* that rank 0 does not have access to the file. make sure only an
* aggregator deletes the file.*/
MPI_Comm_rank(fd->comm, &myrank);
- if (is_agg_ldr) {
- ADIO_Delete(fd->filename, &err);
+ if (myrank == fd->hints->ranklist[0]) {
+ ADIO_Delete(fd->filename, &err);
}
MPI_Barrier(fd->comm);
- MPI_Bcast(&err, 1, MPI_INT, fd->hints->ranklist[0], fd->comm);
- if (err != MPI_SUCCESS) {
- *error_code = err;
- return;
- }
}
if (fd->fortran_handle != -1) {
Modified: mpich2/trunk/src/mpi/romio/adio/common/ad_delete.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/common/ad_delete.c 2012-11-26 23:08:04 UTC (rev 10670)
+++ mpich2/trunk/src/mpi/romio/adio/common/ad_delete.c 2012-11-26 23:49:26 UTC (rev 10671)
@@ -18,7 +18,9 @@
err = unlink(filename);
if (err == -1) {
- *error_code = ADIOI_Err_create_code(myname, filename, errno);
+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
+ myname, __LINE__, MPI_ERR_IO, "**io",
+ "**io %s", strerror(errno));
return;
}
else *error_code = MPI_SUCCESS;
Modified: mpich2/trunk/src/mpi/romio/adio/include/adioi.h
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/include/adioi.h 2012-11-26 23:08:04 UTC (rev 10670)
+++ mpich2/trunk/src/mpi/romio/adio/include/adioi.h 2012-11-26 23:49:26 UTC (rev 10671)
@@ -78,13 +78,6 @@
};
-#define ADIOI_IS_AGG_LEADER(fh_, is_agg_p_) \
- do { \
- int rank_; \
- MPI_Comm_rank((fh_)->comm, &rank_); \
- *(is_agg_p_) = ((fh_)->hints->ranklist[0] == 0); \
- } while (0)
-
typedef struct ADIOI_Datarep {
char *name;
void *state;
More information about the commits
mailing list