diff --git a/doc/examples/clusters/gricad/README.md b/doc/examples/clusters/gricad/README.md index e90eabc9..35bc2d9f 100644 --- a/doc/examples/clusters/gricad/README.md +++ b/doc/examples/clusters/gricad/README.md @@ -47,11 +47,22 @@ python3 -m venv ~/venv-fluidsim-guix --system-site-packages . ~/venv-fluidsim-guix/bin/activate cd ~/dev/fluidsim pip install -e lib -pip install -e ".[test]" -v --config-settings=setup-args=-Dnative=true +pip install -e ".[test]" -v --config-settings=setup-args=-Dnative=true --no-build-isolation ``` ## Test Fluidsim in sequential ```sh -python -m pytest --pyargs fluidsim +source /applis/site/guix-start.sh +guix shell -m ~/dev/fluidsim/doc/examples/clusters/gricad/manifest.scm +. ~/venv-fluidsim-guix/bin/activate +cd ~/dev/fluidsim +python -m pytest fluidsim +``` + +## Submit a fluidfft benchmark + +```sh +cd ~/dev/fluidsim/doc/examples/clusters/gricad/ +oarsub -S ./job_fluidfft_bench.oar ``` diff --git a/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh b/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh new file mode 100755 index 00000000..49391aaf --- /dev/null +++ b/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh @@ -0,0 +1,7 @@ + +source $HOME/venv-fluidsim-guix/bin/activate + +mpirun -np `cat machinefile | wc -l` \ + --machinefile machinefile \ + --prefix $1 \ + fluidfft-bench 256 -d 3 diff --git a/doc/examples/clusters/gricad/job_fluidfft_bench.oar b/doc/examples/clusters/gricad/job_fluidfft_bench.oar new file mode 100755 index 00000000..843a2d35 --- /dev/null +++ b/doc/examples/clusters/gricad/job_fluidfft_bench.oar @@ -0,0 +1,23 @@ +#!/bin/bash +#OAR -n bench_fluidfft +#OAR --stdout fluidfft.out +#OAR --stderr fluidfft.err +#OAR -t devel +#OAR -l /nodes=1/core=2,walltime=00:30:00 +#OAR --project pr-strat-turb + +# load guix session +source /applis/site/guix-start.sh + +export OMPI_MCA_plm_rsh_agent=/usr/bin/oarsh +export OMPI_MCA_btl_openib_allow_ib=true +export OMPI_MCA_pml=cm +export OMPI_MCA_mtl=psm2 + +ENV="`guix shell -m manifest.scm -- /bin/sh -c 'echo $GUIX_ENVIRONMENT'`" + +cat $OAR_FILE_NODES > ./machinefile + +exec ~/.config/guix/current/bin/guix shell -E ^OMPI -E ^OAR -E ^OMP \ + -m manifest.scm \ + -- ./instructions_fluidfft_bench.sh $ENV