ls1-MarDyn
ls1-MarDyn molecular dynamics code
MPICheckpointWriter.h
Go to the documentation of this file.
1
6#ifndef MPICHECKPOINTWRITER_H_
7#define MPICHECKPOINTWRITER_H_
8
9#include <string>
10
11#include "plugins/PluginBase.h"
12#ifdef ENABLE_MPI
13#include "utils/MPI_Info_object.h"
14#endif
15
17public:
18
38 MPICheckpointWriter(unsigned long writeFrequency
39 , std::string outputPrefix, bool incremental=true
40 , std::string datarep=std::string(""));
41 //~MPICheckpointWriter() {};
42
43 void readXML(XMLfileUnits& xmlconfig);
44
45 void init(ParticleContainer *particleContainer,
46 DomainDecompBase *domainDecomp, Domain *domain);
47 void endStep(
48 ParticleContainer *particleContainer,
49 DomainDecompBase *domainDecomp, Domain *domain,
50 unsigned long simstep
51 );
52 void finish(ParticleContainer *particleContainer,
53 DomainDecompBase *domainDecomp, Domain *domain);
54
56 return std::string("MPICheckpointWriter");
57 }
58 static PluginBase* createInstance() { return new MPICheckpointWriter(); }
59private:
60 static const char _magicVersion[56];
61 static const int _endiannesstest;
62
63 std::string _outputPrefix;
64 unsigned long _writeFrequency;
65 bool _incremental;
66 bool _appendTimestamp;
67 std::string _datarep;
68 bool _measureTime;
69#ifdef ENABLE_MPI
70 MPI_Info_object _mpiinfo;
71#endif
72 unsigned long _particlesbuffersize = 0;
73};
74
75#endif /*MPICHECKPOINTWRITER_H_*/
76
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: MPICheckpointWriter.h:16
std::string getPluginName()
return the name of the plugin
Definition: MPICheckpointWriter.h:55
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method finish will be called at the end of the simulation.
Definition: MPICheckpointWriter.cpp:407
void endStep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
Method endStep will be called at the end of each time step.
Definition: MPICheckpointWriter.cpp:134
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method init will be called at the begin of the simulation.
Definition: MPICheckpointWriter.cpp:113
void readXML(XMLfileUnits &xmlconfig)
Method readXML will be called once for each plugin section in the input file.
Definition: MPICheckpointWriter.cpp:48
MPICheckpointWriter(unsigned long writeFrequency, std::string outputPrefix, bool incremental=true, std::string datarep=std::string(""))
writes a checkpoint file that can be used to continue the simulation using MPIIO
MPI Info object implements functionalities to handle MPI Info objects, e.g. initialize from a XML fil...
Definition: MPI_Info_object.h:14
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
The PluginBase class provides the interface for any kind of output/plugin classes - called "(output) ...
Definition: PluginBase.h:47
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270