Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Transport.cpp
*
* Created on: Dec 5, 2016
* Author: wfg
*/
#include "core/Transport.h"
namespace adios
{
Transport::Transport(const std::string type, MPI_Comm mpiComm,
const bool debugMode)
: m_Type{type}, m_MPIComm{mpiComm}, m_DebugMode{debugMode}
{
MPI_Comm_rank(m_MPIComm, &m_RankMPI);
MPI_Comm_size(m_MPIComm, &m_SizeMPI);
}
Transport::~Transport() {}
void Transport::SetBuffer(char *buffer, size_t size) {}
void Transport::Flush() {}
void Transport::Close() {}
void Transport::InitProfiler(const std::string accessMode,
const Support::Resolutions resolution)
{
m_Profiler.m_Timers.emplace_back("open", Support::Resolutions::mus);
if (accessMode == "w" || accessMode == "write")
m_Profiler.m_Timers.emplace_back("write", resolution);
else if (accessMode == "a" || accessMode == "append")
m_Profiler.m_Timers.emplace_back("append", resolution);
else if (accessMode == "r" || accessMode == "read")
m_Profiler.m_Timers.emplace_back("read", resolution);
m_Profiler.m_Timers.emplace_back("close", Support::Resolutions::mus);
m_Profiler.m_TotalBytes.push_back(0);
m_Profiler.m_IsActive = true;
}
} // end namespace