diff --git a/experiments/README.md b/experiments/README.md index db54154..e811a5d 100644 --- a/experiments/README.md +++ b/experiments/README.md @@ -9,4 +9,18 @@ pip install -r requirements.txt jupyter-lab ``` -The `shell.nix` contains a workaround for NixOS and is not necessary for normal use. \ No newline at end of file +The `shell.nix` contains a workaround for NixOS and is not necessary for normal use. + +## Building NAStJA for Experiments + +Build it either with or without CUDA support. +When NAStJA is built with CUDA support it will automatically switch to the GPU implementation of the dynamic ECM. +I use the `mold` linker because it makes the code-build-test-loop slightly shorter. +This shouldn't have any impact on the performance of the produced binary. +If you would like to shorten the linking time even further you can add `-DNASTJA_ENABLE_IPO=OFF` to turn of Link Time Optimization (LTO). +However, it is likely that will have an impact on performance. + +``` +cmake .. -DCMAKE_CXX_FLAGS="-fuse-ld=mold" +cmake .. -DCMAKE_CXX_FLAGS="-fuse-ld=mold" -DNASTJA_ENABLE_CUDA=ON +``` diff --git a/experiments/batch/build-cuda b/experiments/batch/build-cuda new file mode 100644 index 0000000..a178f3a --- /dev/null +++ b/experiments/batch/build-cuda @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +#SBATCH --job-name=build-cuda +# Forschergruppe Schug +#SBATCH --account=hkf6 +#SBATCH --partition=develbooster +#SBATCH --nodes=1 +#SBATCH --ntasks-per-node=1 +#SBATCH --cpus-per-task=48 +#SBATCH --time=01:00:00 +#SBATCH --output=build-cuda-%j.out +#SBATCH --error=build-cuda-%j.err + +SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude + +source "${SOURCE_DIR}/activate-nastja-modules" +cd "${SOURCE_DIR}/nastja/build-cuda" + +srun make -j48 diff --git a/experiments/batch/build-nocuda b/experiments/batch/build-nocuda new file mode 100644 index 0000000..67ed26b --- /dev/null +++ b/experiments/batch/build-nocuda @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +#SBATCH --job-name=build-nocuda +# Forschergruppe Schug +#SBATCH --account=hkf6 +#SBATCH --partition=develbooster +#SBATCH --nodes=1 +#SBATCH --ntasks-per-node=1 +#SBATCH --cpus-per-task=48 +#SBATCH --time=01:00:00 +#SBATCH --output=build-nocuda-%j.out +#SBATCH --error=build-nocuda-%j.err + +SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude + +source "${SOURCE_DIR}/activate-nastja-modules" +cd "${SOURCE_DIR}/nastja/build-nocuda" + +srun make -j48 diff --git a/experiments/batch/nocuda b/experiments/batch/nocuda new file mode 100644 index 0000000..882a0ed --- /dev/null +++ b/experiments/batch/nocuda @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +#SBATCH --job-name=nocuda +# Forschergruppe Schug +#SBATCH --account=hkf6 +# 48 Cores, 512GiB RAM, 4x NVIDIA A100 GPUs +#SBATCH --partition=booster +# Right now we're using a single node +#SBATCH --nodes=1 +# Number of MPI processes +# TODO: Change the config and set to this the maximum of 48 +#SBATCH --ntasks-per-node=16 +#SBATCH --cpus-per-task=1 +#SBATCH --time=01:00:00 +#SBATCH --output=nocuda-%j.out +#SBATCH --error=nocuda-%j.err + +SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude +OUTPUT_DIR=/p/scratch/cellsinsilico/paul/nastja-out/nocuda + +mkdir -p "${OUTPUT_DIR}" +source "${SOURCE_DIR}/activate-nastja-modules" + +srun "${SOURCE_DIR}/nastja/build-nocuda/nastja" \ + -c "${SOURCE_DIR}/ma/experiments/configs/genesis.json" \ + -o "${OUTPUT_DIR}"