package:installation:macos
Table of Contents
Installation of CPPAW on MacOS
Up to Installation
Someone should verify that this description is complete and correct. Then this fixme can be removed.
Xcode
- MacOS has the compiler “gfortran” and the libraries “LAPACK” and “BLAS” already installed as system libraries. Important is to install “Xcode” from the Appstore. (Sign the license after opening it from the application folder.)
- Check if the “Xcode Command Line Tools” are installed on your system. You can check this guide on how to do it. The libraries
BLAS
andLAPACK
are part of the Accelerate framework and are therefore already available on your machine.
Homebrew
- Homebrew is a package manager for software on MacOS. If it is not already installed, follow the instructions on the Homebrew website or in this installation guide. Note that the Homebrew default installation directory is now
/opt/homebrew/
and not part of the default shell$PATH
(compared tousr/local
on Intel Macs). At the end of its installation Homebrew should show two commands to add it to$PATH
. Copy and paste them in the command line. - Install required libraries
brew install gcc brew install open-mpi brew install fftw --with-fortran brew install libxc brew install grace brew install --cask xquartz
- gcc: GNU Compiler Collection containing
gfortran
- open-mpi: Message Passing Interface (MPI) library for parallel computation
- fftw: library performing fast discrete Fourier transforms
- libxc: library for density functionals. The libxc library has to be built with the parameters “
-DDISABLE_KXC=OFF
” and “-DDISABLE_LXC=OFF
” as options for cmake. - grace: plotting tool used for data analysis
- xquartz: support for X11 on MacOS
CP-PAW
- Unpack the CP-PAW distribution into a directory, whose path will be called
$PAWDIR
in the following and is the top directory of the distribution. - Add the directory
$PAWDIR/bin/osx_gfortran_accellerate
to your$PATH
variable in your ~/.zshrc.export PATH=$PATH:$PAWDIR/bin/osx_gfortran_accellerate
- Create a file "parms.osx_gfortran_accelerate" in
$PAWDIR
. - Execute in
$PAWDIR
autoconf configure --with-parmfile=parms.osx_gfortran_accelerate make -j8
autoconf
uses the file “configure.ac” to construct the “configure” file. You can skip this step, if a configure file is already present. After theconfigure
command, you should get some information that ends withdone!—configuration completed successfully!
. If not, inspect the error messages and fix them. Themake
command may take a considerable time, if you set up the code for the first time. You can try to speed the process up using the parallel make with the option “make -j10 all”. “-j” specifies the number of processes that may run in parallel. However, be prepared if to restart make up a few times. - Codesign: When you try to remotely execute unsigned code under macos, it will ask you for permission. This is painful when you run parallel code. Therefore it is advisable to sign the parallel executables. This is a fairly complicated procedure, which you need to look up. ( This section could be expanded.)
- Increase the stack size and the core-dump size by including the following commands in your
~/.zshrc
ulimit -s 65532 ulimit -c unlimited
- Restart your console or use
source ~/.zshrc
. - Check if the code is available by running
which paw_fast.x
.
package/installation/macos.txt · Last modified: 2024/04/26 17:37 by pbloechl