24 |
#include "Mesh.h" |
#include "Mesh.h" |
25 |
#include "Assemble.h" |
#include "Assemble.h" |
26 |
#include "vtkCellType.h" /* copied from vtk source directory !!! */ |
#include "vtkCellType.h" /* copied from vtk source directory !!! */ |
27 |
|
#include "paso/PasoUtil.h" |
28 |
|
|
29 |
#define LEN_PRINTED_INT_FORMAT (9+1) |
#define LEN_PRINTED_INT_FORMAT (9+1) |
30 |
#define INT_FORMAT "%d " |
#define INT_FORMAT "%d " |
65 |
index_t myFirstNode, myLastNode, *globalNodeIndex, k, *node_index, myFirstCell; |
index_t myFirstNode, myLastNode, *globalNodeIndex, k, *node_index, myFirstCell; |
66 |
#ifdef PASO_MPI |
#ifdef PASO_MPI |
67 |
int ierr; |
int ierr; |
68 |
int amode = MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_SEQUENTIAL; |
/* int amode = MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_SEQUENTIAL; */ |
69 |
|
const int amode = MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_UNIQUE_OPEN; |
70 |
MPI_File mpi_fileHandle_p; |
MPI_File mpi_fileHandle_p; |
71 |
MPI_Status mpi_status; |
MPI_Status mpi_status; |
72 |
MPI_Request mpi_req; |
MPI_Request mpi_req; |
133 |
/*XFS only */ |
/*XFS only */ |
134 |
/* MPI_Info_set(mpi_info, "direct_write", "true"); */ |
/* MPI_Info_set(mpi_info, "direct_write", "true"); */ |
135 |
#endif |
#endif |
136 |
|
if ( my_mpi_rank == 0) { |
137 |
|
if (Paso_fileExists(filename_p)) remove(filename_p); |
138 |
|
} |
139 |
ierr=MPI_File_open(mesh_p->Nodes->MPIInfo->comm, (char*)filename_p, amode,mpi_info, &mpi_fileHandle_p); |
ierr=MPI_File_open(mesh_p->Nodes->MPIInfo->comm, (char*)filename_p, amode,mpi_info, &mpi_fileHandle_p); |
140 |
if (ierr != MPI_SUCCESS) { |
if (ierr != MPI_SUCCESS) { |
141 |
perror(filename_p); |
perror(filename_p); |