ESyS-Particle
4.0.1
|
00001 00002 // // 00003 // Copyright (c) 2003-2011 by The University of Queensland // 00004 // Earth Systems Science Computational Centre (ESSCC) // 00005 // http://www.uq.edu.au/esscc // 00006 // // 00007 // Primary Business: Brisbane, Queensland, Australia // 00008 // Licensed under the Open Software License version 3.0 // 00009 // http://www.opensource.org/licenses/osl-3.0.php // 00010 // // 00012 00013 00014 #ifndef CHECKPOINTPARAMS_H 00015 #define CHECKPOINTPARAMS_H 00016 00017 #include <mpi.h> 00018 00019 #include <string> 00020 #include <iostream> 00021 00022 00023 class AMPIBuffer; 00024 00028 class CheckPointParams 00029 { 00030 public: 00031 CheckPointParams(const std::string &fileNamePrefix, int time, int rank); 00032 00033 ~CheckPointParams(); 00034 00038 std::string getFileName() const; 00039 00040 void packInto(AMPIBuffer *mpiBuff) const; 00041 static CheckPointParams unpackFrom(AMPIBuffer *mpiBuff, MPI_Comm mpiComm=MPI_COMM_WORLD); 00042 00043 //friend std::ostream& operator<<(std::ostream &oStream, const CheckPointParams &checkPointParams); 00044 00045 protected: 00046 CheckPointParams(); 00047 00048 private: 00052 std::string m_fileNamePrefix; 00053 00057 int m_time; 00058 00062 int m_rank; 00063 }; 00064 00065 #endif