Skip to content
Snippets Groups Projects
Commit f13830d4 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'web-additions' into 'master'

Some web doc additions

See merge request ogs/ogs!3493
parents 78d85f4c 2b761367
No related branches found
No related tags found
No related merge requests found
Subproject commit 711460bb9573fb89527f98679af904b67d62e9b6 Subproject commit a7e952f1bf9b9950c1808c098a91bb65d46db2e4
...@@ -31,13 +31,13 @@ Singularity per default mounts your home directory and also passes your current ...@@ -31,13 +31,13 @@ Singularity per default mounts your home directory and also passes your current
```bash ```bash
[git clone ogs] [git clone ogs]
singularity pull singularity pull docker://registry.opengeosys.org/ogs/ogs/ogs/gcc:master # Downloads the image to gcc.sif singularity pull docker://registry.opengeosys.org/ogs/ogs/gcc # Downloads the image to gcc_latest.sif
# OR: Pull the singularity pull docker://registry.opengeosys.org/ogs/ogs/ogs/gcc-gui:master image for compiling the Data Explorer # OR: Pull the image docker://registry.opengeosys.org/ogs/ogs/gcc-gui image for compiling the Data Explorer
singularity shell gcc_master.sif singularity shell gcc_latest.sif
[Now inside the container] [Now inside the container]
mkdir build; cd build mkdir build; cd build
cmake ../ogs -DCMAKE_BUILD_TYPE=Release cmake ../ogs -DCMAKE_BUILD_TYPE=Release -DOGS_DISABLE_CCACHE=ON # OR set env var CCACHE_DIR
make ninja
./bin/ogs ./bin/ogs
``` ```
...@@ -46,7 +46,7 @@ make ...@@ -46,7 +46,7 @@ make
Once ogs executable is built it can be called from **outside** the container: Once ogs executable is built it can be called from **outside** the container:
```bash ```bash
singularity exec gcc_master.sif build/bin/ogs some/path/project.prj singularity exec gcc_latest.sif build/bin/ogs some/path/project.prj
``` ```
This starts the container, mounts your home directory inside the container, passes the current working directory and runs the ogs executable (which is in your home directory which is mounted inside the container) with the passed project file. Everything works as expected and is transparent to the user. When ogs finishes the container stops and you returns to the host system. This starts the container, mounts your home directory inside the container, passes the current working directory and runs the ogs executable (which is in your home directory which is mounted inside the container) with the passed project file. Everything works as expected and is transparent to the user. When ogs finishes the container stops and you returns to the host system.
......
...@@ -30,6 +30,12 @@ sloppiness = pch_defines,time_macros ...@@ -30,6 +30,12 @@ sloppiness = pch_defines,time_macros
See the [ccache docs](https://ccache.samba.org/manual.html#_configuration_settings) for other available options. See the [ccache docs](https://ccache.samba.org/manual.html#_configuration_settings) for other available options.
To disable caching with ccache:
```bash
cmake . -DOGS_DISABLE_CCACHE=ON
```
### ccache and Clang ### ccache and Clang
Set the option `run_second_cpp = true` or `export CCACHE_CPP2=true` to suppress lots of [false positive compiler warnings](http://peter.eisentraut.org/blog/2014/12/01/ccache-and-clang-part-3/). Set the option `run_second_cpp = true` or `export CCACHE_CPP2=true` to suppress lots of [false positive compiler warnings](http://peter.eisentraut.org/blog/2014/12/01/ccache-and-clang-part-3/).
......
+++
date = "2021-03-05T10:49"
title = "Workflow testing"
author = "Lars Bilke"
weight = 1024
[menu]
[menu.devguide]
parent = "testing"
+++
## Introdution
We use the workflow manager [Snakemake](https://snakemake.readthedocs.io) to test workflows which consist of the execution of several steps which are based on each other.
## Requirements
- [Snakemake](https://snakemake.readthedocs.io/en/stable/getting_started/installation.html) >= {{< dataFile "versions.minimum_version.snakemake" >}}
- If you use [Poetry]({{< ref "python-env.md#poetry" >}}) then `snakemake` is installed in your virtual environment in your build-directory automatically. You can then call it via `poetry run snakemake ...`.
- On Windows only:
- The `tee`-utility in the `PATH` (can be installed from https://sourceforge.net/projects/unxutils)
## Examples
- [ExtractBoundary.smk](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Applications/Utils/ExtractBoundary.smk)
- [VoxelGridFromLayers.smk](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Applications/Utils/VoxelGridFromLayers.smk)
These example workflows [are added to ctest](https://gitlab.opengeosys.org/ogs/ogs/-/blob/540d0b454c9e3805a81f7c4a1b6ee7565be6845c/Applications/Utils/Tests.cmake#L302-315) as well:
```cmake
if(SNAKEMAKE AND NOT OGS_USE_MPI)
add_test(NAME snakemake_ExtractBoundary
COMMAND ${SNAKEMAKE} -j 1
--configfile ${PROJECT_BINARY_DIR}/buildinfo.yaml
-s ${CMAKE_CURRENT_SOURCE_DIR}/ExtractBoundary.smk
)
add_test(NAME snakemake_VoxelGridFromLayers
# ...
)
add_dependencies(ctest ExtractBoundary Layers2Grid AddFaultToVoxelGrid)
endif()
```
## Modularization
We started on implementing modular rule definitions and tool wrapper in [`scripts/snakemake`](https://gitlab.opengeosys.org/ogs/ogs/-/tree/master/scripts/snakemake).
## Links
- [Snakemake Documentation](https://snakemake.readthedocs.io)
- [Short tutorial](https://snakemake.readthedocs.io/en/stable/tutorial/short.html)
- [Software Carpentry Workshop](https://carpentries-incubator.github.io/workflows-snakemake/index.html)
- [HPC Carpentry Workshop with Snakemake](http://www.hpc-carpentry.org/hpc-python/11-snakemake-intro/index.html)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment