Exemplo n.º 1
0
void LFS::flush() {
    // write segments
    for (auto segment: segments) {
        segment->write();
    }
    // write checkpoint region 
    flushCheckpoint();
}
Exemplo n.º 2
0
void seissol::checkpoint::sionlib::Fault::write(int timestepFault) {  
#ifdef USE_SIONLIB
  if (numSides() == 0)
    return;
  int globalrank,numFiles;
  char fname[1023], *newfname=NULL; 
  sion_int32 fsblksize= utils::Env::get<sion_int32>("SEISSOL_CHECKPOINT_BLOCK_SIZE", 0);
  unsigned long lidentifier;
  lidentifier = identifier();
  m_gComm = comm(); m_lComm = m_gComm;
  globalrank = rank(); numFiles = 0; 
  setpos();
  checkErr(sion_fwrite(&lidentifier, sizeof(unsigned long),1,m_files[odd()]));
  checkErr(sion_fwrite(&timestepFault, sizeof(timestepFault),1,m_files[odd()]));
  for (int i = 0; i < NUM_VARIABLES; i++){
    checkErr(sion_fwrite(data(i),sizeof(real),this->numSides()*this->numBndGP(),m_files[odd()]));
  }
  flushCheckpoint(); 
  //  finalizeCheckpoint();  
#endif
}