Implement deleting Vppph

This commit is contained in:
2022-04-05 17:16:11 +02:00
parent 7d37bd9f8b
commit fed19ff52c
7 changed files with 196 additions and 181 deletions

View File

@@ -96,14 +96,6 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
MPI_Comm_size(child_comm, &child_size);
}
// BUILD SLICES PARAMETRIZED BY NV ==================================={{{1
WITH_CHRONO("nv-slices",
LOG(0,"Atrip") << "BUILD NV-SLICES\n";
TAPHH<F> taphh(*in.Tpphh, (size_t)No, (size_t)Nv, (size_t)np, child_comm, universe);
HHHA<F> hhha(*in.Vhhhp, (size_t)No, (size_t)Nv, (size_t)np, child_comm, universe);
)
// BUILD SLICES PARAMETRIZED BY NV x NV =============================={{{1
WITH_CHRONO("nv-nv-slices",
LOG(0,"Atrip") << "BUILD NV x NV-SLICES\n";
@@ -112,6 +104,18 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
TABHH<F> tabhh(*in.Tpphh, (size_t)No, (size_t)Nv, (size_t)np, child_comm, universe);
)
// delete the Vppph so that we don't have a HWM situation for the NV slices
if (in.deleteVppph) {
delete in.Vppph;
}
// BUILD SLICES PARAMETRIZED BY NV ==================================={{{1
WITH_CHRONO("nv-slices",
LOG(0,"Atrip") << "BUILD NV-SLICES\n";
TAPHH<F> taphh(*in.Tpphh, (size_t)No, (size_t)Nv, (size_t)np, child_comm, universe);
HHHA<F> hhha(*in.Vhhhp, (size_t)No, (size_t)Nv, (size_t)np, child_comm, universe);
)
// all tensors
std::vector< SliceUnion<F>* > unions = {&taphh, &hhha, &abph, &abhh, &tabhh};