HavoqGT
havoqgt::mpi::LogStep Class Reference

#include <log_step.hpp>

Public Member Functions

 LogStep (const std::string &stp_str, MPI_Comm mpi_comm, int mpi_rank)
 
 ~LogStep ()
 

Private Attributes

double time_
 
int mb_read_
 
int mb_written_
 
std::string stp_str_
 
MPI_Comm mpi_comm_
 
int mpi_rank_
 

Detailed Description

Definition at line 59 of file log_step.hpp.

Constructor & Destructor Documentation

havoqgt::mpi::LogStep::LogStep ( const std::string &  stp_str,
MPI_Comm  mpi_comm,
int  mpi_rank 
)
inline

Definition at line 61 of file log_step.hpp.

62  : stp_str_(stp_str)
63  , mpi_comm_(mpi_comm)
64  , mpi_rank_(mpi_rank) {
65  MPI_Barrier(mpi_comm_);
66  if (mpi_rank_ == 0) {
67  time_ = MPI_Wtime();
68  std::cout << "Starting: " << stp_str_ << std::endl << std::flush;
69  }
70  if (mpi_rank_ % havoqgt_env()->node_local_comm().size() == 0) {
72  std::cout << "\t[" << mpi_rank_ << "] Dirty Pages: " << get_dirty_pages()
73  << "kb." << std::endl << std::flush;
74  }
75  MPI_Barrier(mpi_comm_);
76  }
std::string stp_str_
Definition: log_step.hpp:108
void get_io_stat_info(int &r, int &w)
uint32_t get_dirty_pages()
environment * havoqgt_env()

Here is the call graph for this function:

havoqgt::mpi::LogStep::~LogStep ( )
inline

Definition at line 78 of file log_step.hpp.

78  {
79  MPI_Barrier(mpi_comm_);
80 
81  if (mpi_rank_ == 0) {
82  time_ = MPI_Wtime() - time_;
83 
84  std::cout << "Finished: " << stp_str_ << " in " << time_ << " seconds."
85  << std::endl << std::flush;
86  }
87  if (mpi_rank_ % havoqgt_env()->node_local_comm().size() == 0) {
88  int read = -1;
89  int written = -1;
90  get_io_stat_info(read, written);
91 
92  std::cout
93  << "\t[" << mpi_rank_ << "]" << std::endl
94  << "\tSpace used: " << get_disk_utilization() << "gB." << std::endl
95  << "\tDirty Pages: " << get_dirty_pages() << "kB." << std::endl
96  << "\tMB Read: " << (read - mb_read_) << std::endl
97  << "\tMB Written: " << (written - mb_written_) << std::endl
98  << std::flush;
99  }
100  MPI_Barrier(mpi_comm_);
101  }
std::string stp_str_
Definition: log_step.hpp:108
void get_io_stat_info(int &r, int &w)
uint32_t get_dirty_pages()
environment * havoqgt_env()
uint32_t get_disk_utilization()

Here is the call graph for this function:

Member Data Documentation

int havoqgt::mpi::LogStep::mb_read_
private

Definition at line 105 of file log_step.hpp.

int havoqgt::mpi::LogStep::mb_written_
private

Definition at line 106 of file log_step.hpp.

MPI_Comm havoqgt::mpi::LogStep::mpi_comm_
private

Definition at line 109 of file log_step.hpp.

int havoqgt::mpi::LogStep::mpi_rank_
private

Definition at line 110 of file log_step.hpp.

std::string havoqgt::mpi::LogStep::stp_str_
private

Definition at line 108 of file log_step.hpp.

double havoqgt::mpi::LogStep::time_
private

Definition at line 104 of file log_step.hpp.


The documentation for this class was generated from the following file: