Skip to content

Commit

Permalink
examples/clusters/gricad/job_fluidfft_bench.oar
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jul 15, 2024
1 parent e4c0b76 commit 679d9bf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc/examples/clusters/gricad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions doc/examples/clusters/gricad/instructions_fluidfft_bench.sh
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions doc/examples/clusters/gricad/job_fluidfft_bench.oar
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 679d9bf

Please sign in to comment.