diff --git a/src/mesh/ConnectivityDispatcher.cpp b/src/mesh/ConnectivityDispatcher.cpp index 7ac1dbb398a384f0546efb585a0a544c82a2c6c5..f31fd9e6a645f09fc2c03fbfb29e3bac606e9c5e 100644 --- a/src/mesh/ConnectivityDispatcher.cpp +++ b/src/mesh/ConnectivityDispatcher.cpp @@ -41,8 +41,7 @@ ConnectivityDispatcher<Dimension>::_buildNewOwner() item_new_owner[l] = cell_new_owner[Jmin]; }); -#warning Add missing synchronize (fix it!) - // synchronize(face_new_owner); + synchronize(item_new_owner); this->_dispatchedInfo<item_type>().m_new_owner = item_new_owner; } } diff --git a/src/utils/Messenger.hpp b/src/utils/Messenger.hpp index 1575c44410881fe76341c54c1346392321d14fd6..1e32874a7c0e2302aeffac02c9ee2855516bae59 100644 --- a/src/utils/Messenger.hpp +++ b/src/utils/Messenger.hpp @@ -231,12 +231,14 @@ class Messenger } } - std::vector<MPI_Status> status_list(request_list.size()); - if (MPI_SUCCESS != MPI_Waitall(request_list.size(), &(request_list[0]), &(status_list[0]))) { - // LCOV_EXCL_START - std::cerr << "Communication error!\n"; - std::exit(1); - // LCOV_EXCL_STOP + if (request_list.size()>0) { + std::vector<MPI_Status> status_list(request_list.size()); + if (MPI_SUCCESS != MPI_Waitall(request_list.size(), &(request_list[0]), &(status_list[0]))) { + // LCOV_EXCL_START + std::cerr << "Communication error!\n"; + std::exit(1); + // LCOV_EXCL_STOP + } } #else // PASTIS_HAS_MPI