While CME software has been successfully installed on a growing number of Apple systems, the installation process has not been streamlined or finalized. The current documentation may therefore not be complete or apply to all systems. Comments, questions, or suggestions for improvements are well appreciated by Gernot Plank and Karli Gillette.
First, installs of both homebrew and Xcode with command line tools is required.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
xcode-select --install
Now using homebrew install gcc and wget:
brew install gcc
brew install wget
brew install libpng
Warning
Doing a source installation of CARP requires additional permissions. Please contact Karli Gillette before proceeding.
Decide where you are going to do the install of CARP and PETSc that requires multiple directories and packages. For example: $HOME/install
Set your PETSc environmental variables in your ~/.bashrc. (If necessary, create the .bashrc file):
export PETSC_DIR=$HOME/install/petsc
export PETSC_ARCH=osx-clang-debug2
Update your shell variables by typing source ~/.bashrc. Now download PETSc:
cd $HOME/install
git clone -b maint https://bitbucket.org/petsc/petsc petsc
cd petsc
Insert osx-clang-debug.py
into the config directory of PETSc and run the configure scripts:
cp $HOME/Downloads/osx-clang-debug.py config
python config/osx-clang-debug.py
make PETSC_DIR=$PETSC_DIR PETSC_ARCH=$PETSC_ARCH all
make PETSC_DIR=$PETSC_DIR PETSC_ARCH=$PETSC_ARCH test
Continue with downloading the developer sources for CARP:
cd $HOME/install
svn co —username=`username` https://carpentry.medunigraz.at/carp-dcse-pt/branches/mechanics carp-dcse-pt
cd carp-dcse-pt
Patch some files:
switches.def
to $HOME/install/carp-dcse-pt osx_carp_patch
to $HOME/install/carp-dcse-pt/CARP. Now build CARP:
make # you will get an error about switches, don’t fret!
make svn_co # updates/checks out related repositories
make gengetopt
make param
make redblack
Add the provided paths (gengetopt and param) to your PATH environment variable (~/.bashrc):
export PATH=$PATH:$HOME/install/carp-dcse-pt/gengetopt-2.22.6/src:$HOME/install/carp-dcse-pt/PrM/src
Update your terminal enviroment (source ~/.bashrc) and finish making CARP:
bash # to update the shell
make all
If you get an error for python2:
You will also need to install meshalyzer (which depends on fltk) if you want to properly view the tutorial outputs.
# installation of FLTK
cd $HOME/install
wget http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
tar -xzvf fltk-1.3.4-1-source.tar.gz
cd fltk-1.3.4-1
./configure --enable-xft --enable-shared
make
sudo make install
# installation of Meshalyzer
cd $HOME/install
git clone https://github.com/cardiosolv/meshalyzer.git
cd meshalyzer
make
The documentation for carputils installation is located here.
cd $HOME/install
git clone https://username@bitbucket.org:/carpusers/carputils.git
mkdir carp-examples
cd carp-examples
git clone https://username@bitbucket.org:carpusers/tutorials.git
Update your bashrc:
export PYTHONPATH=$PYTHONPATH:$HOME/install/carputils:$HOME/install/carp-examples
export TUTORIALS = $HOME/install/carp-examples/tutorials
Generate a settings files for carputils:
cd $HOME/install/carputils/bin
./cusettings $HOME/.config/carputils/settings.yaml
Go in and edit your settings.yaml file with the proper directories for CARP-CPU and MESHALYZER
CPU: $HOME/install/carpentry/bin
MESHALYZER_DIR: $HOME/install/meshalyzer