Installing deal.II on OSX using macports

You need to install latest Xcode and the command line tools. Then install macports.

MPI and PETSC

Install openmpi from macports

sudo port install openmpi

Install tbb from macports

sudo port install tbb

Install hdf5 from macports

sudo port install hdf5-18 +openmpi +fortran

Install metis from macports

sudo port install metis

Install PETSC from macports. You need to modify the port file to include hypre support. Edit the following file

/opt/local/var/macports/sources/rsync.macports.org/release/ports/math/petsc/Portfile 

and add following entry in the configure section

--download-hypre

Then install petsc

sudo port install petsc

If you upgrade petsc later, make sure to make above change to Portfile.

Install SLEPC from macports

sudo port install slepc

Install arpack from macports

sudo port install arpack

Install p4est. I used the script given on deal.II website except that you need to specify the openmpicc and openmpif77 as compilers. Add following lines to the script at two places, once for FAST version and once for DEBUG version.

CC=openmpicc  F77=openmpif77

Then run (put correct p4est version)

sudo ./p4est-setup.sh p4est-x-y-z.tar.gz /opt/p4est

I installed the mac binary of doxygen which you can get from their website. You need this only if you want to build the documentation yourself. I recommend downloading the documentation from the deal.II website.

Install deal.II