Commits

Jed Brown committed 48d998b

VecView_MPI_Binary: add missing call to MPI_File_set_view()

Broken since feature was initially added in:

commit 617f0dbcfa0e0807e83c23b2a685058f063b6c6d
Author: Barry Smith <bsmith@mcs.anl.gov>

added MPI IO version of VecView_Seq_Binary and VecView_MPI_Binary
changed Fortran PetscInitialize() so error from pxfgetarg in getting program name
does not cause program stopping error

  • Participants
  • Parent commits da5011c

Comments (0)

Files changed (1)

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);