MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / doHandShake

Function doHandShake

Src/Particle/AMReX_ParticleMPIUtil.cpp:25–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 1

buildMPIStartMethod · 0.85

Calls 4

CountSndsFunction · 0.85
MyProcSubFunction · 0.85
CommunicatorSubFunction · 0.85
dataPtrMethod · 0.45

Tested by

no test coverage detected