User Tools

Site Tools


package:installation:macos

This is an old revision of the document!


Installation of CPPAW on MacOS

Up to Installation

FIXME Someone should verify that this description is complete and correct. Then this fixme can be removed.

Xcode
  1. 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.)
  1. 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 and LAPACK are part of the Accelerate framework and are therefore already available on your machine.
Homebrew
  1. 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 to usr/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.

Homebrew should automatically manage and install dependencies of software packages. Installations might therefore take a while on a new machine, where many dependencies need to be installed.

  1. Install GNU Compiler Collection containing gfortran for ARM architecture:
brew install gcc
  1. Install Message Passing Interface library for parallel computation:
brew install open-mpi
  1. Install FFTW, a library for performing fast discrete Fourier transform:
brew install fftw --with-fortran
  1. Install LibXC, a library for density functionals:
brew install libxc
  1. Install Grace, a plotting tool used for data analysis. xquartz provides support for X11 on MacOS:
brew install grace
brew install --cask xquartz
CP-PAW
  1. Unpack the CP-PAW distribution into a directory, whose path will be called $PAWDIR in the following.
  2. Add the directory $PAWDIR/bin/osx_gfortran_accellerate to your $PATH variable in your ~/.zshrc.
     export PATH=$PATH:$PAWDIR/bin/osx_gfortran_accellerate
  3. Create a file "parms.osx_gfortran_accelerate" in $PAWDIR.
  4. Execute in $PAWDIR
         autoconf
         configure --with-parmfile=parms.osx_gfortran_accelerate
         make all 

    autoconf uses the file “configure.ac” to construct the “configure” file. You can skip this step, if a configure file is already present. After the configure command, you should get some information that ends with done!—configuration completed successfully!. If not, inspect the error messages and fix them. The make command may take a very long time, if you set up the code for the first time.

  5. 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. (FIXME This section could be expanded.)
  6. Increase the stack size and the core-dump size by including the following commands in your ~/.zshrc
        ulimit -s 65532
        ulimit -c unlimited
  7. Restart your console or use source ~/.zshrc.
  8. Check if the code is available by running which paw_fast.x.
package/installation/macos.1714131915.txt.gz · Last modified: 2024/04/26 11:45 by pbloechl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki