diff --git a/atrip.org b/atrip.org index 58b56b4..76818d5 100644 --- a/atrip.org +++ b/atrip.org @@ -407,7 +407,7 @@ static Slice& findOneByType(std::vector &slices, Slice::Type type) { }); WITH_CRAZY_DEBUG WITH_RANK - << "\t__ looking for " << type << "\n"; + << "__slice__:find:looking for " << type << "\n"; if (sliceIt == slices.end()) throw std::domain_error("Slice by type not found!"); return *sliceIt; @@ -1546,6 +1546,10 @@ struct NaiveDistribution : public TuplesDistribution { , tuplesPerRank * (rank + 1) - 1 }; + WITH_RANK << "range = " + << range.first << " -> " << range.second + << std::endl; + std::vector result(range.second - range.first, FAKE_TUPLE); std::copy(all.begin() + range.first, range.second >= all.size() @@ -2682,10 +2686,11 @@ namespace atrip { #include #include #include -#include #include +#include + #define ADD_ATTRIBUTE(_type, _name, _default) \ _type _name = _default; \ Input& with_ ## _name(_type i) { \ @@ -2699,6 +2704,7 @@ namespace atrip { static int rank; static int np; + static Timings chrono; static void init(); struct Input { @@ -2758,6 +2764,7 @@ using namespace atrip; int Atrip::rank; int Atrip::np; +Timings Atrip::chrono; void Atrip::init() { MPI_Comm_rank(MPI_COMM_WORLD, &Atrip::rank); diff --git a/bench/test_main.cxx b/bench/test_main.cxx index 8369185..6f4ca68 100644 --- a/bench/test_main.cxx +++ b/bench/test_main.cxx @@ -1,6 +1,11 @@ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" +#pragma GCC diagnostic ignored "-Wint-in-bool-context" +#include +#pragma GCC diagnostic pop + #include #include -#include #include #define _print_size(what, size) \ @@ -22,6 +27,7 @@ int main(int argc, char** argv) { CLI::App app{"Main bench for atrip"}; app.add_option("--no", no, "Occupied orbitals"); app.add_option("--nv", nv, "Virtual orbitals"); + app.add_option("--mod", itMod, "Iteration modifier"); app.add_flag("--nochrono", nochrono, "Do not print chrono"); app.add_flag("--barrier", barrier, "Use the first barrier"); app.add_option("--dist", tuplesDistributionString, "Which distribution"); diff --git a/include/atrip/Atrip.hpp b/include/atrip/Atrip.hpp index 3c9027e..bdcaec9 100644 --- a/include/atrip/Atrip.hpp +++ b/include/atrip/Atrip.hpp @@ -3,10 +3,11 @@ #include #include #include -#include #include +#include + #define ADD_ATTRIBUTE(_type, _name, _default) \ _type _name = _default; \ Input& with_ ## _name(_type i) { \ @@ -20,6 +21,7 @@ namespace atrip { static int rank; static int np; + static Timings chrono; static void init(); struct Input { diff --git a/include/atrip/Slice.hpp b/include/atrip/Slice.hpp index d7775c8..caafefc 100644 --- a/include/atrip/Slice.hpp +++ b/include/atrip/Slice.hpp @@ -229,7 +229,7 @@ static Slice& findOneByType(std::vector &slices, Slice::Type type) { }); WITH_CRAZY_DEBUG WITH_RANK - << "\t__ looking for " << type << "\n"; + << "__slice__:find:looking for " << type << "\n"; if (sliceIt == slices.end()) throw std::domain_error("Slice by type not found!"); return *sliceIt; diff --git a/include/atrip/Tuples.hpp b/include/atrip/Tuples.hpp index 30b98f7..f15d1c6 100644 --- a/include/atrip/Tuples.hpp +++ b/include/atrip/Tuples.hpp @@ -110,6 +110,10 @@ struct NaiveDistribution : public TuplesDistribution { , tuplesPerRank * (rank + 1) - 1 }; + WITH_RANK << "range = " + << range.first << " -> " << range.second + << std::endl; + std::vector result(range.second - range.first, FAKE_TUPLE); std::copy(all.begin() + range.first, range.second >= all.size() diff --git a/src/atrip/Atrip.cxx b/src/atrip/Atrip.cxx index e365df9..80a35c7 100644 --- a/src/atrip/Atrip.cxx +++ b/src/atrip/Atrip.cxx @@ -11,6 +11,7 @@ using namespace atrip; int Atrip::rank; int Atrip::np; +Timings Atrip::chrono; void Atrip::init() { MPI_Comm_rank(MPI_COMM_WORLD, &Atrip::rank);