mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding command line option to specify the dask file being used --damaris-dask-file= that will add the file name to the Daamris XML configuration file
This commit is contained in:
parent
d928078219
commit
89fabf132e
@ -99,7 +99,10 @@ template<class TypeTag, class MyTypeTag>
|
|||||||
struct DamarisLogLevel {
|
struct DamarisLogLevel {
|
||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
struct DamarisDaskFile {
|
||||||
|
using type = UndefinedProperty;
|
||||||
|
};
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
@ -154,6 +157,9 @@ public:
|
|||||||
EWOMS_REGISTER_PARAM(TypeTag, std::string, DamarisLogLevel,
|
EWOMS_REGISTER_PARAM(TypeTag, std::string, DamarisLogLevel,
|
||||||
"The log level for the Damaris logging system (boost log based). \n \
|
"The log level for the Damaris logging system (boost log based). \n \
|
||||||
Levels are: [trace, debug, info, warning, error, fatal]. Currently debug and info are useful. ");
|
Levels are: [trace, debug, info, warning, error, fatal]. Currently debug and info are useful. ");
|
||||||
|
EWOMS_REGISTER_PARAM(TypeTag, std::string, DamarisDaskFile,
|
||||||
|
"The name of a Dask json configuration file (if using Dask for processing).");
|
||||||
|
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, int, DamarisDedicatedCores,
|
EWOMS_REGISTER_PARAM(TypeTag, int, DamarisDedicatedCores,
|
||||||
"Set the number of dedicated cores (MPI processes) that should be used for Damaris processing (per node). \n \
|
"Set the number of dedicated cores (MPI processes) that should be used for Damaris processing (per node). \n \
|
||||||
Must divide evenly into the number of simulation ranks (client ranks).");
|
Must divide evenly into the number of simulation ranks (client ranks).");
|
||||||
|
@ -429,7 +429,10 @@ template<class TypeTag>
|
|||||||
struct DamarisLogLevel<TypeTag, TTag::EclBaseProblem> {
|
struct DamarisLogLevel<TypeTag, TTag::EclBaseProblem> {
|
||||||
static constexpr auto value = "info";
|
static constexpr auto value = "info";
|
||||||
};
|
};
|
||||||
|
template<class TypeTag>
|
||||||
|
struct DamarisDaskFile<TypeTag, TTag::EclBaseProblem> {
|
||||||
|
static constexpr auto value = "";
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
// If available, write the ECL output in a non-blocking manner
|
// If available, write the ECL output in a non-blocking manner
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
|
@ -219,6 +219,7 @@ DamarisSettings::getKeywords([[maybe_unused]] const Parallel::Communication& com
|
|||||||
{"_DISABLEPYTHONFIN_",disablePythonXMLfin},
|
{"_DISABLEPYTHONFIN_",disablePythonXMLfin},
|
||||||
{"_DISABLEPARAVIEWSTART_",disableParaviewXMLstart},
|
{"_DISABLEPARAVIEWSTART_",disableParaviewXMLstart},
|
||||||
{"_DISABLEPARAVIEWFIN_",disableParaviewXMLfin},
|
{"_DISABLEPARAVIEWFIN_",disableParaviewXMLfin},
|
||||||
|
{"_DASK_SCHEDULER_FILE_",damarisDaskFile},
|
||||||
};
|
};
|
||||||
return damaris_keywords;
|
return damaris_keywords;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@ struct DamarisSettings {
|
|||||||
|
|
||||||
std::string damarisSimName; // empty defaults to opm-sim-<magic_number>
|
std::string damarisSimName; // empty defaults to opm-sim-<magic_number>
|
||||||
std::string damarisLogLevel = "info";
|
std::string damarisLogLevel = "info";
|
||||||
|
std::string damarisDaskFile = "" ;
|
||||||
int nDamarisCores = 1 ;
|
int nDamarisCores = 1 ;
|
||||||
int nDamarisNodes = 0 ;
|
int nDamarisNodes = 0 ;
|
||||||
long shmemSizeBytes = 536870912 ;
|
long shmemSizeBytes = 536870912 ;
|
||||||
@ -89,7 +90,7 @@ DamarisKeywords(const Parallel::Communication& comm, const std::string& OutputDi
|
|||||||
settings.nDamarisNodes = EWOMS_GET_PARAM(TypeTag, int, DamarisDedicatedNodes);
|
settings.nDamarisNodes = EWOMS_GET_PARAM(TypeTag, int, DamarisDedicatedNodes);
|
||||||
settings.shmemSizeBytes = EWOMS_GET_PARAM(TypeTag, long, DamarisSharedMemeorySizeBytes);
|
settings.shmemSizeBytes = EWOMS_GET_PARAM(TypeTag, long, DamarisSharedMemeorySizeBytes);
|
||||||
settings.damarisLogLevel = EWOMS_GET_PARAM(TypeTag, std::string, DamarisLogLevel);
|
settings.damarisLogLevel = EWOMS_GET_PARAM(TypeTag, std::string, DamarisLogLevel);
|
||||||
|
settings.damarisDaskFile = EWOMS_GET_PARAM(TypeTag, std::string, DamarisDaskFile);
|
||||||
return settings.getKeywords(comm, OutputDir);
|
return settings.getKeywords(comm, OutputDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ std::string initDamarisXmlFile()
|
|||||||
<parameter name="n" type="int" value="1" />
|
<parameter name="n" type="int" value="1" />
|
||||||
|
|
||||||
<layout name="zonal_layout_usmesh_integer" type="int" dimensions="n_elements_local" global="n_elements_total" comment="For the field data e.g. Pressure" />
|
<layout name="zonal_layout_usmesh_integer" type="int" dimensions="n_elements_local" global="n_elements_total" comment="For the field data e.g. Pressure" />
|
||||||
<variable name="GLOBAL_CELL_INDEX" layout="zonal_layout_usmesh_integer" type="scalar" visualizable="false" time-varying="false" centering="zonal" />
|
<variable name="GLOBAL_CELL_INDEX" layout="zonal_layout_usmesh_integer" type="scalar" visualizable="false" time-varying="false" centering="zonal" store="_MYSTORE_OR_EMPTY_REGEX_" script="_MAKE_AVAILABLE_IN_PYTHON_" />
|
||||||
<layout name="zonal_layout_usmesh" type="double" dimensions="n_elements_local" global="n_elements_total" comment="For the field data e.g. Pressure" />
|
<layout name="zonal_layout_usmesh" type="double" dimensions="n_elements_local" global="n_elements_total" comment="For the field data e.g. Pressure" />
|
||||||
<variable name="PRESSURE" layout="zonal_layout_usmesh" type="scalar" visualizable="true" mesh="us_mesh" unit="_PRESSURE_UNIT_" centering="zonal" select-file="GLOBAL_CELL_INDEX" store="_MYSTORE_OR_EMPTY_REGEX_" script="_MAKE_AVAILABLE_IN_PYTHON_" />
|
<variable name="PRESSURE" layout="zonal_layout_usmesh" type="scalar" visualizable="true" mesh="us_mesh" unit="_PRESSURE_UNIT_" centering="zonal" select-file="GLOBAL_CELL_INDEX" store="_MYSTORE_OR_EMPTY_REGEX_" script="_MAKE_AVAILABLE_IN_PYTHON_" />
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ std::string initDamarisXmlFile()
|
|||||||
</storage>
|
</storage>
|
||||||
|
|
||||||
<scripts>
|
<scripts>
|
||||||
<_DISABLEPYTHONSTART_pyscript name="PythonScript" file="_PYTHON_SCRIPT_" language="python" frequency="1" scheduler-file="" nthreads="0" keep-workers="no" /_DISABLEPYTHONFIN_>
|
<_DISABLEPYTHONSTART_pyscript name="PythonScript" file="_PYTHON_SCRIPT_" language="python" frequency="1" scheduler-file="_DASK_SCHEDULER_FILE_" nthreads="0" keep-workers="no" /_DISABLEPYTHONFIN_>
|
||||||
</scripts>
|
</scripts>
|
||||||
|
|
||||||
<_DISABLEPARAVIEWSTART_paraview update-frequency="1" write-vtk="0" write-vtk-binary="false" >
|
<_DISABLEPARAVIEWSTART_paraview update-frequency="1" write-vtk="0" write-vtk-binary="false" >
|
||||||
|
Loading…
Reference in New Issue
Block a user