Commit a9a46ce9 authored by Brad King's avatar Brad King
Browse files

core: Refactor ADIOS factory to make communicator member private

Provide a `GetComm()` method to get it publicly.
parent 33280a2c
......@@ -38,8 +38,8 @@ public:
/** if true will do more checks, exceptions, warnings, expect slower code */
const bool m_DebugMode = true;
/** Passed from parallel constructor, MPI_Comm is a pointer itself. */
MPI_Comm m_MPIComm;
/** Get the communicator passed to constructor for parallel case. */
MPI_Comm GetComm() const { return m_MPIComm; }
/** Changed by language bindings in constructor */
const std::string m_HostLanguage = "C++";
......@@ -184,6 +184,9 @@ public:
void RemoveAllIOs() noexcept;
private:
/** Passed from parallel constructor, MPI_Comm is a pointer itself. */
MPI_Comm m_MPIComm;
/** XML File to be read containing configuration information */
const std::string m_ConfigFile;
......
......@@ -696,7 +696,7 @@ Engine &IO::Open(const std::string &name, const Mode mode,
Engine &IO::Open(const std::string &name, const Mode mode)
{
return Open(name, mode, m_ADIOS.m_MPIComm);
return Open(name, mode, m_ADIOS.GetComm());
}
Engine &IO::GetEngine(const std::string &name)
......
......@@ -151,7 +151,7 @@ void ParseConfigXML(
auto lf_FileContents = [&](const std::string &configXML) -> std::string {
const std::string fileContents(helper::BroadcastFile(
configXML, adios.m_MPIComm,
configXML, adios.GetComm(),
"when parsing configXML file, in call to the ADIOS constructor"));
if (adios.m_DebugMode)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment