~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/MPIIO/dump_xyz_mpiio.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
  }
119
119
  else { // replace open
120
120
 
121
 
    int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | MPI_MODE_WRONLY  , MPI_INFO_NULL, &mpifh);
 
121
    int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE |  MPI_MODE_WRONLY  , MPI_INFO_NULL, &mpifh);
122
122
    if (err != MPI_SUCCESS) {
123
123
      char str[128];
124
124
      sprintf(str,"Cannot open dump file %s",filecurrent);
249
249
 
250
250
void DumpXYZMPIIO::write_header(bigint n)
251
251
{
252
 
  MPI_Status mpiStatus;
253
 
 
254
252
  if (performEstimate) {
255
253
 
256
254
    headerBuffer = (char *) malloc(MAX_TEXT_HEADER_SIZE);
262
260
  else { // write data
263
261
 
264
262
    if (me == 0)
265
 
      MPI_File_write_at(mpifh,mpifo,headerBuffer,headerSize,MPI_CHAR,&mpiStatus);
 
263
      MPI_File_write_at(mpifh,mpifo,headerBuffer,headerSize,MPI_CHAR,MPI_STATUS_IGNORE);
266
264
    mpifo += headerSize;
267
265
    free(headerBuffer);
268
266
  }
279
277
 
280
278
void DumpXYZMPIIO::write_string(int n, double *mybuf)
281
279
{
282
 
  MPI_Status mpiStatus;
283
 
 
284
280
  if (performEstimate) {
285
281
 
286
282
#if defined(_OPENMP)
300
296
    offsetFromHeader = ((incPrefix-bigintNsme)*sizeof(char));
301
297
  }
302
298
  else { // write data
303
 
    MPI_File_write_at_all(mpifh,mpifo+offsetFromHeader,sbuf,nsme,MPI_CHAR,&mpiStatus);
 
299
    MPI_File_write_at_all(mpifh,mpifo+offsetFromHeader,sbuf,nsme,MPI_CHAR,MPI_STATUS_IGNORE);
304
300
    if (flush_flag)
305
301
      MPI_File_sync(mpifh);
306
302
  }