Commit e7d37b3a authored by Francois Tessier's avatar Francois Tessier

Change the preprocessor variable printing debug messages

parent 13d84319
......@@ -76,7 +76,6 @@ void Tapioca::SetDefaultValues ()
this->nCommit_ = 0;
this->writeDevNull_ = false;
this->pipelinedBuffers_ = true;
/* DEBUG */
}
......@@ -238,9 +237,9 @@ void Tapioca::IdentifyMyAggregators ()
}
}
#ifdef DEBUG
#ifdef DBG
if (this->commRank_ == 4) {
fprintf (stdout, "[DEBUG] Rounds distrib. on %d aggregators: AGG ", this->nAggr_);
printMsg ( DEBUG, "Rounds distrib. on %d aggregators: AGG ", this->nAggr_);
for ( i = 0; i < this->totalNeededBuffers_; i++ )
fprintf (stdout, "%d ", rounds[i].aggr);
fprintf (stdout, "\n RND ");
......@@ -364,7 +363,7 @@ void Tapioca::ElectAggregators ()
if ( this->globalAggregatorsRanks[i] == aggr )
this->aggregatorsRanks[i] = aggrRank;
#ifdef DEBUG
#ifdef DBG
int coords[topology.NetworkDimensions() + 1];
if ( this->commRank_ == aggrRank ) {
topology.RankToCoordinates (this->worldRank_, coords);
......@@ -414,10 +413,10 @@ void Tapioca::InitAggregators ()
{
int aggr, retval;
this->memBuffer0.memAlloc ( this->bufferSize_, DDR, this->amAnAggr_, "", this->subComm_ );
this->memBuffer1.memAlloc ( this->bufferSize_, DDR, this->amAnAggr_, "", this->subComm_ );
this->memBuffer0.memAlloc ( this->bufferSize_, HBM, this->amAnAggr_, "", this->subComm_ );
this->memBuffer1.memAlloc ( this->bufferSize_, HBM, this->amAnAggr_, "", this->subComm_ );
#ifdef DEBUG
#ifdef DBG
if (this->commRank_ == MASTER) {
fprintf (stdout, "[DEBUG] %d RMA windows created (%d aggr., %d buffers)\n",
NBUFFERS, this->nAggr_, NBUFFERS);
......@@ -456,7 +455,7 @@ const char* Tapioca::getStrategyName ()
void Tapioca::HandleMPIError (int retval)
{
#ifdef DEBUG
#ifdef DBG
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
if (retval != MPI_SUCCESS) {
......
......@@ -21,7 +21,7 @@ int Tapioca::RankShortestPath (MPI_Comm aggrComm, int64_t dataSize)
this->amAnAggr_ = true;
}
#ifdef DEBUG
#ifdef DBG
if ( shortestPath.rank == commRank )
fprintf (stdout, "[DEBUG] Aggr. rank %d in aggrComm, distance to I/O node %d hops\n",
shortestPath.rank, shortestPath.hops);
......@@ -54,7 +54,7 @@ int Tapioca::RankLongestPath (MPI_Comm aggrComm, int64_t dataSize)
this->amAnAggr_ = true;
}
#ifdef DEBUG
#ifdef DBG
if ( longestPath.rank == commRank )
fprintf (stdout, "[DEBUG] Aggr. rank %d in aggrComm, distance to I/O node %d hops\n",
longestPath.rank, longestPath.hops);
......@@ -124,7 +124,7 @@ int Tapioca::RankTopologyAware (MPI_Comm aggrComm, int64_t dataSize)
MPI_Bcast ( &aggrRank, 1, MPI_INT, minCost.rank, aggrComm );
#ifdef DEBUG
#ifdef DBG
if ( minCost.rank == aggrCommRank )
fprintf (stdout, "[DEBUG] Aggr. rank %d in aggrComm, distance to I/O node %d hops, cost: %.4f\n",
minCost.rank, topology.DistanceToIONode ( worldRank ), minCost.cost );
......@@ -250,7 +250,7 @@ int Tapioca::RankContentionAware (MPI_Comm aggrComm, int64_t dataSize)
MPI_Bcast ( &aggrRank, 1, MPI_INT, minCost.rank, aggrComm );
#ifdef DEBUG
#ifdef DBG
if ( minCost.rank == aggrCommRank )
fprintf (stdout, "[DEBUG] Aggr. rank %d in aggrComm, distance to I/O node %d hops, cost: %.4f\n",
minCost.rank, topology.DistanceToIONode ( this->worldRank_ ), minCost.cost );
......
......@@ -33,7 +33,7 @@ void Tapioca::ReadInitialize (char *filename, int64_t *chunkCount, int *chunkSiz
this->SetCommValues ();
this->SetOffsets ();
#ifdef DEBUG
#ifdef DBG
if (this->commRank_ == MASTER) {
fprintf (stdout, "[DEBUG] #Aggr = %d \n", this->nAggr_);
fprintf (stdout, "[DEBUG] bufferSize = %lld \n", this->bufferSize_);
......
......@@ -38,7 +38,7 @@ void Tapioca::WriteInitialize (char *filename, int64_t *chunkCount, int *chunkSi
MPI_MODE_WRONLY | MPI_MODE_CREATE,
MPI_INFO_NULL, &this->devNullFileHandle_);
#ifdef DEBUG
#ifdef DBG
if (this->commRank_ == MASTER) {
fprintf (stdout, "[DEBUG] #Aggr = %d \n", this->nAggr_);
fprintf (stdout, "[DEBUG] bufferSize = %lld \n", this->bufferSize_);
......
Markdown is supported
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