|
WarpX
|
#include <LoadBalanceCosts.H>
Public Member Functions | |
| LoadBalanceCosts (const std::string &rd_name) | |
| void | ComputeDiags (int step) final |
| void | WriteToFile (int step) const final |
Public Member Functions inherited from ReducedDiags | |
| 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 () |
| virtual void | ComputeDiagsMidStep (int step) |
| bool | DoDiags (int step) const |
| virtual void | WriteCheckpointData (std::string const &dir) |
| Write out checkpoint related data. | |
| virtual void | ReadCheckpointData (std::string const &dir) |
| Read in checkpoint related data. | |
| 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 |
| int | m_nBoxesMax = -1 |
Public Attributes inherited from ReducedDiags | |
| std::string | m_path = "./diags/reducedfiles/" |
| output path (default) | |
| std::string | m_extension = "txt" |
| output extension (default) | |
| std::string | m_rd_name |
| diags name | |
| utils::parser::IntervalsParser | m_intervals |
| output intervals | |
| bool | m_write_header = false |
| check if header should be written | |
| std::string | m_sep = " " |
| separator in the output file | |
| int | m_precision = 14 |
| precision for data in the output file | |
| std::vector< amrex::Real > | m_data |
| output data | |
Static Public Attributes | |
| static const int | m_nDataFields = 8 |
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
|
static |
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)