To build dolfin and mshr on Fedora 32 with as many optional dependencies as possible.
- HDF5 (with MPI support)
- MPI
- ParMETIS
- PETSc
- SCOTCH and PT-SCOTCH
- SLEPc
- Suitesparse
TrilinosWe will not include Trilinos- petsc4py
- slepc4py
The main challenge is to install PETSc from source. We cannot use the PETSc available from Fedora 32 repository because, SLEPc is not available in Fedora repositories and building SLEPc against the PETSc from the repositories requires a lot of patchwork. It is much easier to build SLEPc against a manually installed PETSc. PETSc installer can also install a bunch of other libraries for us -- HYPRE, METIS, MUMPS, PARMETIS, PTSCOTCH, SCALAPACK and SUITESPARSE. We will make an optimized build without debugging symbols.
There are two script files provided:
build_from_git.sh: We will clone thegitrepositories and checkout the latest released tags forPETScandSLEPc. Then we will use./configure,makeandmake checkto build and installPETScandSLEPc. We will usepip3to installpetsc4pyandslepc4pyagainst the built versions ofPETScandSLEPc.build_from_pip.sh:PETScandSLEPcare also available through PyPi. In fact, the build system for these packages are written in Python. So we will usepip3to install bothPETScandSLEPc. Rest of the steps are same as in the other script. Whenpipinstallspetscit takes a long time (~30 minutes on my laptop) without significant progress markers. So please be patient.
I recommend using a fedora-toolbox container where we can freely mess up our root filesystem without risking our operating system.
sudo dnf install toolbox
toolbox create -c dolfin # Use whatever name you like instead of dolfin
toolbox enter -c dolfin
git clone https://github.com/amit112amit/fedora-fenics.git
cd fedora-fenics
chmod +x *.sh
sudo ./build_with_git.sh # Or ./build_with_pip.sh
# Finally change the ownerhship of the files in dolfin and mshr folder
sudo chown -R "$UID:${GROUPS[0]}" dolfin mshrTo use dolfin we will have to exit by exit and then re-enter the container by toolbox enter -c dolfin.