Skip to content

Instantly share code, notes, and snippets.

@pjknowles
Last active October 26, 2022 05:45
Show Gist options
  • Save pjknowles/fb3850aa6d51edaff75e408534024132 to your computer and use it in GitHub Desktop.
Save pjknowles/fb3850aa6d51edaff75e408534024132 to your computer and use it in GitHub Desktop.
Install molpro on MacOS ARM
# build Molpro on MacOS, ARM architecture
# MacOS 12.6 Monterey
# prerequisite 1: command line developer tools, start with xcode-select --install
# Note: Xcode 14.0 is incompatible with gcc, and cannot be used. See https://stackoverflow.com/questions/73714336/xcode-update-to-version-2395-ld-compile-problem-occurs-computedatomcount-m/73765819#73765819
# prerequisite 2: install homebrew, starting from https://brew.sh
brew unlink open-mpi
brew install doxygen eigen gcc lapack libxml2 python3 mpich cmake coreutils wget
brew link mpich
export CC=gcc-12 CXX=g++-12
export MPICXX=mpicxx MPICC=mpicc MPICH_CC=${CC} MPICH_CXX=${CXX}
wget -O - https://github.com/GlobalArrays/ga/releases/download/v5.8.1/ga-5.8.1.tar.gz | tar xzf - && cd ga-5.8.1 && ./configure --with-blas=no --with-lapack=no --with-scalapack=no --disable-f77 --with-mpi-pr && make -j10 && sudo make install && cd .. && rm -rf ga-5.8.1
git clone git@github.com:molpro/molpro
cd molpro
./configure && make -j20 && version=$(grep PACKAGE_VERSION build/molpro_config.h|sed -e 's/^.*PACKAGE_VERSION *"//' -e 's/" *$//') && sudo make install && sudo ln -sf /usr/local/molpro/molpro_${version}/bin/molpro /usr/local/bin/molpro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment