mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-13 11:28:24 +01:00
perf: remove unused parameters from paramlist and parameter structure
doc: update doc to latest changes data: update benchmarks to latest changes
This commit is contained in:
parent
6d94141c98
commit
37ee74faaf
71
README.md
71
README.md
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Time-stamp: "Last modified 2023-07-20 11:30:44 delucia"
|
||||
Time-stamp: "Last modified 2023-08-02 13:55:11 mluebke"
|
||||
-->
|
||||
|
||||
# POET
|
||||
@ -69,6 +69,9 @@ following available options:
|
||||
DHT usage. Defaults to _OFF_.
|
||||
- **POET_ENABLE_TESTING**=_boolean_ - enables small set of unit tests (more to
|
||||
come). Defaults to _OFF_.
|
||||
- **POET_PHT_ADDITIONAL_INFO**=_boolean_ - enabling the count of accesses to one
|
||||
PHT bucket. Use with caution, as things will get slowed down significantly.
|
||||
Defaults to _OFF_.
|
||||
|
||||
### Example: Build from scratch
|
||||
|
||||
@ -109,15 +112,24 @@ poet
|
||||
│ └── kin_r_library.R
|
||||
└── share
|
||||
└── poet
|
||||
├── bench
|
||||
│ ├── dolo_diffu_inner_large.R
|
||||
│ ├── dolo_diffu_inner.R
|
||||
│ └── dolo_inner.pqi
|
||||
└── examples
|
||||
├── dol.pqi
|
||||
├── phreeqc_kin.dat
|
||||
├── SimDol1D_diffu.R
|
||||
└── SimDol2D_diffu.R
|
||||
└── bench
|
||||
├── barite
|
||||
│ ├── barite_interp_eval.R
|
||||
│ ├── barite.pqi
|
||||
│ ├── barite.R
|
||||
│ └── db_barite.dat
|
||||
├── dolo
|
||||
│ ├── dolo_diffu_inner_large.R
|
||||
│ ├── dolo_diffu_inner.R
|
||||
│ ├── dolo_inner.pqi
|
||||
│ ├── dolo_interp_long.R
|
||||
│ └── phreeqc_kin.dat
|
||||
└── surfex
|
||||
├── ExBase.pqi
|
||||
├── ex.R
|
||||
├── SMILE_2021_11_01_TH.dat
|
||||
├── SurfExBase.pqi
|
||||
└── surfex.R
|
||||
```
|
||||
|
||||
The R libraries will be loaded at runtime and the paths are hardcoded
|
||||
@ -125,6 +137,10 @@ absolute paths inside `poet.cpp`. So, if you consider to move
|
||||
`bin/poet` either change paths of the R source files and recompile
|
||||
POET or also move `R_lib/*` relative to the binary.
|
||||
|
||||
The benchmarks consist of input scripts, which are provided as .R files.
|
||||
Additionally, Phreeqc scripts and their corresponding databases are required,
|
||||
stored as .pqi and .dat files, respectively.
|
||||
|
||||
## Running
|
||||
|
||||
Run POET by `mpirun ./poet <OPTIONS> <SIMFILE> <OUTPUT_DIRECTORY>`
|
||||
@ -132,28 +148,25 @@ where:
|
||||
|
||||
- **OPTIONS** - runtime parameters (explained below)
|
||||
- **SIMFILE** - simulation described as R script (e.g.
|
||||
`<POET_INSTALL_DIR>/share/examples/SimDol2D_diffu.R`)
|
||||
`<POET_INSTALL_DIR>/share/poet/bench/dolo/dolo_interp_long.R`)
|
||||
- **OUTPUT_DIRECTORY** - path, where all output of POET should be stored
|
||||
|
||||
### Runtime options
|
||||
|
||||
The following parameters can be set:
|
||||
|
||||
| Option | Value | Description |
|
||||
|--------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| **--work-package-size=** | _1..n_ | size of work packages (defaults to _5_) |
|
||||
| **--ignore-result** | | disables store of simulation resuls |
|
||||
| **--dht** | | enabling DHT usage (defaults to _OFF_) |
|
||||
| **--dht-signif=** | _1..n_ | set rounding to number of significant digits (defaults to _5_) (it is recommended to use `signif_vec` in R input script) |
|
||||
| **--dht-strategy=** | _0-1_ | change DHT strategy. **NOT IMPLEMENTED YET** (Defaults to _0_) |
|
||||
| **--dht-size=** | _1-n_ | size of DHT per process involved in megabyte (defaults to _1000 MByte_) |
|
||||
| **--dht-snaps=** | _0-2_ | disable or enable storage of DHT snapshots |
|
||||
| **--dht-file=** | `<SNAPSHOT>` | initializes DHT with the given snapshot file |
|
||||
|
||||
#### Additions to `dht-signif`
|
||||
|
||||
Only used if no vector is given in setup file. For individual values
|
||||
per column use R vector `signif_vector` in `SIMFILE`.
|
||||
| Option | Value | Description |
|
||||
|-----------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| **--work-package-size=** | _1..n_ | size of work packages (defaults to _5_) |
|
||||
| **--ignore-result** | | disables store of simulation resuls |
|
||||
| **--dht** | | enabling DHT usage (defaults to _OFF_) |
|
||||
| **--dht-strategy=** | _0-1_ | change DHT strategy. **NOT IMPLEMENTED YET** (Defaults to _0_) |
|
||||
| **--dht-size=** | _1-n_ | size of DHT per process involved in megabyte (defaults to _1000 MByte_) |
|
||||
| **--dht-snaps=** | _0-2_ | disable or enable storage of DHT snapshots |
|
||||
| **--dht-file=** | `<SNAPSHOT>` | initializes DHT with the given snapshot file |
|
||||
| **--interp-size** | _1-n_ | size of PHT (interpolation) per process in megabyte |
|
||||
| **--interp-bucket-entries** | _1-n_ | number of entries to store at maximum in one PHT bucket |
|
||||
| **--interp-min** | _1-n_ | number of entries in PHT bucket needed to start interpolation |
|
||||
|
||||
#### Additions to `dht-snaps`
|
||||
|
||||
@ -168,13 +181,13 @@ Following values can be set:
|
||||
### Example: Running from scratch
|
||||
|
||||
We will continue the above example and start a simulation with
|
||||
`SimDol2D_diffu.R`. As transport a simple fixed-coefficient diffusion is used.
|
||||
`dolo_diffu_inner.R`. As transport a simple fixed-coefficient diffusion is used.
|
||||
It's a 2D, 100x100 grid, simulating 10 time steps. To start the simulation with
|
||||
4 processes `cd` into your previously installed POET-dir
|
||||
`<POET_INSTALL_DIR>/bin` and run:
|
||||
|
||||
```sh
|
||||
mpirun -n 4 ./poet ../share/poet/examples/SimDol2D_diffu.R output
|
||||
mpirun -n 4 ./poet ../share/poet/bench/dolo/dolo_diffu_inner.R/ output
|
||||
```
|
||||
|
||||
After a finished simulation all data generated by POET will be found
|
||||
@ -187,7 +200,7 @@ produced. This is done by appending the `--dht-snaps=<value>` option. The
|
||||
resulting call would look like this:
|
||||
|
||||
```sh
|
||||
mpirun -n 4 ./poet --dht --dht-snaps=2 ../share/poet/examples/SimDol2D_diffu.R output
|
||||
mpirun -n 4 ./poet --dht --dht-snaps=2 ../share/poet/bench/dolo/dolo_diffu_inner.R/ output
|
||||
```
|
||||
|
||||
## About the usage of MPI_Wtime()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-04-24 16:51:23 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:59:22 mluebke"
|
||||
|
||||
database <- normalizePath("../share/poet/bench/barite/db_barite.dat")
|
||||
input_script <- normalizePath("../share/poet/bench/barite/barite.pqi")
|
||||
@ -28,11 +28,7 @@ init_cell <- list(
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(1, 1),
|
||||
type = types[1],
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = types[1]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-07-28 16:57:40 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:59:02 mluebke"
|
||||
|
||||
database <- normalizePath("../share/poet/bench/dolo/phreeqc_kin.dat")
|
||||
input_script <- normalizePath("../share/poet/bench/dolo/dolo_inner.pqi")
|
||||
@ -29,11 +29,7 @@ init_cell <- list(
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(1, 1),
|
||||
type = types[1],
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = types[1]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-07-28 16:57:40 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:59:12 mluebke"
|
||||
|
||||
database <- normalizePath("../share/poet/bench/dolo/phreeqc_kin.dat")
|
||||
input_script <- normalizePath("../share/poet/bench/dolo/dolo_inner.pqi")
|
||||
@ -29,11 +29,7 @@ init_cell <- list(
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(2, 1),
|
||||
type = types[1],
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = types[1]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-08-01 18:34:47 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:47:06 mluebke"
|
||||
|
||||
database <- normalizePath("../share/poet/bench/dolo/phreeqc_kin.dat")
|
||||
input_script <- normalizePath("../share/poet/bench/dolo/dolo_inner.pqi")
|
||||
@ -29,11 +29,7 @@ init_cell <- list(
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(5, 2.5),
|
||||
type = types[1],
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = types[1]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-04-17 12:29:27 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:59:35 mluebke"
|
||||
|
||||
database <- normalizePath("./SMILE_2021_11_01_TH.dat")
|
||||
input_script <- normalizePath("./ExBase.pqi")
|
||||
@ -40,11 +40,7 @@ init_cell <- list(H = 1.476571028625e-01,
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(1, 1),
|
||||
type = "scratch",
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = "scratch"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Time-stamp: "Last modified 2023-04-17 15:48:21 mluebke"
|
||||
## Time-stamp: "Last modified 2023-08-02 13:59:44 mluebke"
|
||||
|
||||
database <- normalizePath("../share/poet/bench/surfex/SMILE_2021_11_01_TH.dat")
|
||||
input_script <- normalizePath("../share/poet/bench/surfex/SurfExBase.pqi")
|
||||
@ -40,11 +40,7 @@ init_cell <- list(H = 1.476571028625e-01,
|
||||
grid <- list(
|
||||
n_cells = c(n, m),
|
||||
s_cells = c(1, 1),
|
||||
type = "scratch",
|
||||
init_cell = as.data.frame(init_cell, check.names = FALSE),
|
||||
props = names(init_cell),
|
||||
database = database,
|
||||
input_script = input_script
|
||||
type = "scratch"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -13,10 +13,6 @@ by POET.
|
||||
| `n_cells` | Numeric Vector | Number of cells in each direction |
|
||||
| `s_cells` | Numeric Vector | Spatial resolution of grid in each direction |
|
||||
| `type` | String | Type of initialization, can be set to *scratch*, *phreeqc* or *rds* |
|
||||
| `init_cell` | Data Frame | Containing all exactly one value per species to initialize the field. |
|
||||
| `props` | String Vector | Names of all species |
|
||||
| `database` | String | Path to Phreeqc database |
|
||||
| `input_script` | String | Path to Phreeqc initial script |
|
||||
|
||||
## Diffusion parameters
|
||||
|
||||
@ -70,10 +66,12 @@ vecinj_index <- list(
|
||||
|
||||
## Chemistry parameters
|
||||
|
||||
| name | type | description |
|
||||
|----------------|--------|-----------------------------------|
|
||||
| `database` | String | Path to the Phreeqc database |
|
||||
| `input_script` | String | Path the the Phreeqc input script |
|
||||
| name | type | description |
|
||||
|----------------|--------------|----------------------------------------------------------------------------------|
|
||||
| `database` | String | Path to the Phreeqc database |
|
||||
| `input_script` | String | Path the the Phreeqc input script |
|
||||
| `dht_species` | Named Vector | Indicates significant digits to use for each species for DHT rounding. |
|
||||
| `pht_species` | Named Vector | Indicates significant digits to use for each species for Interpolation rounding. |
|
||||
|
||||
## Final setup
|
||||
|
||||
@ -86,10 +84,3 @@ vecinj_index <- list(
|
||||
| `timesteps` | Numeric Vector | $\Delta t$ to use for specific iteration |
|
||||
| `store_result` | Boolean | Indicates if results should be stored |
|
||||
| `out_save` | Numeric Vector | *optional:* At which iteration the states should be stored |
|
||||
|
||||
### DHT setup
|
||||
|
||||
| name | type | description |
|
||||
|-----------------|----------------|---------------------------------------------------------------------------------|
|
||||
| `signif_vector` | Numeric Vector | Indicates significant digits to use for DHT rounding. Order of `props` vector. |
|
||||
| `prop_type` | String Vector | Set type of species for rounding, can be left blank or set to *act* or *ignore* |
|
||||
|
||||
@ -240,11 +240,12 @@ private:
|
||||
std::list<std::string> validateOptions(argh::parser cmdl);
|
||||
|
||||
const std::set<std::string> flaglist{
|
||||
"ignore-result", "dht", "dht-nolog", "P", "progress", "interp"};
|
||||
"ignore-result", "dht", "P", "progress", "interp"};
|
||||
const std::set<std::string> paramlist{
|
||||
"work-package-size", "dht-signif", "dht-strategy",
|
||||
"dht-size", "dht-snaps", "dht-file",
|
||||
"interp-size", "interp-min", "interp-bucket-entries"};
|
||||
"work-package-size", "dht-strategy",
|
||||
"dht-size", "dht-snaps",
|
||||
"dht-file", "interp-size",
|
||||
"interp-min", "interp-bucket-entries"};
|
||||
|
||||
t_simparams simparams;
|
||||
|
||||
|
||||
@ -56,14 +56,6 @@ poet::GridParams::s_GridParams(RInside &R) {
|
||||
(dim == 1 ? this->n_cells[0] : this->n_cells[0] * this->n_cells[1]);
|
||||
|
||||
this->type = Rcpp::as<std::string>(R.parseEval("mysetup$grid$type"));
|
||||
this->init_df =
|
||||
Rcpp::as<Rcpp::DataFrame>(R.parseEval("mysetup$grid$init_cell"));
|
||||
this->props =
|
||||
Rcpp::as<std::vector<std::string>>(R.parseEval("mysetup$grid$props"));
|
||||
this->input_script =
|
||||
Rcpp::as<std::string>(R.parseEval("mysetup$grid$input_script"));
|
||||
this->database_path =
|
||||
Rcpp::as<std::string>(R.parseEval("mysetup$grid$database"));
|
||||
}
|
||||
|
||||
poet::DiffusionParams::s_DiffusionParams(RInside &R) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user