ESyS-Particle  4.0.1
CheckPointParams.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef CHECKPOINTPARAMS_H
15 #define CHECKPOINTPARAMS_H
16 
17 #include <mpi.h>
18 
19 #include <string>
20 #include <iostream>
21 
22 
23 class AMPIBuffer;
24 
29 {
30 public:
31  CheckPointParams(const std::string &fileNamePrefix, int time, int rank);
32 
34 
38  std::string getFileName() const;
39 
40  void packInto(AMPIBuffer *mpiBuff) const;
41  static CheckPointParams unpackFrom(AMPIBuffer *mpiBuff, MPI_Comm mpiComm=MPI_COMM_WORLD);
42 
43  //friend std::ostream& operator<<(std::ostream &oStream, const CheckPointParams &checkPointParams);
44 
45 protected:
47 
48 private:
52  std::string m_fileNamePrefix;
53 
57  int m_time;
58 
62  int m_rank;
63 };
64 
65 #endif