Commits

Jed Brown  committed 1282a11 Merge

Merge branch 'jed/fix-vecview-mpiio'

* jed/fix-vecview-mpiio:
VecView_MPI_Binary: add missing call to MPI_File_set_view()

  • Participants
  • Parent commits 5bad0b2, 48d998b

Comments (0)

Files changed (1)

File src/vec/vec/impls/mpi/pdvec.c

 
     ierr = PetscViewerBinaryGetMPIIODescriptor(viewer,&mfdes);CHKERRQ(ierr);
     ierr = PetscViewerBinaryGetMPIIOOffset(viewer,&off);CHKERRQ(ierr);
+    ierr = MPI_File_set_view(mfdes,off,MPIU_SCALAR,view,(char*)"native",MPI_INFO_NULL);CHKERRQ(ierr);
     ierr = MPIU_File_write_all(mfdes,(void*)xarray,lsizes[0],MPIU_SCALAR,MPI_STATUS_IGNORE);CHKERRQ(ierr);
     ierr = PetscViewerBinaryAddMPIIOOffset(viewer,xin->map->N*sizeof(PetscScalar));CHKERRQ(ierr);
     ierr = MPI_Type_free(&view);CHKERRQ(ierr);