Skip to content

Commit

Permalink
Use Jhhhp with the new atrip-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrogallo committed Nov 15, 2023
1 parent 2de4643 commit 5110ad1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
6 changes: 1 addition & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions bench/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,12 @@ void run(int argc, char **argv, Settings &s) {
Vpphh = iVpphh;
}

CTF::Tensor<FIELD> *Jppph = nullptr, *Jhhhp = nullptr, *Jhphh = nullptr;
CTF::Tensor<FIELD> *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<FIELD>(4, ovoo.data(), symmetries.data(), world);
Jhhhp = new CTF::Tensor<FIELD>(4, ooov.data(), symmetries.data(), world);
MPI_Barrier(world.comm);
if (!rank)
Expand All @@ -326,8 +325,7 @@ void run(int argc, char **argv, Settings &s) {
const auto conjugate = CTF::Transform<FIELD, FIELD>([](FIELD d, FIELD &f) {
f = atrip::acc::maybe_conjugate_scalar<FIELD>(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);
/**/
/**/
Expand Down
1 change: 1 addition & 0 deletions integration-tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 14 additions & 11 deletions integration-tests/run-h2o.sh.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

set -eu
set -o pipefail

resources=H2O
atrip="../bench/atrip"
outfile=out
Expand All @@ -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
Expand All @@ -32,7 +35,7 @@ cmd=(
# --dist naive

# --mod 10
-% 1
-% 1
)

set -x
Expand All @@ -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"
{
Expand All @@ -52,3 +54,4 @@ printf '\5$n'
EOF
} | awk '{print $1, $2, $3, $2-$3}'
} | column -t
printf '\n\n\n\n'
2 changes: 1 addition & 1 deletion src/atrip/Chrono.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); \
Expand Down

0 comments on commit 5110ad1

Please sign in to comment.