#1424: CarpetLib 2dedcb0e7340b0682d530dc26e764408b301e3b8 "CarpetLib: Do not reallocate communication buffers; instead, keep them around" breaks QLM qlm-bl.par test ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: eschnett Type: defect | Status: review Priority: major | Milestone: Component: Carpet | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: new => review
Comment:
Can you try this patch?
{{{ $ git diff diff --git a/Carpet/CarpetLib/src/commstate.cc b/Carpet/CarpetLib/src/commstate. index 5e9eb91..532461d 100644 --- a/Carpet/CarpetLib/src/commstate.cc +++ b/Carpet/CarpetLib/src/commstate.cc @@ -531,6 +531,11 @@ comm_state::~comm_state () { DECLARE_CCTK_PARAMETERS;
+ // Note: calling resize(0) instead of clear() ensures that the + // vector capacity does not change + srequests.resize(0); + rrequests.resize(0); + for (size_t type=0; type<typebufs.size(); ++type) { typebufdesc& typebuf = typebufs.AT(type); for (size_t proc=0; proc<typebuf.procbufs.size(); ++proc) { }}}