Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • ExaHyPE-Engine ExaHyPE-Engine
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 68
    • Issues 68
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.

  • ExaHyPEExaHyPE
  • ExaHyPE-EngineExaHyPE-Engine
  • Issues
  • #130
Closed
Open
Issue created Feb 20, 2017 by Ghost User@ghostContributor

Guidebook: Fix recommendation for MPI Tags for Reductions

When implementing an own MPI Reductions plotter, the guidebook tells us we should write something like

  void finishRow() {
   #ifdef Parallel
   	// Question: Do we really reserve a free tag and release on each function call?
   	const int reductionTag = tarch::parallel::Node::getInstance().reserveFreeTag(
   		std::string("TimeSeriesReductions(") + filename + ")::finishRow()" );
   	if(master) {
   		double recieved[LEN];
   		for (int rank=1; rank<tarch::parallel::Node::getInstance().getNumberOfNodes(); rank++) {
   			if(!tarch::parallel::NodePool::getInstance().isIdleNode(rank)) {
   				MPI_Recv( &recieved[0], LEN, MPI_DOUBLE, rank, reductionTag, tarch::parallel::Node::getInstance().getCommunicator(), MPI_STATUS_IGNORE );
   				addValues(recieved);
   			}
   		}
   	} else {
   		for (int rank=1; rank<tarch::parallel::Node::getInstance().getNumberOfNodes(); rank++) {
   			if(!tarch::parallel::NodePool::getInstance().isIdleNode(rank)) {
   				MPI_Send( &data[0], LEN, MPI_DOUBLE, tarch::parallel::Node::getGlobalMasterRank(), reductionTag, tarch::parallel::Node::getInstance().getCommunicator());
   			}
   		}
   	}

   	tarch::parallel::Node::getInstance().releaseTag(reductionTag);
   #endif
   if(master) {
   	TimeSeriesReductions::finishRow();
   	writeRow();
   }
   }

However I assume this is not that good, looking at the output:

mpi-reservefreetags

First question: Does every plotter need it's own tag? In principal only if they would be called in parallel, isn't it?

In any case, I think the tags should'nt be created so frequently, isn't it? Instead, only once on startup time?

This should be fixed in the guidebook and my code :D

Assignee
Assign to
Time tracking

LRZ Homepage | Datenschutz | Dokumentation und Betriebsbedingungen | Impressum