Document produced by the iTeam & Center for Wave Phenomena Department of Geophysics, Colorado School of Mines Last updated: 7 January 2025 Installation instructions designed for Apple Silicon processors. ----------------------------------------------------------------------- -- install "Command line tools" -- ----------------------------------------------------------------------- download & install XCode xcode-select --install ----------------------------------------------------------------------- -- install GlobalProtect from Mines -- -- for students at CSM only -- ----------------------------------------------------------------------- ## download from https://helpcenter.mines.edu/TDClient/1946/Portal/KB/ArticleDet?ID=133494 ----------------------------------------------------------------------- -- edit ~/.ssh/config and add -- -- if using virtual machine or HPC -- ----------------------------------------------------------------------- Host * Protocol 2 ForwardX11 yes ForwardX11Trusted yes XauthLocation /opt/X11/bin/xauth ForwardAgent yes ForwardX11Timeout 596h Compression yes ----------------------------------------------------------------------- -- make directories -- ----------------------------------------------------------------------- cd ~ mkdir SCRATCH mkdir WORK cd ~/WORK mkdir rsffigs ----------------------------------------------------------------------- -- install Matlab -- -- (not required) -- ----------------------------------------------------------------------- ## if installed in /Applications/MATLAB_R2023b.app/bin ln -s maci64 maca64 ## if installed in /Applications/MATLAB_R2023b.app/Contents/MacOS ln -s ../../bin/maci64/MATLAB MATLAB_maca64 ----------------------------------------------------------------------- -- install X11 -- ----------------------------------------------------------------------- ## download from http://xquartz.macosforge.orgx ## in Preferences/Security - select "Allow connections from network clients" ----------------------------------------------------------------------- -- Install Anaconda -- ----------------------------------------------------------------------- ## download from http://anaconda.com/download/#macos export PATH=$WORK/anaconda3/bin:$PATH ## install jupyter extensions conda install nodejs conda install numpy conda install numba conda config --add channels conda-forge conda install jupyter_contrib_nbextensions ----------------------------------------------------------------------- -- install MacTeX -- ----------------------------------------------------------------------- ## download from http://www.tug.org/mactex/mactex-download.html ----------------------------------------------------------------------- -- install Tex Live Utility -- ----------------------------------------------------------------------- ## download from https://github.com/amaxwell/tlutility/releases ----------------------------------------------------------------------- -- download repositories -- ----------------------------------------------------------------------- cd ~/WORK git clone https://github.com/ahay/src rsf git clone https://github.com/SEGTeX/texmf texmf cd ~ ln -s $WORK/rsf . ln -s $WORK/texmf . ln -s $WORK/iTeam . cd ~ sudo texhash cd ~ cd Library Ln -s ../texmf ----------------------------------------------------------------------- -- install Homebrew -- ----------------------------------------------------------------------- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ----------------------------------------------------------------------- -- install clang -- ----------------------------------------------------------------------- brew install llvm libomp (brew reinstall llvm libomp) export LLVMDIR=/opt/homebrew/opt/llvm export LIBOMPDIR=/opt/homebrew/opt/libomp brew install subversion brew install fig2dev gifsicle brew install ffmpeg ----------------------------------------------------------------------- -- add to .zshrc -- ----------------------------------------------------------------------- export PATH=/opt/homebrew/bin:$PATH export PATH=${LLVMDIR}/bin:$PATH export LDFLAGS="-L${LLVMDIR}/lib" LDFLAGS+=" -L/opt/homebrew/opt/libomp/lib" export CPPFLAGS="-I${LLVMDIR}/include" CPPFLAGS+=" -I/opt/homebrew/opt/libomp/include" export LDFLAGS="-L${LLVMDIR}/lib/c++ -Wl,-rpath,${LLVMDIR}/lib/c++":$LDFLAGS ----------------------------------------------------------------------- -- install macports -- ----------------------------------------------------------------------- ## download from http://www.macports.org ## then navigate to the directory before continuing sudo port selfupdate sudo port install xfig ----------------------------------------------------------------------- -- configure and install PCRE -- ----------------------------------------------------------------------- ## download from http://www.pcre.org ## then navigate to the directory before continuing ./configure CC=`which clang` make; sudo make install ----------------------------------------------------------------------- -- install FFTW -- ----------------------------------------------------------------------- ## download from www.fftw.org/download.html ## then navigate to the directory before continuing export FFTDIR=/opt/fftw/fftw-3.3.10 ./configure --enable-float \ --enable-openmp --enable-threads \ --enable-shared \ CC=`which clang` \ -prefix=${FFTDIR} make; sudo make install ----------------------------------------------------------------------- -- add environment variables to .zshrc -- ----------------------------------------------------------------------- export WORK=~/WORK export RSF=$WORK/rsf export RSFSRC=$RSF export RSFROOT=$RSF export RSFFIGS=$WORK/rsffigs export DATAPATH=~/SCRATCH/ export TMPDATAPATH=/tmp/ export VPLOTFONTDIR=$RSFROOT/include/ export PSTEXPENOPTS='color=y force=n fat=1 fatmult=1.5 rgb=no serifs=no' export RSFMEMSIZE=4000 export GIFBORDER=0 export GIFDELAY=10 export PPI=150 export LD_LIBRARY_PATH=$RSFROOT/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${FFTDIR}/lib export SVN_EDITOR=vi export OMP_NUM_THREADS=8 # ---------- PATH ---------- export iTeam=$HOME/iTeam/ export COLIB=~iTeam/colib export PATH=$RSFROOT/bin:$PATH export PATH=$WORK/anaconda3/bin:$PATH export PATH=$PATH:/usr/local/bin export PATH=$PATH:/opt/local/bin # ---------- PYTHON ----------- if [ -n "$PYTHONPATH" ]; then export PYTHONPATH=$RSFROOT/lib/python3.11/site-packages:${PYTHONPATH} else export PYTHONPATH=$RSFROOT/lib/python3.11/site-packages fi export PYTHONPATH=$RSFROOT/lib:$RSF/book/Recipes:$RSFSRC/user/cwp:${PYTHONPATH} export PYTHONPATH=$COLIB/NOP:$COLIB/LOP:${PYTHONPATH} ----------------------------------------------------------------------- -- configure and install M8R -- -- (this should take a while!) -- -- experiencing issues when installing packages from -- -- user chenyk? navigate to their folder, open their build -- -- SConstruct and remove the programs for aps3d and aps3d -- ----------------------------------------------------------------------- source ~/.zshrc cd $RSF ./configure API=c++ SFPEN='xtpen' \ CC=`which clang` CFLAGS="-O3 -fopenmp" \ CXX=`which clang++` CXXFLAGS="-O3 -fopenmp" \ LIBPATH=${FFTDIR}/lib,${LLVMDIR}/lib,${LIBOMPDIR}/lib \ CPPPATH=${FFTDIR}/include,${LLVMDIR}/include,${LIBOMPDIR}/include \ LINKFLAGS="-L/opt/homebrew/opt/libomp/lib -lomp" scons install