Last active
November 6, 2022 09:42
-
-
Save pjknowles/363f5f12cc5daeb7db5e67585c6f6856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
mpi='mpich' # or open-mpi, but known problems exist | |
garuntime='mpi-pr' | |
label="${mpi}-${garuntime}" | |
brew unlink open-mpi mpich | |
brew install doxygen eigen gcc lapack libxml2 python3 ${mpi} cmake coreutils | |
brew link ${mpi} | |
export CC=gcc-12 CXX=g++-12 | |
export MPICH_CC=${CC} MPICH_CXX=${CXX} | |
export OMPI_CC=${CC} OMPI_CXX=${CXX} | |
if [! -r ] ga; then | |
git clone https://github.com/GlobalArrays/ga | |
fi | |
(cd ga && git checkout v5.8.1 && ./autogen.sh && ./configure CC=gcc-12 --with-blas=no --with-lapack=no --with-scalapack=no --disable-f77 --with-${garuntime} --prefix=$HOME/.local/ga-${label} && make -j10 && make install ) | |
if [ ! -r Molpro-${label} ]; then | |
git clone [email protected]:molpro/molpro Molpro-${label} | |
else | |
(cd Molpro-${label}; rm -rf build; git checkout build) | |
fi | |
export PATH=$HOME/.local/ga-${label}/bin:$PATH | |
cd Molpro-${label} && ./configure CC=mpicc CXX=mpicxx && 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 | |
# rm -rf Molpro-${label} ga |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment