Add memory consumption in bench
This commit is contained in:
parent
0558148937
commit
4277c07cc2
@ -58,8 +58,9 @@ int main(int argc, char** argv) {
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
CTF::World world(argc, argv);
|
||||
int rank;
|
||||
int rank, nranks;
|
||||
MPI_Comm_rank(world.comm, &rank);
|
||||
MPI_Comm_size(world.comm, &nranks);
|
||||
constexpr double elem_to_gb = 8.0 / 1024.0 / 1024.0 / 1024.0;
|
||||
|
||||
// USER PRINTING TEST BEGIN
|
||||
@ -108,6 +109,43 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
f = sizeof(double)
|
||||
, n_tuples = nv * (nv + 1) * (nv + 2) / 6 - nv
|
||||
, atrip_memory
|
||||
= /* tuples_memory */ 3 * sizeof(size_t) * n_tuples
|
||||
//
|
||||
// one dimensional slices (all ranks)
|
||||
//
|
||||
+ /* taphh */ f * nranks * 6 * nv * no * no
|
||||
+ /* hhha */ f * nranks * 6 * no * no * no
|
||||
//
|
||||
// two dimensional slices (all ranks)
|
||||
//
|
||||
+ /* abph */ f * nranks * 12 * nv * no
|
||||
+ /* abhh */ f * nranks * 6 * no * no
|
||||
+ /* tabhh */ f * nranks * 6 * no * no
|
||||
//
|
||||
// distributed sources (all ranks)
|
||||
//
|
||||
+ /* tpphh */ f * nv * nv * no * no
|
||||
+ /* vhhhp */ f * no * no * no * nv
|
||||
+ /* vppph */ f * nv * nv * nv * no
|
||||
+ /* vpphh */ f * nv * nv * no * no
|
||||
+ /* tpphh2 */ f * nv * nv * no * no
|
||||
//
|
||||
// tensors in every rank
|
||||
//
|
||||
+ /* tijk */ f * nranks * no * no * no
|
||||
+ /* zijk */ f * nranks * no * no * no
|
||||
+ /* epsp */ f * nranks * (no + nv)
|
||||
+ /* tai */ f * nranks * no * nv
|
||||
;
|
||||
|
||||
if (atrip::Atrip::rank == 0)
|
||||
std::cout << "Tentative MEMORY USAGE: " << atrip_memory << "\n";
|
||||
|
||||
|
||||
std::vector<int> symmetries(4, NS)
|
||||
, vo({nv, no})
|
||||
, vvoo({nv, nv, no, no})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user