-
Install MacPorts (
port):- follow the instructions on the MacPorts installation page.
- Check that
/opt/local/binand/opt/local/sbinare defined in PATH (echo $PATHin a new command window).
-
Install
gcc48(or more recent versions) with MacPorts:sudo port search gcc sudo port install gcc48 sudo port select --list gcc sudo port select --set gcc mp-gcc48 -
Install
openmpi-gcc48(or a version compatible with yourgcc) with MacPorts:sudo port search openmp sudo port install openmpi-gcc48 sudo port select --list mpi sudo port select --set mpi openmpi-gcc48-fortran sudo ln -s /opt/local/bin/mpicxx /opt/local/bin/mpic++
-
Install the Boost C++ libraries
- Download version 1.55 of boost on http://www.boost.org (It is better to restart from here if you had an upgrade of your os).
- copy
bconfigure.shandbinstall.shfrom/nextsim/scripts/boost/to your boost directory. - Add the line
using mpi ;at the end of the filetools/build/v2/user-config.jam(This file could also be copied in your home directory for boost from the version 1.56). - type the command
unset BOOST_DIR - check if
bconfigure.shcorresponds to your architecture. - From boost directory, type:
./bconfigure.sh - From boost directory, type:
./binstall.sh(sudo password is required during the process).
-
Install NetCDF
- instal hdf5 via macport:
sudo port install hdf5 - download latest stable C version of netcdf on the NetCDF dowloads page and unzip it.
- copy
configure_c.shfrom/nextsim/scripts/netcdf - From netcdf directory, type:
./configure_c.shthenmakemake checkand finallysudo make install - download latest stable C++ (
cxx) version of netcdf on the NetCDF dowloads page and unzip it. - copy
configure_cxx.shfrom/nextsim/scripts/netcdf - From netcdf-cxx directory, type:
./configure_cxx.shthenmakemake checkand finallysudo make install
- instal hdf5 via macport:
-
Install Gmsh from source
- Download the source code from the Gmsh website.
- In the gmsh directory do
mkdir lib
cd lib
cmake -DDEFAULT=0 -DENABLE_BUILD_LIB=1 ..
make -j 32 lib
sudo make install/fast
- Set the
PATHenvironment variable correctly- Add these lines to your
.bash_profilefor nextSIM in C++:
- Add these lines to your
export NEXTSIMDIR=$HOME/Developer/nextsim/
export GMSH_DIR=/usr/local/
export NETCDF_DIR=/opt/local/netcdf-cxx
export BOOST_DIR=/opt/local/boost
export DYLD_LIBRARY_PATH="/opt/local/boost/lib"
export DYLD_LIBRARY_PATH=NEXTSIMDIR/lib:$DYLD_LIBRARY_PATH
-
Open a new command window
-
Either modify the Makefile to have the right link to openmpi or do the following:
sudo rm -rf /opt/local/include/openmpi-mp
sudo ln -sf /opt/local/include/openmpi-gcc48 /opt/local/include/openmpi-mp
sudo rm -rf /opt/local/lib/openmpi-mp
sudo ln -sf /opt/local/lib/openmpi-gcc48 /opt/local/lib/openmpi-mp
- Type
makein nextsim - For the model application (run nextsim)
- go to
nextsim/model - Type
make
- type
bin/nextsim.execfrom thenextsim/modeldirectory.
cd [path to nextsim source]
docker run --rm -v $(pwd):/data -it hrektts/doxygen doxygen
This automatically uses the file Doxyfile (made originally with the doxygen gui)
in the nextsim directory. Outputs go into a new folder nextsim-doc:
ls nextsim-doc/
html latex man rtf xml
You can then see the results with (eg.) firefox nextsim-doc/html/index.html &
- Ubuntu:
sudo apt-get install doxygen graphviz doxygen-gui - Mac OSX:
- GUI: download .dmg image from docker website and open it to install
- command line:
sudo port install doxygen graphviz
- Ubuntu
- GUI:
doxywizard & - command line:
cp Doxyfile Doxyfile-edited.cfg [edit new file and change entries for INPUT and OUTPUT_DIRECTORY] doxygen Doxyfile-edited.cfg - GUI:
- Mac OSX:
- GUI: open Doxygen.app file
- command line: same as ubuntu
- Note that Doxygen is not fully functional on Mac OSX (graphviz not working correctly) but GUI could still be used to create a config file to run with docker