Reformatted r16691 to OMPI style. Re #733
This commit was SVN r16693. The following SVN revision numbers were found above: r16691 --> open-mpi/ompi@8dca19cb3b
Этот коммит содержится в:
родитель
8dca19cb3b
Коммит
037a533752
@ -176,62 +176,63 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
|
||||
* on that FS */
|
||||
if (fd->file_system == ADIO_NFS) {
|
||||
/* no optimizations for NFS: */
|
||||
if ((access_mode & ADIO_CREATE) && (access_mode & ADIO_EXCL)) {
|
||||
/* the open should fail if the file exists. Only *1* process should
|
||||
check this. Otherwise, if all processes try to check and the file
|
||||
does not exist, one process will create the file and others who
|
||||
reach later will return error. */
|
||||
if(rank == fd->hints->ranklist[0]) {
|
||||
if ((access_mode & ADIO_CREATE) && (access_mode & ADIO_EXCL)) {
|
||||
/* the open should fail if the file exists. Only *1* process should
|
||||
check this. Otherwise, if all processes try to check and the file
|
||||
does not exist, one process will create the file and others who
|
||||
reach later will return error. */
|
||||
if(rank == fd->hints->ranklist[0]) {
|
||||
fd->access_mode = access_mode;
|
||||
(*(fd->fns->ADIOI_xxx_Open))(fd, error_code);
|
||||
MPI_Bcast(error_code, 1, MPI_INT, \
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
/* if no error, close the file and reopen normally below */
|
||||
if (*error_code == MPI_SUCCESS)
|
||||
(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
|
||||
}
|
||||
else MPI_Bcast(error_code, 1, MPI_INT,
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
if (*error_code != MPI_SUCCESS) {
|
||||
goto fn_exit;
|
||||
}
|
||||
else {
|
||||
/* turn off EXCL for real open */
|
||||
access_mode = access_mode ^ ADIO_EXCL;
|
||||
}
|
||||
if (*error_code == MPI_SUCCESS) {
|
||||
(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
|
||||
}
|
||||
} else {
|
||||
MPI_Bcast(error_code, 1, MPI_INT,
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
}
|
||||
if (*error_code != MPI_SUCCESS) {
|
||||
goto fn_exit;
|
||||
} else {
|
||||
/* turn off EXCL for real open */
|
||||
access_mode = access_mode ^ ADIO_EXCL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
/* the actual optimized create on one, open on all */
|
||||
if (access_mode & ADIO_CREATE && fd->file_system != ADIO_PVFS2) {
|
||||
if(rank == fd->hints->ranklist[0]) {
|
||||
/* remove delete_on_close flag if set */
|
||||
if (access_mode & ADIO_DELETE_ON_CLOSE)
|
||||
fd->access_mode = access_mode ^ ADIO_DELETE_ON_CLOSE;
|
||||
else
|
||||
fd->access_mode = access_mode;
|
||||
|
||||
(*(fd->fns->ADIOI_xxx_Open))(fd, error_code);
|
||||
MPI_Bcast(error_code, 1, MPI_INT, \
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
/* if no error, close the file and reopen normally below */
|
||||
if (*error_code == MPI_SUCCESS)
|
||||
(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
|
||||
/* the actual optimized create on one, open on all */
|
||||
if (access_mode & ADIO_CREATE && fd->file_system != ADIO_PVFS2) {
|
||||
if(rank == fd->hints->ranklist[0]) {
|
||||
/* remove delete_on_close flag if set */
|
||||
if (access_mode & ADIO_DELETE_ON_CLOSE)
|
||||
fd->access_mode = access_mode ^ ADIO_DELETE_ON_CLOSE;
|
||||
else
|
||||
fd->access_mode = access_mode;
|
||||
|
||||
fd->access_mode = access_mode; /* back to original */
|
||||
}
|
||||
else MPI_Bcast(error_code, 1, MPI_INT, fd->hints->ranklist[0], fd->comm);
|
||||
(*(fd->fns->ADIOI_xxx_Open))(fd, error_code);
|
||||
MPI_Bcast(error_code, 1, MPI_INT, \
|
||||
fd->hints->ranklist[0], fd->comm);
|
||||
/* if no error, close the file and reopen normally below */
|
||||
if (*error_code == MPI_SUCCESS)
|
||||
(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
|
||||
|
||||
if (*error_code != MPI_SUCCESS) {
|
||||
goto fn_exit;
|
||||
}
|
||||
else {
|
||||
/* turn off CREAT (and EXCL if set) for real multi-processor open */
|
||||
access_mode ^= ADIO_CREATE;
|
||||
if (access_mode & ADIO_EXCL)
|
||||
access_mode ^= ADIO_EXCL;
|
||||
}
|
||||
}
|
||||
fd->access_mode = access_mode; /* back to original */
|
||||
}
|
||||
else MPI_Bcast(error_code, 1, MPI_INT, fd->hints->ranklist[0], fd->comm);
|
||||
|
||||
if (*error_code != MPI_SUCCESS) {
|
||||
goto fn_exit;
|
||||
}
|
||||
else {
|
||||
/* turn off CREAT (and EXCL if set) for real multi-processor open */
|
||||
access_mode ^= ADIO_CREATE;
|
||||
if (access_mode & ADIO_EXCL)
|
||||
access_mode ^= ADIO_EXCL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if we are doing deferred open, non-aggregators should return now */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user