Skip to content
Snippets Groups Projects

Consolidation with CDI-PIO (develop)

Merged Sergey Kosukhin requested to merge m300488/develop-rebase into develop
1 file
+ 4
3
Compare changes
  • Side-by-side
  • Inline
+ 4
3
@@ -42,8 +42,8 @@ initAFiledataFileWriteAtAll(const char *filename, size_t bs)
MPI_Comm commPio = commInqCommPio();
int sizePio = commInqSizePio();
size_t nameSize = strlen(filename) + 1;
struct fileMPIFWAA *of = Malloc(sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio + nameSize);
of->name = (char *) ((unsigned char *) of + sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio);
struct fileMPIFWAA *of = Malloc(sizeof(*of) + sizeof(of->collWriteSize[0]) * (size_t) sizePio);
of->name = Malloc(nameSize);
memcpy(of->name, filename, nameSize);
MPI_Info open_info = MPI_INFO_NULL;
@@ -81,7 +81,8 @@ destroyAFiledataFileWriteAtAll(void *v)
xmpi(MPI_Allreduce(MPI_IN_PLACE, &trailingOctets, 1, MPI_INT, MPI_LOR, commPio));
if (trailingOctets) xmpi(MPI_File_set_size(of->fh, endpos));
int iret = MPI_File_close(&of->fh);
Free(of->name);
of->name = NULL;
Free(of);
return iret == MPI_SUCCESS ? 0 : -1;
Loading