mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 12:54:50 +01:00
Docs: Description of Buid flag
This commit is contained in:
parent
d839ae4d5e
commit
3464ada1f1
@ -98,7 +98,11 @@ following available options:
|
||||
slowed down significantly. Defaults to _OFF_.
|
||||
- **POET_PREPROCESS_BENCHS**=*boolean* - enables the preprocessing of
|
||||
predefined models/benchmarks. Defaults to *ON*.
|
||||
|
||||
- **USE_AI_SURROGATE**=*boolean* - includes the functions of the AI
|
||||
surrogate model. This relies on the presence of a Python environment
|
||||
where Keras is installed.
|
||||
|
||||
|
||||
### Example: Build from scratch
|
||||
|
||||
Assuming that only the C/C++ compiler, MPI libraries, R runtime
|
||||
@ -318,7 +322,7 @@ precision is supported on that platform (e.g., nanoseconds).
|
||||
The AI surrogate can be activated for any benchmark and is by default
|
||||
initiated as a sequential keras model with three hidden layer of depth
|
||||
48, 96, 24 with relu activation and adam optimizer. All functions in
|
||||
`ai_surrogate_model.R` can be overridden by adding custom definitions
|
||||
`ai_surrogate_model_functions.R` can be overridden by adding custom definitions
|
||||
via an R file in the input script. This is done by adding the path to
|
||||
this file in the input script. Simply add the path as an element
|
||||
called `ai_surrogate_input_script` to the `chemistry_setup` list.
|
||||
|
||||
@ -119,6 +119,7 @@ target_compile_definitions(POETLib PUBLIC STRICT_R_HEADERS OMPI_SKIP_MPICXX)
|
||||
|
||||
file(READ "${PROJECT_SOURCE_DIR}/R_lib/kin_r_library.R" R_KIN_LIB )
|
||||
file(READ "${PROJECT_SOURCE_DIR}/R_lib/init_r_lib.R" R_INIT_LIB)
|
||||
file(READ "${PROJECT_SOURCE_DIR}/R_lib/ai_surrogate_model_functions.R" R_AI_SURROGATE_LIB)
|
||||
|
||||
configure_file(poet.hpp.in poet.hpp @ONLY)
|
||||
|
||||
|
||||
@ -583,6 +583,8 @@ int main(int argc, char *argv[]) {
|
||||
chemistry.masterSetField(init_list.getInitialGrid());
|
||||
|
||||
if (run_params.use_ai_surrogate) {
|
||||
// Load default function implementations
|
||||
R.parseEvalQ(ai_surrogate_r_library);
|
||||
/* Use dht species for model input and output */
|
||||
R["ai_surrogate_species"] =
|
||||
init_list.getChemistryInit().dht_species.getNames();
|
||||
|
||||
@ -36,6 +36,8 @@ static const char *poet_version = "@POET_VERSION@";
|
||||
// using the Raw string literal to avoid escaping the quotes
|
||||
static const inline std::string kin_r_library = R"(@R_KIN_LIB@)";
|
||||
static const inline std::string init_r_library = R"(@R_INIT_LIB@)";
|
||||
static const inline std::string ai_surrogate_r_library =
|
||||
R"(@R_AI_SURROGATE_LIB@)";
|
||||
static const inline std::string r_runtime_parameters = "mysetup";
|
||||
|
||||
struct RuntimeParameters {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user