|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|

Public Member Functions | |
| void | runTest (bool const &compute_L2_norm_only=false, double const &maxAllowedL1Error=0.0, double const &maxAllowedError=0.0) |
| Run the system test that has been set up. | |
| void | runL1ErrorTest (double const &maxAllowedL1Error, double const &maxAllowedError=1E-7) |
| Compute the L1 error for each field compared to the initial conditions. Doesn't work with particle data. | |
| void | launchCholla () |
| Launch Cholla as it is set up. | |
| void | openHydroTestData () |
| std::string | getChollaPath () |
| Get the Cholla Path object. | |
| std::string | getChollaSettingsFilePath () |
| Get the Cholla Settings File Path object. | |
| double | getL2Norm () |
| Get the L2Norm. | |
| std::string | getOutputDirectory () |
| Get the Output Directory object. | |
| std::string | getConsoleOutputPath () |
| Get the Console Output Path object. | |
| H5::H5File | getFiducialFile () |
| Get the Fiducial File object. | |
| H5::H5File | getTestFile (size_t const &i=0) |
| Get the Test File object. | |
| std::vector< std::string > | getDataSetsToTest () |
| Get the vector of datasets that will be tested. | |
| void | setFixedEpsilon (double const &newVal) |
| Set the Fixed Epsilon value. | |
| void | setDataSetsToTest (std::vector< std::string > const &dataSetNames) |
| Choose which datasets to test. By default it tests all the datasets in the fiducial data. A warning will be thrown if not all the datasets are being tested. Note that any call to this function will overwrite the default values. | |
| void | setCompareNumTimeSteps (bool const &compare) |
| Set the Compare Num Time Steps object. | |
| void | setFiducialData (std::string const &fieldName, std::vector< double > const &dataVec) |
| Set or add a fiducial dataset. | |
| void | setFiducialNumTimeSteps (int const &numTimeSteps) |
| Set the Fiducial Num Time Steps object. | |
| std::vector< double > | generateConstantData (double const &value, size_t const &nx=1, size_t const &ny=1, size_t const &nz=1) |
| Generate an vector of the specified size populated by the specified value. | |
| std::vector< double > | loadTestFieldData (std::string dataSetName, std::vector< size_t > &testDims, std::vector< H5::H5File > file={}) |
| Load the test data for physical fields from the HDF5 file(s). If there is more than one HDF5 file then it concatenates the contents into a single vector. Particle data is handeled with _loadTestParticleData. | |
| std::vector< double > | generateSineData (double const &offset, double const &litude, double const &kx, double const &ky, double const &kz, double const &phase, size_t const &nx=1, size_t const &ny=1, size_t const &nz=1) |
| Generate a std::vector of the specified size populated by a sine wave. The equation used to generate the wave is: | |
| SystemTestRunner (bool const &particleData=false, bool const &hydroData=true, bool const &useFiducialFile=true, bool const &useSettingsFile=true, bool const &gravityData=false) | |
| Construct a new System Test Runner object. | |
Public Attributes | |
| size_t | numMpiRanks = 1 |
| The number of MPI ranks, defaults to 1. | |
| system_test::ParamArgListBuilder | chollaLaunchParams |
Set the parameters that Cholla launches with, potentially entirely replacing the need for a settings file. A string of the launch parameters that will override the values in the settings file (if given). Any of Cholla's standard launch paramters work except outdir as that is reserved for usage in the system_test::SystemTestRunner.runTest() method. | |
| system_test::SystemTestRunner::SystemTestRunner | ( | bool const & | particleData = false, |
| bool const & | hydroData = true, |
||
| bool const & | useFiducialFile = true, |
||
| bool const & | useSettingsFile = true, |
||
| bool const & | gravityData = false |
||
| ) |
Construct a new System Test Runner object.
| [in] | particleData | Is there particle data? |
| [in] | hydroData | Is there hydro data? |
| [in] | useFiducialFile | Indicate if you're using a HDF5 file or will generate your own. Defaults to true, i.e. using an HDF5 file. Set to false to generate your own |
| [in] | useSettingsFile | Indicate if you're using a settings file. If true then the settings file is automatically found based on the naming convention. If false then the user MUST provide all the required settings with the SystemTestRunner::chollaLaunchParams member variable |
| [in] | gravityData | Is there gravity data? |
| std::vector< double > system_test::SystemTestRunner::generateConstantData | ( | double const & | value, |
| size_t const & | nx = 1, |
||
| size_t const & | ny = 1, |
||
| size_t const & | nz = 1 |
||
| ) |
Generate an vector of the specified size populated by the specified value.
| [in] | value | The value to populate the vector with |
| [in] | nx | (optional) The size of the field in the x-direction. Defaults to 1 |
| [in] | ny | (optional) The size of the field in the y-direction. Defaults to 1 |
| [in] | nz | (optional) The size of the field in the z-direction. Defaults to 1 |
| std::vector< double > system_test::SystemTestRunner::generateSineData | ( | double const & | offset, |
| double const & | amplitude, | ||
| double const & | kx, | ||
| double const & | ky, | ||
| double const & | kz, | ||
| double const & | phase, | ||
| size_t const & | nx = 1, |
||
| size_t const & | ny = 1, |
||
| size_t const & | nz = 1 |
||
| ) |
Generate a std::vector of the specified size populated by a sine wave. The equation used to generate the wave is:
wave = offset + amplitude * sin(kx*xIndex + ky*yIndex + kz*zIndex + phase)
| [in] | offset | Flat offset from zero |
| [in] | amplitude | Amplitude of the wave |
| [in] | kx | The x component of the wave vector in pixel units |
| [in] | ky | The y component of the wave vector in pixel units |
| [in] | kz | The z component of the wave vector in pixel units |
| [in] | phase | Phase of the sine wave |
| [in] | nx | (optional) The size of the field in the x-direction. Defaults to 1 |
| [in] | ny | (optional) The size of the field in the y-direction. Defaults to 1 |
| [in] | nz | (optional) The size of the field in the z-direction. Defaults to 1 |
|
inline |
Get the Cholla Path object.
|
inline |
Get the Cholla Settings File Path object.
|
inline |
Get the Console Output Path object.
|
inline |
Get the vector of datasets that will be tested.
|
inline |
Get the Fiducial File object.
|
inline |
Get the L2Norm.
|
inline |
Get the Output Directory object.
|
inline |
Get the Test File object.
| index | The MPI rank of the file you want to return. Defaults to 0 |
| std::vector< double > system_test::SystemTestRunner::loadTestFieldData | ( | std::string | dataSetName, |
| std::vector< size_t > & | testDims, | ||
| std::vector< H5::H5File > | file = {} |
||
| ) |
Load the test data for physical fields from the HDF5 file(s). If there is more than one HDF5 file then it concatenates the contents into a single vector. Particle data is handeled with _loadTestParticleData.
| [in] | dataSetName | The name of the dataset to get |
| [out] | testDims | An vector with the length of each dimension in it |
| [in] | file | (optional) The vector of HDF5 files to load |
| void system_test::SystemTestRunner::runL1ErrorTest | ( | double const & | maxAllowedL1Error, |
| double const & | maxAllowedError = 1E-7 |
||
| ) |
Compute the L1 error for each field compared to the initial conditions. Doesn't work with particle data.
| [in] | maxAllowedL1Error | The maximum allowed L1 error for this test |
| [in] | maxAllowedError | The maximum allowed for any value in the test |
Only run if this variable is set to true. Generally this and globalCompareSystemTestResults should only be used for large MPI / tests where the user wishes to separate the execution of cholla and the / comparison of results onto different machines/jobs
If set to false then no comparison will be performed. Generally this and globalRunCholla should only be used for large MPI tests where the user wishes to separate the execution of cholla and the comparison of results onto different machines/jobs
| void system_test::SystemTestRunner::runTest | ( | bool const & | compute_L2_norm_only = false, |
| double const & | maxAllowedL1Error = 0.0, |
||
| double const & | maxAllowedError = 0.0 |
||
| ) |
Run the system test that has been set up.
Only run if this variable is set to true. Generally this and globalCompareSystemTestResults should only be used for large MPI / tests where the user wishes to separate the execution of cholla and the / comparison of results onto different machines/jobs
If set to false then no comparison will be performed. Generally this and globalRunCholla should only be used for large MPI tests where the user wishes to separate the execution of cholla and the comparison of results onto different machines/jobs
|
inline |
Set the Compare Num Time Steps object.
| [in] | compare | Defaults to true. If false then the number of timesteps is not compared. |
|
inline |
Choose which datasets to test. By default it tests all the datasets in the fiducial data. A warning will be thrown if not all the datasets are being tested. Note that any call to this function will overwrite the default values.
| [in] | dataSetNames | A std::vector of std::strings where each entry is a dataset name. Note that it is case sensitive |
| void system_test::SystemTestRunner::setFiducialData | ( | std::string const & | fieldName, |
| std::vector< double > const & | dataVec | ||
| ) |
Set or add a fiducial dataset.
| [in] | fieldName | The name of the field to be added |
| [in] | dataArr | The std::vector for the data vector to be added as a data set |
|
inline |
Set the Fiducial Num Time Steps object.
| numTimeSteps | The number of time steps in the fiducial data |
|
inline |
Set the Fixed Epsilon value.
| [in] | newVal | The new value of fixed epsilon |