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

« back to all changes in this revision

Viewing changes to src/MPIIO/dump_cfg_mpiio.h

  • 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:
 
1
/* -*- c++ -*- ----------------------------------------------------------
 
2
   LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
 
3
   http://lammps.sandia.gov, Sandia National Laboratories
 
4
   Steve Plimpton, sjplimp@sandia.gov
 
5
 
 
6
   Copyright (2003) Sandia Corporation.  Under the terms of Contract
 
7
   DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
 
8
   certain rights in this software.  This software is distributed under
 
9
   the GNU General Public License.
 
10
 
 
11
   See the README file in the top-level LAMMPS directory.
 
12
------------------------------------------------------------------------- */
 
13
 
 
14
#ifdef DUMP_CLASS
 
15
 
 
16
DumpStyle(cfg/mpiio,DumpCFGMPIIO)
 
17
 
 
18
#else
 
19
 
 
20
#ifndef LMP_DUMP_CFG_MPIIO_H
 
21
#define LMP_DUMP_CFG_MPIIO_H
 
22
 
 
23
#include "dump_cfg.h"
 
24
 
 
25
namespace LAMMPS_NS {
 
26
 
 
27
class DumpCFGMPIIO : public DumpCFG {
 
28
 public:
 
29
  DumpCFGMPIIO(class LAMMPS *, int, char **);
 
30
  virtual ~DumpCFGMPIIO();
 
31
 
 
32
 protected:
 
33
  bigint sumFileSize;  // size in bytes of the file up through this rank offset from the end of the header data
 
34
  char *headerBuffer; // buffer for holding header data
 
35
 
 
36
  MPI_File mpifh;
 
37
  MPI_Offset mpifo,offsetFromHeader,headerSize, currentFileSize;
 
38
  int performEstimate; // switch for write_data and write_header methods to use for gathering data and detemining filesize for preallocation vs actually writing the data
 
39
  char *filecurrent;  // name of file for this round (with % and * replaced)
 
40
 
 
41
#if defined(_OPENMP)
 
42
  int convert_string_omp(int, double *);  // multithreaded version of convert_string
 
43
#endif
 
44
 
 
45
  virtual void openfile();
 
46
  virtual void init_style();
 
47
  virtual void write_header(bigint);
 
48
  virtual void write();
 
49
  virtual void write_data(int, double *);
 
50
 
 
51
  typedef void (DumpCFGMPIIO::*FnPtrData)(int, double *);
 
52
  FnPtrData write_choice;             // ptr to write data functions
 
53
  void write_string(int, double *);
 
54
};
 
55
 
 
56
}
 
57
 
 
58
#endif
 
59
#endif
 
60
 
 
61
/* ERROR/WARNING messages:
 
62
 
 
63
E: Dump cfg arguments must start with 'mass type xs ys zs' or 'mass type xsu ysu zsu'
 
64
 
 
65
This is a requirement of the CFG output format.  See the dump cfg doc
 
66
page for more details.
 
67
 
 
68
E: Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu
 
69
 
 
70
Self-explanatory.
 
71
 
 
72
E: Invalid keyword in dump cfg command
 
73
 
 
74
Self-explanatory.
 
75
 
 
76
E: Dump cfg requires one snapshot per file
 
77
 
 
78
Use the wildcard "*" character in the filename.
 
79
 
 
80
*/