| 23 | } |
| 24 | |
| 25 | Long doHandShake(const std::map<int, Vector<char> >& not_ours, |
| 26 | Vector<Long>& Snds, Vector<Long>& Rcvs) |
| 27 | { |
| 28 | Long NumSnds = CountSnds(not_ours, Snds); |
| 29 | if (NumSnds == 0) { return NumSnds; } |
| 30 | |
| 31 | BL_COMM_PROFILE(BLProfiler::Alltoall, sizeof(Long), |
| 32 | ParallelContext::MyProcSub(), BLProfiler::BeforeCall()); |
| 33 | |
| 34 | BL_MPI_REQUIRE( MPI_Alltoall(Snds.dataPtr(), |
| 35 | 1, |
| 36 | ParallelDescriptor::Mpi_typemap<Long>::type(), |
| 37 | Rcvs.dataPtr(), |
| 38 | 1, |
| 39 | ParallelDescriptor::Mpi_typemap<Long>::type(), |
| 40 | ParallelContext::CommunicatorSub()) ); |
| 41 | |
| 42 | AMREX_ASSERT(Rcvs[ParallelContext::MyProcSub()] == 0); |
| 43 | |
| 44 | BL_COMM_PROFILE(BLProfiler::Alltoall, sizeof(Long), |
| 45 | ParallelContext::MyProcSub(), BLProfiler::AfterCall()); |
| 46 | |
| 47 | return NumSnds; |
| 48 | } |
| 49 | |
| 50 | Long doHandShakeLocal(const std::map<int, Vector<char> >& not_ours, |
| 51 | const Vector<int>& neighbor_procs, Vector<Long>& Snds, Vector<Long>& Rcvs) |
no test coverage detected