For a possible small consulting project, I’ve built Repast HPC on Mountain Lion and I’m making notes available here, since the build was not simple.
First, I needed the hdf5 library. I used hdf5-1.8.11 from the .tar.gz. This has to be built using ./configure –prefix=/usr/local/ (or somewhere else if you are doing something different to manage user-built programs). I was then able to run sudo make, sudo make check, sudo make install, and sudo make check-install and that all seemed to work fine (although the tests take quite a while, even on my 8-core Mac Pro).
Next, I needed to install netcdf. I went down a versioning rabbit hole for a number of hours with 4.3.0… I was not able to get it to work! Use 4.2.1.1 and do ./configure –prefix=/usr/local, make, make check, and sudo make install.
Next, netcdf-cxx, the C++ version. I used netcdf-cxx-4.2 — not netcdf-cxx4-4.2 — with ./configure –prefix=/usr/local/, etc.
Similarly, boost 1.54 had all kinds of problems. I had to use boost 1.48. ./bootstrap.sh –prefix=/usr/local, etc. The build process is extremely time consuming, and I had to manually install both the boost headers and the compiled libraries.
Next, openmp1 1.6.0 — NOT 1.6.5. Starting with ./configure –prefix=/usr/local/ seemed to go OK, although it seems to run recursively on sub-projects, so it takes a long time, and creates hundreds of makefiles. Wow. Then sudo make install… so much stuff. My 8 cores are not really that much help, and don’t seem to be busy enough. Maybe an SSD would help keep them stuffed. Where’s my 2013 Mac Pro “space heater” edition, with a terabyte SSD? (Maybe when I get some income again…)
Finally, I ran ./configure –prefix=/usr/local/ in repasthps-1.0.1, and make succeeded — after about 4 hours of messing around with broken builds. I had a lot of trouble with build issues for individual components, and final problems with Repast HPC itself, despite everything else building successfully, before I finally found this e-mail message chain that had some details about the API changes between different versions, and laid out a workable set of libraries. They suggest that these versions work:
drwxr-xr-x@ 27 markehlen staff 918 Aug 21 19:14 boost_1_48_0
drwxr-xr-x@ 54 markehlen staff 1836 Aug 21 19:19 netcdf-4.2.1.1
drwxr-xr-x@ 26 markehlen staff 884 Aug 21 19:20 netcdf-cxx-4.2
drwxr-xr-x@ 30 markehlen staff 1020 Aug 21 19:04 openmpi-1.6
drwxr-xr-x@ 31 markehlen staff 1054 Aug 21 19:28 repasthpc-1.0.1
That combination did seem to work for me. I was able to run the samples (after changing some directory permissions) with:
mpirun -np 4 ./zombie_model config.props model.props
mpirun -np 6 ./rumor_model config.props model.props
Additional notes on building Boost 1.54: doing a full build yielded some failures, with those megabyte-long C++ template error messages. I had to build individual libraries. The build process doesn’t seem to honor the prefix and won’t install libraries anywhere but a stage directory in the source tree. I had to manually copy files from stage/lib into /user/local/lib and manually copy the boost headers. There is an issue with building mpi, too:
./bootstrap.sh --prefix=/usr/local/ --with-libraries=mpi --show-libraries
sudo ./b2
only works properly if I first put a user-config.jam file in my home directory containing “using mpi ;” Then I have to manually copy the boost mpi library.
Additional Notes on building netcdf-cxx4-4.2: I had to use sudo make and sudo make install since it seems to write build products into /usr/local/ even before doing make install (!)