~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/io/BinaryFile.cpp

  • Committer: Niclas Jansson
  • Date: 2011-06-16 07:15:30 UTC
  • Revision ID: njansson@csc.kth.se-20110616071530-vjezkrvm87nn8pna
Fixed invalid write of data

Show diffs side-by-side

added added

removed removed

Lines of Context:
885
885
  Mesh& mesh  = meshfunction.mesh();
886
886
  T *values = new T[meshfunction.size()];
887
887
  T *vp = &values[0];
888
 
  
 
888
 
889
889
  BinaryFileHeader hdr;
890
890
  uint pe_rank = MPI::processNumber();  
891
891
  hdr.magic = BINARY_MAGIC;
944
944
#endif
945
945
 
946
946
  MPI_File_write_at_all(fh, byte_offset + offset * sizeof(T), values,
947
 
                        sizeof(T), MPI_BYTE, MPI_STATUS_IGNORE);
 
947
                        local_size * sizeof(T), MPI_BYTE, MPI_STATUS_IGNORE);
948
948
 
949
949
  MPI_File_close(&fh);
950
950