Commit 8329529f authored by snuverink_j's avatar snuverink_j
Browse files

Resolve "clang compiler errors for MPI_AllReduce (-Wtype-safety)"

parent b8cd789e
......@@ -288,7 +288,7 @@ void ParallelSliceTracker::execute() {
//reduce(&globalEOL_m, &globalEOL_m, OpBitwiseOrAssign());
//reduce(&globalEOL_m, &globalEOL_m + 1, &globalEOL_m, OpBitwiseAndAssign());
MPI_Allreduce(MPI_IN_PLACE, &globalEOL_m, 1, MPI_INT, MPI_LAND, Ippl::getComm());
MPI_Allreduce(MPI_IN_PLACE, &globalEOL_m, 1, MPI_CXX_BOOL, MPI_LAND, Ippl::getComm());
computeSpaceChargeFields();
timeIntegration();
......
......@@ -1455,7 +1455,7 @@ double EnvelopeBunch::get_sPos() {
}
}
MPI_Allreduce(MPI_IN_PLACE, &count, 1, MPI_LONG, MPI_SUM, Ippl::getComm());
MPI_Allreduce(MPI_IN_PLACE, &count, 1, MPI_UNSIGNED_LONG, MPI_SUM, Ippl::getComm());
MPI_Allreduce(MPI_IN_PLACE, &refpos, 1, MPI_DOUBLE, MPI_SUM, Ippl::getComm());
return refpos / count;
}
......
......@@ -1110,7 +1110,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
++ numPartsToSend;
if (numPartsToSend % distributeFrequency == 0) {
MPI_Bcast(&dataSize, 1, MPI_INT, 0, Ippl::getComm());
MPI_Bcast(&dataSize, 1, MPI_UNSIGNED, 0, Ippl::getComm());
MPI_Bcast(&data[0], dataSize, MPI_CHAR, 0, Ippl::getComm());
numPartsToSend = 0;
......@@ -1131,7 +1131,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
}
dataSize = (numberOfParticlesRead == numParts? data.size(): std::numeric_limits<unsigned int>::max());
MPI_Bcast(&dataSize, 1, MPI_INT, 0, Ippl::getComm());
MPI_Bcast(&dataSize, 1, MPI_UNSIGNED, 0, Ippl::getComm());
if (numberOfParticlesRead != numParts) {
throw OpalException("Distribution::createDistributionFromFile",
"Found " +
......@@ -1145,7 +1145,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
} else {
do {
MPI_Bcast(&dataSize, 1, MPI_INT, 0, Ippl::getComm());
MPI_Bcast(&dataSize, 1, MPI_UNSIGNED, 0, Ippl::getComm());
if (dataSize == std::numeric_limits<unsigned int>::max()) {
throw OpalException("Distribution::createDistributionFromFile",
"Couldn't find " +
......@@ -4252,7 +4252,7 @@ void Distribution::writeOutFileEmission() {
const size_t bitsPerParticle = (6 * sizeof(double) + sizeof(size_t));
size_t totalSendBits = xWrite_m.size() * bitsPerParticle;
std::vector<long> numberOfBits(Ippl::getNodes(), 0);
std::vector<unsigned long> numberOfBits(Ippl::getNodes(), 0);
numberOfBits[Ippl::myNode()] = totalSendBits;
if (Ippl::myNode() == 0) {
......
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