Commit 2b80cf0b authored by kraus's avatar kraus
Browse files

fix if clause and realy throw exception

parent e2756950
......@@ -1204,7 +1204,7 @@ protected:
typename RegionLayout<T,Dim,Mesh>::touch_range_dv touchingVN = RLayout.touch_range_rdv(pLoc);
//external location
if (touchingVN.first != touchingVN.second) {
if (touchingVN.first == touchingVN.second) {
responsibleNodeNotFound = true;
break;
}
......@@ -1349,7 +1349,7 @@ protected:
typename RegionLayout<T,Dim,Mesh>::touch_range_dv touchingVN = RLayout.touch_range_rdv(pLoc);
//external location
if (touchingVN.first != touchingVN.second) {
if (touchingVN.first == touchingVN.second) {
responsibleNodeNotFound = true;
break;
}
......@@ -1367,6 +1367,11 @@ protected:
1,
std::logical_or<bool>());
if (responsibleNodeNotFound) {
throw IpplException("ParticleSpatialLayout::new_swap_particles",
"could not find node responsible for particle");
}
//reduce message count so every node knows how many messages to receive
MPI_Allreduce(msgsend, msgrecv, N, MPI_INT, MPI_SUM, Ippl::getComm());
......
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