diff --git a/src/Distributed/NestedGridRedistributeNodes.cc b/src/Distributed/NestedGridRedistributeNodes.cc index 3ab1263b0..435508557 100644 --- a/src/Distributed/NestedGridRedistributeNodes.cc +++ b/src/Distributed/NestedGridRedistributeNodes.cc @@ -110,7 +110,7 @@ redistributeNodes(DataBase& dataBase, // Output the initial load distribution statistics. const string initialLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "NestedGridRedistributeNodes::redistributeNodes initial load balancing:" << endl + if (procID == 0) cout << "NestedGridRedistributeNodes::redistributeNodes initial load balancing:" << endl << initialLoadStats << endl << endl; // Compute the total work, and the target work per processor. @@ -240,7 +240,7 @@ redistributeNodes(DataBase& dataBase, // Output the final load distribution statistics. const string finalLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "NestedGridRedistributeNodes::redistributeNodes final load balancing:" << endl + if (procID == 0) cout << "NestedGridRedistributeNodes::redistributeNodes final load balancing:" << endl << finalLoadStats << endl << endl; MPI_Barrier(Communicator::communicator()); diff --git a/src/Distributed/ParmetisRedistributeNodes.cc b/src/Distributed/ParmetisRedistributeNodes.cc index 40db1fcff..5806cdb44 100644 --- a/src/Distributed/ParmetisRedistributeNodes.cc +++ b/src/Distributed/ParmetisRedistributeNodes.cc @@ -669,7 +669,7 @@ printConnectivityStatistics(const map > >& neighbo CHECK(navgNeighbor > 0); avgNeighbor /= navgNeighbor; - cerr << "ParmetisRedistributeNodes:: min connections = " + cout << "ParmetisRedistributeNodes:: min connections = " << minNeighbor << endl << " max connections = " << maxNeighbor << endl diff --git a/src/Distributed/RedistributeNodes.cc b/src/Distributed/RedistributeNodes.cc index e7c4039ff..e8dd382f3 100644 --- a/src/Distributed/RedistributeNodes.cc +++ b/src/Distributed/RedistributeNodes.cc @@ -736,7 +736,7 @@ workPerNode(const DataBase& dataBase, // Output some statistics. const Scalar minWeight = result.min(); const Scalar maxWeight = result.max(); - if (Process::getRank() == 0) cerr << "RedistributeNodes::workPerNode: min/max work : " + if (Process::getRank() == 0) cout << "RedistributeNodes::workPerNode: min/max work : " << minWeight << " " << maxWeight << endl; diff --git a/src/Distributed/SortAndDivideRedistributeNodes1d.cc b/src/Distributed/SortAndDivideRedistributeNodes1d.cc index c3a0d4bf6..757afb17a 100644 --- a/src/Distributed/SortAndDivideRedistributeNodes1d.cc +++ b/src/Distributed/SortAndDivideRedistributeNodes1d.cc @@ -114,7 +114,7 @@ redistributeNodes(DataBase >& dataBase, // Output the initial load distribution statistics. const string initialLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl + if (procID == 0) cout << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl << initialLoadStats << endl << endl; // Compute the total work, and the target work per processor. @@ -183,7 +183,7 @@ redistributeNodes(DataBase >& dataBase, // Output the final load distribution statistics. const string finalLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl + if (procID == 0) cout << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl << finalLoadStats << endl << endl; MPI_Barrier(Communicator::communicator()); diff --git a/src/Distributed/SortAndDivideRedistributeNodes2d.cc b/src/Distributed/SortAndDivideRedistributeNodes2d.cc index a8b26cac1..0df67d4b6 100644 --- a/src/Distributed/SortAndDivideRedistributeNodes2d.cc +++ b/src/Distributed/SortAndDivideRedistributeNodes2d.cc @@ -125,14 +125,14 @@ redistributeNodes(DataBase >& dataBase, // Output the initial load distribution statistics. const string initialLoadStats = this->gatherDomainDistributionStatistics(work); if (procID == 0) { - cerr << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl + cout << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl << initialLoadStats << endl << " Domain distribution shape tensor: " << shapeTensor.eigenValues << endl << " Number of domains per work chunk: "; for (vector::const_iterator itr = domainsPerStep.begin(); itr != domainsPerStep.end(); - ++itr) cerr << " " << *itr; - cerr << endl; + ++itr) cout << " " << *itr; + cout << endl; } // Compute the total work, and the target work per processor. @@ -232,7 +232,7 @@ redistributeNodes(DataBase >& dataBase, // Output the final load distribution statistics. const string finalLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl + if (procID == 0) cout << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl << finalLoadStats << endl << endl; MPI_Barrier(Communicator::communicator()); diff --git a/src/Distributed/SortAndDivideRedistributeNodes3d.cc b/src/Distributed/SortAndDivideRedistributeNodes3d.cc index e3e0f7d88..c28b8f656 100644 --- a/src/Distributed/SortAndDivideRedistributeNodes3d.cc +++ b/src/Distributed/SortAndDivideRedistributeNodes3d.cc @@ -123,11 +123,11 @@ redistributeNodes(DataBase >& dataBase, // Output the initial load distribution statistics. const string initialLoadStats = this->gatherDomainDistributionStatistics(work); if (procID == 0) { - cerr << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl + cout << "SortAndDivideRedistributeNodes::redistributeNodes initial load balancing:" << endl << initialLoadStats << endl << " Domain distribution shape tensor: " << shapeTensor.eigenValues << endl; for (int i = 0; i != Dimension::nDim; ++i) { - cerr << " " << shapeTensor.eigenVectors.getColumn(i) << endl; + cout << " " << shapeTensor.eigenVectors.getColumn(i) << endl; } } @@ -205,7 +205,7 @@ redistributeNodes(DataBase >& dataBase, // Iterator over the number of z domains we'll be assigning. for (int iz = 0; iz != numZChunks; ++iz) { - if (procID == 0) cerr << "Assigning domain " << assignDomainID + if (procID == 0) cout << "Assigning domain " << assignDomainID << " of " << numProcs << "..."; // Peel off nodes from the front of the unassigned nodes, until the desired work @@ -231,7 +231,7 @@ redistributeNodes(DataBase >& dataBase, // Increment the domain we're assigning to. ++assignDomainID; - if (procID == 0) cerr << "Done." << endl; + if (procID == 0) cout << "Done." << endl; } @@ -272,7 +272,7 @@ redistributeNodes(DataBase >& dataBase, // Output the final load distribution statistics. const string finalLoadStats = this->gatherDomainDistributionStatistics(work); - if (procID == 0) cerr << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl + if (procID == 0) cout << "SortAndDivideRedistributeNodes::redistributeNodes final load balancing:" << endl << finalLoadStats << endl << endl; MPI_Barrier(Communicator::communicator()); diff --git a/src/Distributed/SpaceFillingCurveRedistributeNodes.cc b/src/Distributed/SpaceFillingCurveRedistributeNodes.cc index ee6f135f5..e3d662daa 100644 --- a/src/Distributed/SpaceFillingCurveRedistributeNodes.cc +++ b/src/Distributed/SpaceFillingCurveRedistributeNodes.cc @@ -157,27 +157,27 @@ redistributeNodes(DataBase& dataBase, // Compute the target work per domain. const Scalar targetWork = workField.sumElements()/numProcs; - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: Target work per process " << targetWork << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: Target work per process " << targetWork << endl; // Compute the Key indices for each point on this processor. - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: Hashing indices" << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: Hashing indices" << endl; FieldList indices = computeHashedIndices(dataBase); // Find the range of hashed indices. const Key indexMin = indices.min(); const Key indexMax = indices.max(); CHECK(indexMax < indexMax + indexMax); - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: Index min/max : " << indexMin << " " << indexMax << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: Index min/max : " << indexMin << " " << indexMax << endl; // Build the array of (hashed index, DomainNode) pairs. // Note this comes back locally sorted. - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: sorting indices" << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: sorting indices" << endl; vector > > sortedIndices = buildIndex2IDPairs(indices, nodeDistribution); const int numLocalNodes = nodeDistribution.size(); // Build our set of unique indices and their count. - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: Counting uniques and such" << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: Counting uniques and such" << endl; vector uniqueIndices; vector count; vector work; @@ -209,7 +209,7 @@ redistributeNodes(DataBase& dataBase, CHECK(work.size() == uniqueIndices.size()); } maxCount = allReduce(maxCount, SPHERAL_OP_MAX); - if (procID == 0) cerr << "SpaceFillingCurveRedistributeNodes: max redundancy is " << maxCount << endl; + if (procID == 0) cout << "SpaceFillingCurveRedistributeNodes: max redundancy is " << maxCount << endl; // // DEBUG // { diff --git a/src/Distributed/VoronoiRedistributeNodes.cc b/src/Distributed/VoronoiRedistributeNodes.cc index 9449965fc..142782ec6 100644 --- a/src/Distributed/VoronoiRedistributeNodes.cc +++ b/src/Distributed/VoronoiRedistributeNodes.cc @@ -404,7 +404,7 @@ redistributeNodes(DataBase& dataBase, // Define the the length scale we use to determine when the generator positions have converged. const double tol = (xmax - xmin).minElement() * mTolerance; - if (procID == 0) cerr << "VoronoiRedistributeNodes: Found bounding box of " << xmin << " " << xmax << endl + if (procID == 0) cout << "VoronoiRedistributeNodes: Found bounding box of " << xmin << " " << xmax << endl << " yielding generator convergence tolerance of " << tol << endl; // Determine the average work per generator. @@ -531,7 +531,7 @@ redistributeNodes(DataBase& dataBase, CHECK(newGeneratorsInParents.size() == newParentCells.size()); generatorsInParents = newGeneratorsInParents; parentCells = newParentCells; - if (procID == 0) cerr << " Generation " << level << " : " + if (procID == 0) cout << " Generation " << level << " : " << numRemainingGenerators << " generators remaining in " << generatorsInParents.size() << " cells." << endl; @@ -540,7 +540,7 @@ redistributeNodes(DataBase& dataBase, // // Are there still remaining degeneracies in the generator positions? // if (numRemainingGenerators > 0) { -// if (procID == 0) cerr << " --> Breaking up " << numRemainingGenerators +// if (procID == 0) cout << " --> Breaking up " << numRemainingGenerators // << " degeneracies in intial generator positions." // << endl; // for (vector >::const_iterator cellItr = generatorsInParents.begin(); @@ -648,7 +648,7 @@ redistributeNodes(DataBase& dataBase, workRatio = maxWork*safeInv(minWork); // Report this iterations statistics. - if (procID == 0) cerr << "VoronoiRedistributeNodes: Lloyds iteration " << iteration << endl + if (procID == 0) cout << "VoronoiRedistributeNodes: Lloyds iteration " << iteration << endl << " max change: " << maxDeltaGenerator << endl << " work ratio change: " << workRatio << " " << oldWorkRatio << " " << abs(workRatio*safeInv(oldWorkRatio) - 1.0) << endl << " [min, max, avg] work [" << minWork << ", " << maxWork << ", " << avgWork << "]" << endl diff --git a/src/Utilities/iterateIdealH.cc b/src/Utilities/iterateIdealH.cc index 3746da220..544411a2a 100644 --- a/src/Utilities/iterateIdealH.cc +++ b/src/Utilities/iterateIdealH.cc @@ -218,7 +218,7 @@ iterateIdealH(DataBase& dataBase, // Output the statitics. if (Process::getRank() == 0 && maxIterations > 1) - cerr << "iterateIdealH: (iteration, deltaH) = (" + cout << "iterateIdealH: (iteration, deltaH) = (" << itr << ", " << maxDeltaH << ")" << endl; @@ -275,7 +275,7 @@ iterateIdealH(DataBase& dataBase, // Report the final timing. const auto t1 = clock(); if (Process::getRank() == 0 && maxIterations > 1) - cerr << "iterateIdealH: required a total of " + cout << "iterateIdealH: required a total of " << (t1 - t0)/CLOCKS_PER_SEC << " seconds." << endl;