Commit ebdf3d69 authored by kraus's avatar kraus
Browse files

fix communication in case of not found responsible node and use const reference when catching

parent 2b80cf0b
......@@ -1217,10 +1217,9 @@ protected:
particlesLeft--;
}
new_reduce(&responsibleNodeNotFound,
&responsibleNodeNotFound,
1,
std::logical_or<bool>());
allreduce(&responsibleNodeNotFound,
1,
std::logical_or<bool>());
if (responsibleNodeNotFound) {
throw IpplException("ParticleSpatialLayout::new_swap_particles",
......@@ -1362,10 +1361,9 @@ protected:
particlesLeft--;
}
new_reduce(&responsibleNodeNotFound,
&responsibleNodeNotFound,
1,
std::logical_or<bool>());
allreduce(&responsibleNodeNotFound,
1,
std::logical_or<bool>());
if (responsibleNodeNotFound) {
throw IpplException("ParticleSpatialLayout::new_swap_particles",
......
......@@ -2394,7 +2394,7 @@ template <class T, unsigned Dim>
void PartBunchBase<T, Dim>::update() {
try {
pbase->update();
} catch (IpplException &ex) {
} catch (const IpplException &ex) {
throw OpalException(ex.where(), ex.what());
}
}
......@@ -2403,7 +2403,7 @@ template <class T, unsigned Dim>
void PartBunchBase<T, Dim>::update(const ParticleAttrib<char>& canSwap) {
try {
pbase->update(canSwap);
} catch (IpplException &ex) {
} catch (const IpplException &ex) {
throw OpalException(ex.where(), ex.what());
}
}
......
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