WarpX
|
#include <LoadBalanceCosts.H>
Public Member Functions | |
LoadBalanceCosts (const std::string &rd_name) | |
void | ComputeDiags (int step) final |
void | WriteToFile (int step) const final |
![]() | |
ReducedDiags (const std::string &rd_name) | |
virtual | ~ReducedDiags ()=default |
ReducedDiags (const ReducedDiags &)=default | |
ReducedDiags & | operator= (const ReducedDiags &)=default |
ReducedDiags (ReducedDiags &&)=default | |
ReducedDiags & | operator= (ReducedDiags &&)=default |
virtual void | InitData () |
virtual void | LoadBalance () |
void | BackwardCompatibility () const |
Public Attributes | |
amrex::Vector< char > | m_data_string_recvbuf |
int | m_data_string_recvbuf_length = 0 |
std::vector< std::string > | m_data_string |
amrex::Vector< int > | m_data_string_recvcount |
amrex::Vector< int > | m_data_string_disp |
const int | m_nDataFields = 8 |
int | m_nBoxesMax = -1 |
![]() | |
std::string | m_path = "./diags/reducedfiles/" |
output path (default) More... | |
std::string | m_extension = "txt" |
output extension (default) More... | |
std::string | m_rd_name |
diags name More... | |
utils::parser::IntervalsParser | m_intervals |
output intervals More... | |
bool | m_write_header = false |
check if header should be written More... | |
std::string | m_sep = " " |
separator in the output file More... | |
int | m_precision = 14 |
precision for data in the output file More... | |
std::vector< amrex::Real > | m_data |
output data More... | |
This class mainly contains a function that update the costs (used in load balance) for writing to output.
LoadBalanceCosts::LoadBalanceCosts | ( | const std::string & | rd_name | ) |
constructor
[in] | rd_name | reduced diags names |
|
finalvirtual |
This function updates the costs, given the current distribution mapping, according to the number of particles and cells on the box
[in] | step | current time step |
Implements ReducedDiags.
|
finalvirtual |
write to file function for costs; this differs from the base class ReducedDiags
in that it will fill in blank entries with NaN at the final timestep, ensuring that the data array is not jagged
[in] | step | current time step |
Reimplemented from ReducedDiags.
std::vector<std::string> LoadBalanceCosts::m_data_string |
easier storage of strings after the MPI Gatherv
amrex::Vector<int> LoadBalanceCosts::m_data_string_disp |
amrex::Vector<char> LoadBalanceCosts::m_data_string_recvbuf |
stores the host identifiers
int LoadBalanceCosts::m_data_string_recvbuf_length = 0 |
length of the total string to be collected to IOProc
amrex::Vector<int> LoadBalanceCosts::m_data_string_recvcount |
stores information needed for MPI Gatherv
int LoadBalanceCosts::m_nBoxesMax = -1 |
used to keep track of max number of boxes over all timesteps; this allows to compute the number of NaNs required to fill jagged array into a rectangular one
const int LoadBalanceCosts::m_nDataFields = 8 |
number of data fields we save for each box (cost, processor, level, i_low, j_low, k_low, gpu_ID [if GPU run], num_cells, num_macro_particles note: the hostname per box is stored separately (in m_data_string)