diff --git a/ThirdParty/container-maker b/ThirdParty/container-maker index 711460bb9573fb89527f98679af904b67d62e9b6..a7e952f1bf9b9950c1808c098a91bb65d46db2e4 160000 --- a/ThirdParty/container-maker +++ b/ThirdParty/container-maker @@ -1 +1 @@ -Subproject commit 711460bb9573fb89527f98679af904b67d62e9b6 +Subproject commit a7e952f1bf9b9950c1808c098a91bb65d46db2e4 diff --git a/web/content/docs/devguide/advanced/singularity.md b/web/content/docs/devguide/advanced/singularity.md index 4591a9bf8cdbdb80bc8557ac08ecb5637748d890..5d39020cfa3bd8760b33b481bae48592eabc54d7 100644 --- a/web/content/docs/devguide/advanced/singularity.md +++ b/web/content/docs/devguide/advanced/singularity.md @@ -31,13 +31,13 @@ Singularity per default mounts your home directory and also passes your current ```bash [git clone ogs] -singularity pull singularity pull docker://registry.opengeosys.org/ogs/ogs/ogs/gcc:master # Downloads the image to gcc.sif -# OR: Pull the singularity pull docker://registry.opengeosys.org/ogs/ogs/ogs/gcc-gui:master image for compiling the Data Explorer -singularity shell gcc_master.sif +singularity pull docker://registry.opengeosys.org/ogs/ogs/gcc # Downloads the image to gcc_latest.sif +# OR: Pull the image docker://registry.opengeosys.org/ogs/ogs/gcc-gui image for compiling the Data Explorer +singularity shell gcc_latest.sif [Now inside the container] mkdir build; cd build -cmake ../ogs -DCMAKE_BUILD_TYPE=Release -make +cmake ../ogs -DCMAKE_BUILD_TYPE=Release -DOGS_DISABLE_CCACHE=ON # OR set env var CCACHE_DIR +ninja ./bin/ogs ``` @@ -46,7 +46,7 @@ make Once ogs executable is built it can be called from **outside** the container: ```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. diff --git a/web/content/docs/devguide/advanced/using-ccache.md b/web/content/docs/devguide/advanced/using-ccache.md index 9dc92b6f2e97fc07e57f578c6644e9767f59a4c1..872d3b94aa35db366cad3fda100d83a763b2b90d 100644 --- a/web/content/docs/devguide/advanced/using-ccache.md +++ b/web/content/docs/devguide/advanced/using-ccache.md @@ -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. +To disable caching with ccache: + +```bash +cmake . -DOGS_DISABLE_CCACHE=ON +``` + ### 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/). diff --git a/web/content/docs/devguide/testing/workflow-testing.md b/web/content/docs/devguide/testing/workflow-testing.md new file mode 100644 index 0000000000000000000000000000000000000000..6f181f4c22b537d81ed78759a75cf557b5139538 --- /dev/null +++ b/web/content/docs/devguide/testing/workflow-testing.md @@ -0,0 +1,53 @@ ++++ +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)