fix cmake handling

- use imported target for linking
- use separate damaris cmake script
- handle HAVE_DAMARIS config variable in the usual way

fixing issues when user does not provide an outputDir via a command_line

avoid adding damaris's command lines when we dont have damaris
This commit is contained in:
Arne Morten Kvarving
2022-10-12 11:19:00 +02:00
committed by Elyes Ahmed
parent 0a7f7e94b7
commit ecc36f6ce8
6 changed files with 25 additions and 45 deletions

View File

@@ -62,6 +62,7 @@ template<class TypeTag, class MyTypeTag>
struct EclOutputDoublePrecision {
using type = UndefinedProperty;
};
#ifdef HAVE_DAMARIS
template<class TypeTag, class MyTypeTag>
struct EnableDamarisOutput {
using type = UndefinedProperty;
@@ -70,6 +71,7 @@ template<class TypeTag, class MyTypeTag>
struct EnableDamarisOutputCollective {
using type = UndefinedProperty;
};
#endif
template<class TypeTag, class MyTypeTag>
struct EnableEsmry {
using type = UndefinedProperty;
@@ -128,8 +130,10 @@ public:
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableAsyncEclOutput,
"Write the ECL-formated results in a non-blocking way (i.e., using a separate thread).");
#ifdef HAVE_DAMARIS
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableDamarisOutputCollective,
"Write output via Damaris using parallel HDF5 to get single file per timestep instead of one per Damaris core.");
#endif
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableEsmry,
"Write ESMRY file for fast loading of summary data.");
}
@@ -459,10 +463,10 @@ public:
private:
static bool enableEclOutput_()
{ return EWOMS_GET_PARAM(TypeTag, bool, EnableEclOutput); }
#ifdef HAVE_DAMARIS
static bool enableDamarisOutput_()
{ return EWOMS_GET_PARAM(TypeTag, bool, EnableDamarisOutput); }
#endif
const EclipseState& eclState() const
{ return simulator_.vanguard().eclState(); }