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 thegit
repositories and checkout the latest released tags forPETSc
andSLEPc
. Then we will use./configure
,make
andmake check
to build and installPETSc
andSLEPc
. We will usepip3
to installpetsc4py
andslepc4py
against the built versions ofPETSc
andSLEPc
.build_from_pip.sh
:PETSc
andSLEPc
are also available through PyPi. In fact, the build system for these packages are written in Python. So we will usepip3
to install bothPETSc
andSLEPc
. Rest of the steps are same as in the other script. Whenpip
installspetsc
it 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 mshr
To use dolfin we will have to exit by exit
and then re-enter the container by toolbox enter -c dolfin
.