Skip to content

Commit

Permalink
Cleanup doc/examples/clusters/gricad/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Aug 27, 2024
1 parent 9b57285 commit ec6a797
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions doc/examples/clusters/gricad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,20 @@ GUIX_PROFILE="$HOME/.config/guix/current"

Clone the Fluidsim repository in `$HOME/dev`.

```sh
source /applis/site/guix-start.sh
DIR_MANIFEST=$HOME/dev/fluidsim/doc/examples/clusters/gricad
# This will take a while
guix shell --pure -m $DIR_MANIFEST/manifest.scm -f $DIR_MANIFEST/python-fluidsim.scm
```

### Change the changeset used for the Guix environment

One can choose another changeset reference. One can study them with:
One needs to choose a changeset reference (a hash). One can study them with:

```sh
cd ~/dev/fluidsim
hg log -G
```

Get the hash with

```sh
# Actually it does not work (no support for Mercurial)
# How should we obtain the sha256 base32 hash?
# guix download -r --commit=changeset_ref https://foss.heptapod.net/fluiddyn/fluidsim
```
Get the hash with (note: `guix download` does not support Mercurial):

```sh
source /applis/site/guix-start.sh
hg clone https://foss.heptapod.net/fluiddyn/fluidsim
hg clone https://foss.heptapod.net/fluiddyn/fluidsim ~/dev/fluidsim-clean
cd ~/dev/fluidsim-clean
hg up <changeset_ref> --clean
hg purge --all
Expand All @@ -85,6 +72,15 @@ guix hash -x -r .

Change the Mercurial reference and the hash in `python-fluidsim.scm`.

### Build-install from source

```sh
source /applis/site/guix-start.sh
DIR_MANIFEST=$HOME/dev/fluidsim/doc/examples/clusters/gricad
# This will take a while
guix shell --pure -m $DIR_MANIFEST/manifest.scm -f $DIR_MANIFEST/python-fluidsim.scm
```

## Test Fluidsim in sequential

```sh
Expand Down Expand Up @@ -115,25 +111,15 @@ oarsub -S ./job_fluidsim_bench.oar
Prepare a virtual env (1 time).

```sh
# cd ~/dev/fluidsim/doc/examples/clusters/gricad
# /usr/bin/python3 -m venv .venv
# . .venv/bin/activate
# Actually, we need conda because the package python3.11-venv is not installed.
source /applis/environments/conda.sh
conda create -n env-fluiddyn python=3.11
conda activate env-fluiddyn
#
pip install fluiddyn@hg+https://foss.heptapod.net/fluiddyn/fluiddyn
conda create -n env-fluiddyn fluiddyn
```

Submit with

```sh
cd ~/dev/fluidsim/doc/examples/clusters/gricad
# . .venv/bin/activate
# actually, with conda:
source /applis/environments/conda.sh
conda activate env-fluiddyn
#
python3 submit_bench_fluidsim.py
```

0 comments on commit ec6a797

Please sign in to comment.