Update tuples-distribution script
This commit is contained in:
parent
7734efeb97
commit
1e391e3749
@ -230,6 +230,11 @@ void unwrapSlice(Slice<F>::Type t, ABCTuple abc, SliceUnion<F> *u) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define PRINT_VARIABLE(v) \
|
||||||
|
do { \
|
||||||
|
if (!rank) std::cout << "# " << #v << ": " << v << std::endl; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
MPI_Init(&argc, &argv);
|
MPI_Init(&argc, &argv);
|
||||||
|
|
||||||
@ -239,6 +244,7 @@ int main(int argc, char** argv) {
|
|||||||
CLI::App app{"Main bench for atrip"};
|
CLI::App app{"Main bench for atrip"};
|
||||||
app.add_option("--no", no, "Occupied orbitals");
|
app.add_option("--no", no, "Occupied orbitals");
|
||||||
app.add_option("--nv", nv, "Virtual orbitals");
|
app.add_option("--nv", nv, "Virtual orbitals");
|
||||||
|
app.add_option("--dist", tuplesDistributionString, "Which distribution");
|
||||||
CLI11_PARSE(app, argc, argv);
|
CLI11_PARSE(app, argc, argv);
|
||||||
|
|
||||||
CTF::World world(argc, argv);
|
CTF::World world(argc, argv);
|
||||||
@ -249,6 +255,7 @@ int main(int argc, char** argv) {
|
|||||||
Atrip::init(world.comm);
|
Atrip::init(world.comm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
atrip::ABCTuples tuplesList;
|
atrip::ABCTuples tuplesList;
|
||||||
atrip::TuplesDistribution *dist;
|
atrip::TuplesDistribution *dist;
|
||||||
{
|
{
|
||||||
@ -265,9 +272,17 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(0, "bench:") << "We have "
|
double tuplesListGb
|
||||||
<< tuplesList.size()
|
= tuplesList.size() * sizeof(tuplesList[0])
|
||||||
<< " tuples" << std::endl;
|
/ 1024.0 / 1024.0 / 1024.0;
|
||||||
|
|
||||||
|
std::cout << "\n";
|
||||||
|
PRINT_VARIABLE(tuplesDistributionString);
|
||||||
|
PRINT_VARIABLE(np);
|
||||||
|
PRINT_VARIABLE(no);
|
||||||
|
PRINT_VARIABLE(nv);
|
||||||
|
PRINT_VARIABLE(tuplesList.size());
|
||||||
|
PRINT_VARIABLE(tuplesListGb);
|
||||||
|
|
||||||
// create a fake dry tensor
|
// create a fake dry tensor
|
||||||
Tr t_abph, t_abhh, t_tabhh, t_taphh, t_hhha;
|
Tr t_abph, t_abhh, t_tabhh, t_taphh, t_hhha;
|
||||||
@ -383,9 +398,6 @@ int main(int argc, char** argv) {
|
|||||||
const ABCTuple abc = dist->tupleIsFake(tuplesList[it])
|
const ABCTuple abc = dist->tupleIsFake(tuplesList[it])
|
||||||
? tuplesList[tuplesList.size() - 1]
|
? tuplesList[tuplesList.size() - 1]
|
||||||
: tuplesList[it]
|
: tuplesList[it]
|
||||||
, *abcNext = it == (tuplesList.size() - 1)
|
|
||||||
? nullptr
|
|
||||||
: &tuplesList[it + 1]
|
|
||||||
;
|
;
|
||||||
|
|
||||||
if (it > 0) {
|
if (it > 0) {
|
||||||
@ -398,13 +410,13 @@ int main(int argc, char** argv) {
|
|||||||
doIOPhase(db, to_send);
|
doIOPhase(db, to_send);
|
||||||
|
|
||||||
if (it % 1000 == 0)
|
if (it % 1000 == 0)
|
||||||
std::cout << _FORMAT("%ld :it(%ld) %f %% ∷ %ld ∷ %f GB\n",
|
std::cout << _FORMAT("%ld :it %ld %f %% ∷ %ld ∷ %f GB\n",
|
||||||
rank,
|
rank,
|
||||||
it,
|
it,
|
||||||
100 * to_send.size() / tuplesList.size(),
|
100.0 * double(to_send.size()) / double(tuplesList.size()),
|
||||||
to_send.size(),
|
to_send.size(),
|
||||||
double(to_send.size()) * 8 /
|
double(to_send.size()) * sizeof(to_send[0])
|
||||||
1024.0 / 1024.0 / 1024.0);
|
/ 1024.0 / 1024.0 / 1024.0);
|
||||||
|
|
||||||
|
|
||||||
for (auto const& u: unions) {
|
for (auto const& u: unions) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user