Install and use MSE
The easiest way to install the MSE environment is with the GNU Guix package manager: https://guix.gnu.org/en/.
Install guix and fetch MSE channels
The following commands installs the guix package manager:
cd /tmp
wget -O guix-install.sh https://guix.gnu.org/install.sh
chmod +x guix-install.sh
sudo ./guix-install.sh
That procedure is described here: https://guix.gnu.org/manual/en/html_node/Binary-Installation.html
Now fetch the MSE Guix channels file:
#get MSE guix channels
wget -O ./channelsMSE.scm https://forge.inrae.fr/msegrp/guix-biosp/-/raw/main/channelsMSE.txt
Verify that the python-mse package is available from these channels:
guix time-machine -C channelsMSE.scm -- package -A python-mse
> Note: The first guix time-machine invocation with this channels file can take some time, as it may need to download substitutes and/or build dependencies.
Create an MSE guix environment :
guix time-machine -C channelsMSE.scm -- shell -C python-mse
> This drops you into an isolated shell with the python-mse package available.
Visualisation using paraview:
To visualize MSE simulations, you may want ParaView. If it is not already included, add it to the environment. The following example also enables basic GUI support inside the containerized shell:
export LIBGL_DRI3_DISABLE=1
guix time-machine -C channelsMSE.scm -- shell -C --share=/tmp --preserve='^DISPLAY$' --preserve='^LIBGL_DRI3_DISABLE$' python-mse paraview
Run a tutorial:
Outside the MSE Guix environment, fetch and run the tutorial script from the MSE repository:
cd /tmp
wget https://forge.inrae.fr/msegrp/mse/-/raw/master/trunk/DEMOS/study10.py
guix time-machine -C channelsMSE.scm -- shell -C python-mse -- python3 study10.py
Or, inside MSE guix environment:
python3 study10.py
Miscellaneous
Build and install of MSE from sources
For developers, it can be useful to build MSE from sources. Again, the simplest is to use guix. The first step is to get sources and launch the environment in the mse/trunk directory:
Get latest source release
Latest source release is downloadable from https://forge.inrae.fr/msegrp/mse .
buid the software environment to compil and develop in MSE:
guix time-machine -C channelsMSE.scm -- shell -C env-to-compil-mse
Within this environment, Mse installation needs 5 compilations steps (4 cmake + 1 setup.py) resume in following commands.
echo "ensure you are in mse/trunk directory, within guix environment env-to-compil-mse ?"
source ./mseTestInstall.sh
echo "run tests"
pytest
doc generation
Documention is built using sphinx. The documention building needs a working install of mse.
cd docs
rm -rf build/*
cd build
cmake ..
make html
make copy-figures
The generated doc is in result is in ./build/html
Use DOLFINX 0.9
MSE is based on DOLFINx 0.9 (https://docs.fenicsproject.org/dolfinx/main/python/), enabling the simulation of PDEs. To ensure a reproducible environment that includes DOLFINx, MSE provides a Guix recipe. This allows users to run DOLFINX with the following command:
guix time-machine -C channelsMSE.scm -- shell -C python-dolfinx@0.9