Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installation_guide [2022/04/19 15:23] – [Prerequisites] mayinstallation_guide [2022/11/29 15:37] (current) – tarball source distribution may
Line 1: Line 1:
 ====== Installation guide ====== ====== Installation guide ======
  
-Molpro is distributed to licensees on a self-service basis using the world-wide web. Those entitled to the code should obtain it from https://www.molpro.net/download supplying the username and password given to them. The web pages contain links to the binaries and details of how to access the source code via git, although not everyone is entitled to source code, and binaries are not available for every platform.+Molpro is distributed to licensees on a self-service basis using the world-wide web. Those entitled to the code should obtain it from https://www.molpro.net/download supplying the username and password given to them. The web pages contain links to the binaries and source code, although not everyone is entitled to source code, and binaries are not available for every platform.
  
 Execution of Molpro, whether a supplied binary or built from source, requires a valid licence key. Note that the key consists of two components, namely a list of comma-separated key=value pairs, and a password string, and these are separated by ‘&’. Execution of Molpro, whether a supplied binary or built from source, requires a valid licence key. Note that the key consists of two components, namely a list of comma-separated key=value pairs, and a password string, and these are separated by ‘&’.
Line 98: Line 98:
   - A large scratch file system containing a directory that users may write on.   - A large scratch file system containing a directory that users may write on.
   - An MPI wrapped C++ compiler, eg. ''mpicxx''. On HPC systems there is normally a vendor supplied library, otherwise one can install easily Open MPI which is known to work well with Molpro. We also recommend building Molpro with the Global Arrays toolkit. See [[GA installation]] for more details.   - An MPI wrapped C++ compiler, eg. ''mpicxx''. On HPC systems there is normally a vendor supplied library, otherwise one can install easily Open MPI which is known to work well with Molpro. We also recommend building Molpro with the Global Arrays toolkit. See [[GA installation]] for more details.
-  - The source code of Molpro, which should be cloned via ''git'' as per the instructions in the download section of the website.+  - The source code of Molpro.
  
 +There are example Dockerfiles for {{:Dockerfile.fc36.txt|fedora}}, {{:Dockerfile.lp154.txt|suse}} and {{:Dockerfile.ubuntu22.04.txt|ubuntu}}. For Mac with Apple Silicon one could use:
 +<code>
 +# 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
 +</code>
 +and for Mac with Intel:
 +<code>
 +# build Molpro on MacOS, Intel 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
 +# prerequisite 3: Intel MKL from https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html?operatingsystem=mac&distributions=webdownload&options=online
 +
 +brew install eigen gcc libxml2 python3 openmpi cmake coreutils
 +git clone https://github.com/GlobalArrays/ga ga_mpipr && cd ga_mpipr && git checkout v5.8.1 && ./autogen.sh && ./configure --with-blas=no --with-lapack=no --with-scalapack=no --disable-f77 --with-mpi-pr && make -j10 && sudo make install && cd .. && rm -rf ga_mpipr
 +git clone git@github.com:molpro/molpro
 +export OMPI_CXX=g++-12 OMPI_CC=gcc-12
 +cd molpro
 +./configure && make -j10 && sudo make install && sudo ln -s /usr/local/molpro/molpro_*/bin/molpro /usr/local/bin/molpro
 +</code>
 +
 +Molpro can also be built using compilers and libraries from 
 +[[https://conda-forge.org|conda-forge]]. Here is how to construct a conda
 +environment with Molpro:
 +<code>
 +# build Molpro using conda toolchain
 +build_environment=molpro-build
 +deploy_environment=molpro-build # change this to an existing environment in which you want molpro, if you like
 +
 +conda create -y -n ${build_environment} cxx-compiler c-compiler fortran-compiler libxml2 mpich mkl-devel eigen cmake git curl wget make
 +conda activate ${deploy_environment} && deploy_prefix=${CONDA_PREFIX} || exit 1
 +conda activate ${build_environment}
 +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 --prefix=${CONDA_PREFIX} --with-blas=no --with-lapack=no --with-scalapack=no --disable-f77 --with-mpi-pr && make -j10 && make install && cd .. && rm -rf ga-5.8.1
 +git clone git@github.com:molpro/molpro
 +cd molpro
 +./configure --prefix=${deploy_prefix} CXX=mpicxx && make -j20 && version=$(grep PACKAGE_VERSION build/molpro_config.h|sed -e 's/^.*PACKAGE_VERSION *"//' -e 's/" *$//') && make install && ln -sf ${CONDA_PREFIX}/molpro_${version}/bin/molpro ${CONDA_PREFIX}/bin/molpro
 +</code>
 ==== Configuration ==== ==== Configuration ====
  
-After cloning the source code, change to the ''Molpro_release'' directory that has been created. Having changed to the ''Molpro_release'' directory, you should ensure that you have checked out a tagged version of Molpro. You can do this by running ''%%git log%%'' to see if the top commit has ''%%tag:<TAGNAME>%%'' in parenthesis, if not find the first tagged commit and check it out.+After untarring the source code, change to the directory that has been created.
  
 Next check that the tools you require, such as the Fortran compiler, are in your PATH. Then run the command Next check that the tools you require, such as the Fortran compiler, are in your PATH. Then run the command