From 5110ad130a6ac818a2f5f1cc3f3a29670edc56f3 Mon Sep 17 00:00:00 2001 From: Alejandro Gallo Date: Wed, 15 Nov 2023 01:49:23 +0100 Subject: [PATCH] Use Jhhhp with the new atrip-resources --- Makefile.am | 6 +----- bench/main.cxx | 6 ++---- integration-tests/Makefile.am | 1 + integration-tests/run-h2o.sh.in | 25 ++++++++++++++----------- src/atrip/Chrono.hpp | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index ee41075..8185ccf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,11 +14,7 @@ tangle: $(ORG_MAIN) clean-emacs: -rm -v $(_ATRIPSRCS) -.PHONY: dbg tangle extern all atrip -dbg: src/dbg.h -include/dbg.h: - wget -O $@ "https://raw.githubusercontent.com/sharkdp/dbg-macro/master/dbg.h" - +.PHONY: tangle extern all atrip atrip: extern $(MAKE) -C src diff --git a/bench/main.cxx b/bench/main.cxx index f2926a6..ba81ac5 100644 --- a/bench/main.cxx +++ b/bench/main.cxx @@ -311,13 +311,12 @@ void run(int argc, char **argv, Settings &s) { Vpphh = iVpphh; } - CTF::Tensor *Jppph = nullptr, *Jhhhp = nullptr, *Jhphh = nullptr; + CTF::Tensor *Jppph = nullptr, *Jhhhp = nullptr; if (s.cT || (s.Jppph_path.size() && s.Jhhhp_path.size())) { if (!rank) std::cout << "doing cT" << std::endl; /**/ /**/ /**/ - Jhphh = new CTF::Tensor(4, ovoo.data(), symmetries.data(), world); Jhhhp = new CTF::Tensor(4, ooov.data(), symmetries.data(), world); MPI_Barrier(world.comm); if (!rank) @@ -326,8 +325,7 @@ void run(int argc, char **argv, Settings &s) { const auto conjugate = CTF::Transform([](FIELD d, FIELD &f) { f = atrip::acc::maybe_conjugate_scalar(d); }); - Jhphh->read_dense_from_file(s.Jhhhp_path.c_str()); - conjugate((*Jhphh)["kaij"], (*Jhhhp)["ijka"]); + Jhhhp->read_dense_from_file(s.Jhhhp_path.c_str()); MPI_Barrier(world.comm); /**/ /**/ diff --git a/integration-tests/Makefile.am b/integration-tests/Makefile.am index a07dd0c..b4acc13 100644 --- a/integration-tests/Makefile.am +++ b/integration-tests/Makefile.am @@ -1,5 +1,6 @@ H2O: git clone --depth 1 https://github.com/airmler/atrip_resources H2O + cd $@; git reset --hard 929a6b0be4ed20e431d4c51f11b3f59ef0b1981d .PHONY: run-h2o all run-h2o: H2O diff --git a/integration-tests/run-h2o.sh.in b/integration-tests/run-h2o.sh.in index 275feeb..edf57f7 100755 --- a/integration-tests/run-h2o.sh.in +++ b/integration-tests/run-h2o.sh.in @@ -1,5 +1,8 @@ #!/usr/bin/env bash +set -eu +set -o pipefail + resources=H2O atrip="../bench/atrip" outfile=out @@ -14,16 +17,16 @@ cmd=( # --max-iterations 50 - --ei ./${resources}/EigenEnergies.components.h.elements - --ea ./${resources}/EigenEnergies.components.p.elements + --ei ./${resources}/EigenEnergiesSliced.components.h.elements + --ea ./${resources}/EigenEnergiesSliced.components.p.elements --Tpphh ./${resources}/Amplitudes.components.pphh.elements - --Tph ./${resources}/Amplitudes.components.ph.elements - --Vpphh ./${resources}/CoulombIntegrals.components.pphh.elements - --Vhhhp ./${resources}/CoulombIntegrals.components.hhhp.elements - --Vppph ./${resources}/CoulombIntegrals.components.ppph.elements + --Tph ./${resources}/Amplitudes.components.ph.elements + --Vpphh ./${resources}/CoulombIntegralsPPHH.elements + --Vhhhp ./${resources}/CoulombIntegralsHHHP.elements + --Vppph ./${resources}/CoulombIntegralsPPPH.elements # J for ct - --Jhhhp ./${resources}/ctIntermediate.components.hphh.elements - --Jppph ./${resources}/ctIntermediate.components.ppph.elements + --Jhhhp ./${resources}/CtIntermediate.components.hhhp.elements + --Jppph ./${resources}/CtIntermediate.components.ppph.elements --cT # dist can also be naive @@ -32,7 +35,7 @@ cmd=( # --dist naive # --mod 10 - -% 1 + -% 1 ) set -x @@ -41,8 +44,7 @@ date date set +x -printf '\5$n' - +printf '\n\n\n\n' { echo Name Correct Ours Diff | sed "p; s/[^ ]/-/g" { @@ -52,3 +54,4 @@ printf '\5$n' EOF } | awk '{print $1, $2, $3, $2-$3}' } | column -t +printf '\n\n\n\n' diff --git a/src/atrip/Chrono.hpp b/src/atrip/Chrono.hpp index d592657..d21711a 100644 --- a/src/atrip/Chrono.hpp +++ b/src/atrip/Chrono.hpp @@ -15,7 +15,7 @@ nvtxRangePop(); #elif defined(HAVE_HIP) || defined(HAVE_OMNITRACE) # define WITH_CHRONO(__chrono_name, ...) \ - omnitrace_user_push_region(__chrono_name); \ + omnitrace_user_push_region(__chrono_name); \ Atrip::chrono[__chrono_name].start(); \ __VA_ARGS__ \ Atrip::chrono[__chrono_name].stop(); \