From 7cedf394224084bf08a2e504bdb5304c4e733191 Mon Sep 17 00:00:00 2001 From: paugier Date: Mon, 15 Jul 2024 12:31:47 +0200 Subject: [PATCH] doc/examples/clusters/gricad --- doc/examples/clusters/gricad/README.md | 57 +++++++++++++++++++++++ doc/examples/clusters/gricad/manifest.scm | 19 ++++++++ 2 files changed, 76 insertions(+) create mode 100644 doc/examples/clusters/gricad/README.md create mode 100644 doc/examples/clusters/gricad/manifest.scm diff --git a/doc/examples/clusters/gricad/README.md b/doc/examples/clusters/gricad/README.md new file mode 100644 index 00000000..e90eabc9 --- /dev/null +++ b/doc/examples/clusters/gricad/README.md @@ -0,0 +1,57 @@ +# Using Fluidsim on Gricad clusters + +We show how to use Fluidsim on Gricad clusters. The main documentation for this +HPC platform is [here]( https://gricad-doc.univ-grenoble-alpes.fr/hpc/). We +will use [Guix](https://gricad-doc.univ-grenoble-alpes.fr/hpc/softenv/guix/), +which is one of the recommended package managers for this platform. + +## Setup Guix + +The first thing to do, is to create the following file +`~/.config/guix/channels.scm`: + +```lisp +(cons* (channel + (name 'gricad-guix-packages) + (url "https://gricad-gitlab.univ-grenoble-alpes.fr/bouttiep/gricad_guix_packages.git") + (branch "WIP_Benjamin")) + %default-channels) +``` + +Once this is done, you can load and update the Guix environment: + +```sh +source /applis/site/guix-start.sh +guix pull # This will take a while +``` + +> You only need to update the guix environment (and thus run `guix pull`) when +a package you want to use has been created or updated. + +After `guix pull`, you should run the following command to be sure you use the +lastest `guix` command: + +```sh +GUIX_PROFILE="$HOME/.config/guix/current" +. "$GUIX_PROFILE/etc/profile" +``` + +## Install Fluidsim from source + +```sh +# This will take a while +# note: pip does not work with the -C (container) option +guix shell -m ~/dev/fluidsim/doc/examples/clusters/gricad/manifest.scm + +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 +``` + +## Test Fluidsim in sequential + +```sh +python -m pytest --pyargs fluidsim +``` diff --git a/doc/examples/clusters/gricad/manifest.scm b/doc/examples/clusters/gricad/manifest.scm new file mode 100644 index 00000000..9796ac9a --- /dev/null +++ b/doc/examples/clusters/gricad/manifest.scm @@ -0,0 +1,19 @@ +(specifications->manifest + (list "python-fluidfft" + "coreutils" + "python" + "openmpi" + "python-fluidfft-builder" + "python-fluidfft-fftw" + "python-fluidfft-fftwmpi" + "python-fluidfft-mpi-with-fftw" + "python-fluidfft-p3dfft" + "python-fluidfft-pfft" + "python-pytest" + ; build dependencies for editable build + "meson-python" + "python-pythran" + ; convenient to be able to check + "which" + ) +)