diff --git a/doc/examples/clusters/gricad/README.md b/doc/examples/clusters/gricad/README.md index 35bc2d9f..c652ccb3 100644 --- a/doc/examples/clusters/gricad/README.md +++ b/doc/examples/clusters/gricad/README.md @@ -40,24 +40,19 @@ GUIX_PROFILE="$HOME/.config/guix/current" ```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 --no-build-isolation +guix shell \ + -m ~/dev/fluidsim/doc/examples/clusters/gricad/manifest.scm \ + -f ~/dev/fluidsim/doc/examples/clusters/gricad/python-fluidsim.scm ``` ## Test Fluidsim in sequential ```sh 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 +guix shell \ + -m ~/dev/fluidsim/doc/examples/clusters/gricad/manifest.scm \ + -f ~/dev/fluidsim/doc/examples/clusters/gricad/python-fluidsim.scm +python -m pytest --pyargs fluidsim ``` ## Submit a fluidfft benchmark diff --git a/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh b/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh index 49391aaf..567c16f0 100755 --- a/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh +++ b/doc/examples/clusters/gricad/instructions_fluidfft_bench.sh @@ -1,6 +1,4 @@ -source $HOME/venv-fluidsim-guix/bin/activate - mpirun -np `cat machinefile | wc -l` \ --machinefile machinefile \ --prefix $1 \ diff --git a/doc/examples/clusters/gricad/manifest.scm b/doc/examples/clusters/gricad/manifest.scm index 9796ac9a..f90d70e0 100644 --- a/doc/examples/clusters/gricad/manifest.scm +++ b/doc/examples/clusters/gricad/manifest.scm @@ -10,6 +10,9 @@ "python-fluidfft-p3dfft" "python-fluidfft-pfft" "python-pytest" + "python-pytest-allclose" + "python-pytest-mock" + "python-fluidsim" ; build dependencies for editable build "meson-python" "python-pythran" diff --git a/doc/examples/clusters/gricad/python-fluidsim.scm b/doc/examples/clusters/gricad/python-fluidsim.scm new file mode 100644 index 00000000..7f777020 --- /dev/null +++ b/doc/examples/clusters/gricad/python-fluidsim.scm @@ -0,0 +1,104 @@ +(define-module (python-fluidsim) + #:use-module (guix) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system pyproject) + #:use-module (guix build-system python) + #:use-module (guix build utils) + #:use-module (guix hg-download) + #:use-module (guix utils) + #:use-module (common python-packages) + #:use-module (gnu packages) + #:use-module (gnu packages mpi) + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages statistics) + #:use-module (gnu packages bioinformatics) + #:use-module (gnu packages build-tools) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-science) + #:use-module (common python-fluidfft) + #:use-module (common python-fluiddyn) + #:use-module (common python-fluidsim-utils)) + + +;; package python-fluidsim-core +(define-public python-fluidsim-core + (package + (name "python-fluidsim-core") + (version "X.X.X") + (source + (origin + (method hg-fetch) + (uri + (hg-reference + (url "https://foss.heptapod.net/fluiddyn/fluidsim") + (changeset "62c4dbe4f786"))) + (sha256 + (base32 "15sm4mknfagx1l4zgz49c2bfjjng8ykiz7jb45qa83jh03vzqc6a")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-fluiddyn + python-importlib-metadata + )) + (arguments '(#:phases (modify-phases %standard-phases + ; On patche le HOME + (add-before 'build 'patch-HOME-path + (lambda _ + (chdir "lib") + (setenv "HOME" (getenv "out")) + )) + ;; On remove la phase de check et de sanity-check + (delete 'check) + (delete 'sanity-check)))) + (home-page "") + (synopsis "Framework for studying fluid dynamics with simulations.") + (description "Framework for studying fluid dynamics with simulations.") + (license #f))) + +;; package python-fluidsim +(define-public python-fluidsim + (package + (name "python-fluidsim") + (version "X.X.X") + (source + (origin + (method hg-fetch) + (uri + (hg-reference + (url "https://foss.heptapod.net/fluiddyn/fluidsim") + (changeset "62c4dbe4f786"))) + (sha256 + (base32 "15sm4mknfagx1l4zgz49c2bfjjng8ykiz7jb45qa83jh03vzqc6a")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-fluidfft + python-fluidsim-core + python-h5netcdf + python-h5py + python-ipython + python-matplotlib + python-mpi4py + python-pyfftw + python-pymech + python-rich + python-scipy + python-transonic + python-xarray + )) + (arguments '(#:phases (modify-phases %standard-phases + ; On patche le HOME + (add-before 'build 'patch-HOME-path + (lambda _ + (setenv "HOME" (getenv "out")) + )) + ;; On remove la phase de check et de sanity-check + (delete 'check) + (delete 'sanity-check)))) + (home-page "") + (synopsis "Framework for studying fluid dynamics with simulations.") + (description "Framework for studying fluid dynamics with simulations.") + (license #f))) + +python-fluidsim \ No newline at end of file