| binv.c (e1b06f76ad35ce2a89fc667d1feb3b2de35f6e0a) | binv.c (bebe2cf65d55febe21a5af8db2bd2e168caaa2e7) |
|---|---|
| 1 2#include <petsc/private/viewerimpl.h> /*I "petscviewer.h" I*/ 3#include <fcntl.h> 4#if defined(PETSC_HAVE_UNISTD_H) 5#include <unistd.h> 6#endif 7#if defined(PETSC_HAVE_IO_H) 8#include <io.h> --- 1298 unchanged lines hidden (view full) --- 1307 MPI_File_open(PetscObjectComm((PetscObject)viewer),vbinary->filename,MPI_MODE_RDONLY,MPI_INFO_NULL,&vbinary->mfdes);CHKERRQ(ierr); 1308 } else if (type == FILE_MODE_WRITE) { 1309 MPI_File_open(PetscObjectComm((PetscObject)viewer),vbinary->filename,MPI_MODE_WRONLY | MPI_MODE_CREATE,MPI_INFO_NULL,&vbinary->mfdes);CHKERRQ(ierr); 1310 } 1311 1312 /* 1313 try to open info file: all processors open this file if read only 1314 | 1 2#include <petsc/private/viewerimpl.h> /*I "petscviewer.h" I*/ 3#include <fcntl.h> 4#if defined(PETSC_HAVE_UNISTD_H) 5#include <unistd.h> 6#endif 7#if defined(PETSC_HAVE_IO_H) 8#include <io.h> --- 1298 unchanged lines hidden (view full) --- 1307 MPI_File_open(PetscObjectComm((PetscObject)viewer),vbinary->filename,MPI_MODE_RDONLY,MPI_INFO_NULL,&vbinary->mfdes);CHKERRQ(ierr); 1308 } else if (type == FILE_MODE_WRITE) { 1309 MPI_File_open(PetscObjectComm((PetscObject)viewer),vbinary->filename,MPI_MODE_WRONLY | MPI_MODE_CREATE,MPI_INFO_NULL,&vbinary->mfdes);CHKERRQ(ierr); 1310 } 1311 1312 /* 1313 try to open info file: all processors open this file if read only 1314 |
| 1315 Below is identical code to the code for Binary above, should be put in seperate routine | 1315 Below is identical code to the code for Binary above, should be put in separate routine |
| 1316 */ 1317 if (!vbinary->skipinfo && (!rank || type == FILE_MODE_READ)) { 1318 char infoname[PETSC_MAX_PATH_LEN],iname[PETSC_MAX_PATH_LEN]; 1319 1320 ierr = PetscStrcpy(infoname,vbinary->filename);CHKERRQ(ierr); 1321 /* remove .gz if it ends library name */ 1322 ierr = PetscStrstr(infoname,".gz",&gz);CHKERRQ(ierr); 1323 if (gz) { --- 213 unchanged lines hidden --- | 1316 */ 1317 if (!vbinary->skipinfo && (!rank || type == FILE_MODE_READ)) { 1318 char infoname[PETSC_MAX_PATH_LEN],iname[PETSC_MAX_PATH_LEN]; 1319 1320 ierr = PetscStrcpy(infoname,vbinary->filename);CHKERRQ(ierr); 1321 /* remove .gz if it ends library name */ 1322 ierr = PetscStrstr(infoname,".gz",&gz);CHKERRQ(ierr); 1323 if (gz) { --- 213 unchanged lines hidden --- |