Building on Mac High Sierra
Introduction
This details the building of GridPACK on a Macbook Pro running Mac OS X High Sierra (10.13.6). The build was aided by the use of MacPorts to install some prerequisite software. Super user permissions are required to install and manage MacPorts.
These instructions use a specific combination of compilers, MPI implementation, and MacPorts packages. Other combinations can be used, the one here happened to work for the author. If you choose some other combination, you're on your own.
The author uses the C-shell. These instructions will need to be slightly modified to adapt to another shell, like =bash=.
MacPorts
The easiest way to get GridPACK going on Mac OS X is to use [[1][MacPorts]] to install (some of) the needed prerequisite software. [[2][MacPorts]] is free, open source system whereby various software packages can be installed and maintained on a Mac OS X system. [[3][Homebrew]] provides a similar capability, but the authors have no experience with it.
The [[4][MacPorts]] project provides very good [[5][installation instructions]]. They will not be repeated here. It is assumed here that MacPorts was installed in /opt/local, which is the default.
After MacPorts installation, /opt/local/bin needs to be in shell search path. The easiest way to do this is to add /opt/local/bin to the top of /etc/paths (superuser privileges required). Afterward, a reboot or starting a new shell should make the port command available on the command line.
Packages from MacPorts
Install the CLang 6.0 compiler set, mpich MPI implementation, and Boost with Boost.MPI using the following:
sudo port install boost +clang60+mpich
Make the installed compilers and MPI wrappers the default.
sudo port select --set clang mp-clang-6.0 sudo port select --set mpi mpich-clang60-fortran
That way the compiler commands, clang and clang++, and MPI compiler wrappers, like mpicc, will be available at the command line.
Install CMake and the GNU linear programming kit:
sudo port install cmake sudo port install glpk
Build Packages from Source
PETSc and Global Arrays need to be built from source. You need to choose a path in which packages will be installed.