Skip to content

Commit

Permalink
Merge pull request #13 from SCOREC/cws/closeEngine
Browse files Browse the repository at this point in the history
adios_comm: close the engine in dtor
  • Loading branch information
cwsmith authored Jul 6, 2022
2 parents 6b61356 + 41794d6 commit f833441
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions redev_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,19 @@ class AdiosComm : public Communicator<T> {
: comm(comm_), recvRanks(recvRanks_), eng(eng_), io(io_), name(name_), verbose(0) {
inMsg.knownSizes = false;
}

//rule of 5 en.cppreference.com/w/cpp/language/rule_of_three
/// destructor to close the engine
~AdiosComm() {
eng.Close();
}
/// We are explicitly not allowing copy/move constructor/assignment as we don't
/// know if the ADIOS2 Engine and IO objects can be safely copied/moved.
AdiosComm(const AdiosComm& other) = delete;
AdiosComm(AdiosComm&& other) = delete;
AdiosComm& operator=(const AdiosComm& other) = delete;
AdiosComm& operator=(AdiosComm&& other) = delete;

void SetOutMessageLayout(LOs& dest_, LOs& offsets_) {
REDEV_FUNCTION_TIMER;
outMsg = OutMessageLayout{dest_, offsets_};
Expand Down

0 comments on commit f833441

Please sign in to comment.