3. How to install¶
Mandyoc installation is very simple and it consists of installing both PETSc and Mandyoc.
The following installation steps work for both Linux and macOS machines only and no tests were made to install Mandyoc on Windows machines yet.
To build Mandyoc, the following requirements are needed:
PETSc (currently tested on version v3.15.5)
git (recommended, but not strictly needed)
If you do not already have a PETSc installation, you may need a Fortran compiler.
Additionally, the following additional software is needed to run the examples that come with Mandyoc:
With required python packages:
To run the tests, some additional python packages are required:
To build the documentation, further python packages are necessary:
3.2. PETSc Installation¶
Mandyoc requires the PETSc library to run. Check out the PETSc installation for details.
The following steps its a example installation with minimum requirements to run Mandyoc.
The first step is to download PETSc (v3.15.5) release from PETSc website or clone the repository into your machine. Mandyoc might work with latest release of PETSc, but this is not guaranteed since new versions might introduce breaking changes.
Clone the repository to your desired location:
git clone -b v3.15.5 https://gitlab.com/petsc/petsc.git
Second, configure the PETSc build and set up the installation directory.
cd path/to/petsc ./configure \ PETSC_DIR=/path/to/petsc \ PETSC_ARCH=arch-label-optimized \ --with-debugging=0 \ --with-cc=gcc \ --with-cxx=g++ \ --with-fc=gfortran \ --download-fblaslapack \ --download-mpich \ --download-mumps \ --download-scalapack \ --download-parmetis \ --download-metis
This example installation uses the
You may use another Fortran compiler changing the
It is also possible to configure PETSc without Fortran by using
If you want to build a development version of Mandyoc
its recommended to build a debug version of PETSc
In this case, you may set
If you prefer openmpi, you need to swith
Check the installation with:
make all check
Or follow the instructions that pop up on the terminal.
For further information about the PETSc library, check out the PETSc website.
Finally, add a symlink of mpirun to ~/.local/bin:
ln -s /path/to/petsc/arch-label-optimized/bin/mpirun ~/.local/bin/mpirun
Make sure the directory
~/.local/bin exists, otherwise the above
command will fail.
You can create it by running
mkdir -p ~/.local/bin.
3.3. Mandyoc Installation¶
To install the Mandyoc in your machine, you need to clone or download the latest release of the code from the Mandyoc repository. To clone the repository, navigate to the directory you wish to install Mandyoc and type:
git clone https://github.com/ggciag/mandyoc cd mandyoc
Before to install Mandyoc, you mast set an environment variable which indicates the path to PETSc installation folder:
Build Mandyoc by running:
Next, install Mandyoc with:
By default, it will be installed in
Make sure the directory
~/.local/bin exists, otherwise the above command will fail.
You can change the installation location setting
INSTALL_PATH variable by running:
make INSTALL_PATH=/path/to/install/mandyoc install
To print Mandyoc runtime options, run mandyoc with
-flags command line
Check Mandyoc installation with:
You need python and some python packages to run the last commmand succesfully. Check out requirements in Dependencies section.
3.4. Docker Container¶
We provide a Docker container image for Mandyoc. Docker is an implementation of container virtualization. Citing their documentation “it is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings”.
Visit the Dockerhub Mandyoc repository to find out more on how to use the container to run Mandyoc.
To use the Mandyoc docker image, it is required to install the Docker Engine. Find out more on Install Docker Engine page.
The benchmarks and other experiments are located in the examples folder of the Mandyoc repository.
Inside each example folder, you find a Jupyter notebook with detailed explanation and instructions on how to run the experiment.