Chi-Tech
lbsDO_sweepdata_00c_cleanup.cc
Go to the documentation of this file.
2
4
5#include "chi_runtime.h"
7#include "chi_log.h"
8#include "chi_mpi.h"
9
10
11#include <iomanip>
12
13//###################################################################
14/**Clears all the sweep orderings for a groupset in preperation for
15 * another.*/
17{
19 << "Resetting SPDS and FLUDS";
20
21 groupset.angle_agg_->angle_set_groups.clear();
22
24
26 << "SPDS and FLUDS reset complete. Process memory = "
27 << std::setprecision(3)
29
30 double local_app_memory =
31 Chi::log.ProcessEvent(chi::ChiLog::StdTags::MAX_MEMORY_USAGE,
33 double total_app_memory=0.0;
34 MPI_Allreduce(&local_app_memory,&total_app_memory,
35 1,MPI_DOUBLE,MPI_SUM,Chi::mpi.comm);
36 double max_proc_memory=0.0;
37 MPI_Allreduce(&local_app_memory,&max_proc_memory,
38 1,MPI_DOUBLE,MPI_MAX,Chi::mpi.comm);
39
41 << "\n" << std::setprecision(3)
42 << " Total application memory (max): "
43 << total_app_memory/1024.0 << " GB\n"
44 << " Maximum process memory : "
45 << max_proc_memory/1024.0 << " GB\n\n";
46
47}
static chi::ChiLog & log
Definition: chi_runtime.h:81
static chi::MPI_Info & mpi
Definition: chi_runtime.h:78
double ProcessEvent(size_t ev_tag, EventOperation ev_operation)
Definition: chi_log.cc:275
@ MAX_VALUE
Computes the maximum of the EventInfo arb_value.
LogStream Log(LOG_LVL level=LOG_0)
Definition: chi_log.cc:35
LogStream Log0Verbose1()
Definition: chi_log.h:234
static double GetMemoryUsageInMB()
Get current memory usage in Megabytes.
void Barrier() const
Definition: mpi_info.cc:38
void ResetSweepOrderings(LBSGroupset &groupset)
AngleAggPtr angle_agg_
Definition: lbs_groupset.h:43