Skip to content
Snippets Groups Projects

added Environment for MPI initialization

Merged Praetorius, Simon requested to merge feature/environment into master

This MR replaces the old AMDiS::init() - AMDiS::finalize() pattern with a RAII class Environment, to be instantiated at the begin of the main method, i.e.

int main(int argc, char** argv)
{
  Environment env(argc, argv);

  // get MPI rank and size from environment after instantiation:
  std::cout << Environment::mpiRank();
  std::cout << Environment::mpiSize(); 
}

the ``finalize'' is called automatically when env is destructed, i.e. at the end of main().

Edited by Praetorius, Simon

Merge request reports

Checking pipeline status.

Approval is optional

Merged by Praetorius, SimonPraetorius, Simon 5 years ago (May 3, 2019 4:14pm UTC)

Merge details

  • Changes merged into master with 4e19770b.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading