User Tools

Site Tools


package:installation:macos

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
package:installation:macos [2022/04/11 14:20] lukaspackage:installation:macos [2024/04/26 17:37] (current) pbloechl
Line 1: Line 1:
-==== Installation of CPPAW on MacOS ====+====== Installation of CPPAW on MacOS ======
  
-[[:package:installation:installation|Up to Installation]]+Up to [[:package:installation:installation|Installation]]
  
 FIXME Someone should verify that this description is complete and correct. Then this fixme can be removed. FIXME Someone should verify that this description is complete and correct. Then this fixme can be removed.
  
-In 2020 Apple released the M1 chip with an ARM architecture which differs from the x86 used by Intel. Following this release, many programs, libraries and compilers needed to be adapted to run on the new architecture. Therefore, the guide is split into Intel and Apple Silicon used in Apple computers. Note, that the ecosystem around Apple Silicon is constantly evolving at the moment of writing these instructions.+==== Xcode ====
  
-=== Apple Silicon ARM ===+  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 [[https://mac.install.guide/commandlinetools/2.html|guide]] on how to do it. The libraries ''BLAS'' and ''LAPACK'' are part of the [[https://developer.apple.com/documentation/accelerate|Accelerate]] framework and are therefore already available on your machine.
  
-== Xcode ==+==== Homebrew ====
  
-Check if Xcode Command Line Tools is installed on your system. You can check this [[https://mac.install.guide/commandlinetools/2.html|guide]] on how to do it. The libraries ''BLAS'' and ''LAPACK'' are part of the [[https://developer.apple.com/documentation/accelerate|Accelerate]] framework and are therefore already available on your machine. +  - Homebrew is a package manager for software on MacOS. If it is not already installed, follow the instructions on the [[https://brew.sh/|Homebrew website]] or in this [[https://mac.install.guide/homebrew/index.html|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. 
- +  Install required libraries <code>
-== Homebrew == +
- +
-Homebrew is a convenient package manager for software. If it is not already installed, please follow the instructions on the [[https://brew.sh/|Homebrew website]] or in this [[https://mac.install.guide/homebrew/index.html|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. +
- +
-Install GNU Compiler Collection containing ''gfortran'' for ARM architecture: +
-<code>+
 brew install gcc brew install gcc
-</code> 
-Install Message Passing Interface library for parallel computation: 
-<code> 
 brew install open-mpi brew install open-mpi
-</code> +brew install fftw --with-fortran 
-Install FFTW, a library for performing fast discrete Fourier transform: +brew install libxc
-<code> +
-brew install fftw +
-</code> +
-Install Grace, a plotting tool used for data analysis. ''xquartz'' provides support for X11 on MacOS: +
-<code>+
 brew install grace brew install grace
 brew install --cask xquartz brew install --cask xquartz
-</code>+</code>  
 +  * 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 ==+==== CP-PAW ====
  
-  - Unpack the CP-PAW distribution into a directory, whose path will be called ''$PAWDIR'' in the following. +  - 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 <code> export PATH=$PATH:$PAWDIR/bin/osx_gfortran_accellerate</code>. +  - Add the directory ''$PAWDIR/bin/osx_gfortran_accellerate'' to your ''$PATH'' variable in your ~/.zshrc<code> export PATH=$PATH:$PAWDIR/bin/osx_gfortran_accellerate</code> 
-  - Create a file [[:package:installation:MacOS/parmsfile|"parms.osx_gfortran_accelerate"]] in ''$PAWDIR''+  - Create a file [[:package:installation:macosparmsfile|"parms.osx_gfortran_accelerate"]] in ''$PAWDIR''.
-  - Check the values of the parameters ''FFTDIR'', ''FFTHEADER'', ''MPIDIR'', ''MPI_HEADER'', ''LIBS_SCALAR'', and ''LIBS_PARALLEL'' in "parms.osx_gfortran_accelerate". Most likely, you will need to adjust the version numbers of the codes or adapt the paths to your personal computer.+
   - Execute in ''$PAWDIR''   <code>   - Execute in ''$PAWDIR''   <code>
      autoconf      autoconf
      configure --with-parmfile=parms.osx_gfortran_accelerate      configure --with-parmfile=parms.osx_gfortran_accelerate
-     make all </code> ''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.+     make -j8 </code> ''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 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. (FIXME This section could be expanded.)   - 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.)
   - Increase the stack size and the core-dump size by including the following commands in your ''~/.zshrc'' <code>   - Increase the stack size and the core-dump size by including the following commands in your ''~/.zshrc'' <code>
     ulimit -s 65532     ulimit -s 65532
-    ulimit -c unlimited +    ulimit -c unlimited</code>
-    </code>+
   - Restart your console or use ''source ~/.zshrc''.   - Restart your console or use ''source ~/.zshrc''.
-  - Check if the code is available+  - Check if the code is available by running ''which paw_fast.x''
  
-=== Intel Silicon - x86 === 
  
-== 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.) Then install the "Command-Line tools" 
- of Xcode. (Check the web for installation instructions). 
- 
-== Homebrew == 
-I am installing Linux programs using [[https://brew.sh|homebrew]]. If you do not have it already, follow the installation instruction on its web page. Then install the following libraries.  
-<code> 
-brew install fftw  --with-fortran 
-brew install openmpi 
-brew install grace 
-</code> 
- 
- 
-== PAW == 
- 
-  - Unpack the PAW distribution into a directory, which I will name PAWDIR in the following.  
-  - add the directory PAWDIR/bin/osx_gfortran_accellerate to your PATH variable in your ~/.profile 
-  - Create a file [[:package:installation:MacOS/parmsfile|''parms.osx_gfortran_accelerate'']] in PAWDIR 
-  - Check the values of the parameters FFTDIR, FFTHEADER, MPIDIR, and MPIDIR in "parms.osx_gfortran_accelerate". Most likely, you will need to adjust the version numbers of the codes. 
-  - execute in PAWDIR   <code> 
-     autoconf 
-     configure --with-parmfile=parms.osx_gfortran_accelerate 
-     make all </code> "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.  
-  - 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.) 
-  - Increase the stack size and the core-dump size by including the following commands in your ''~/.profile'' <code> 
-    ulimit -s 65532 
-    ulimit -c unlimited </code> 
-    
-     
          
          
  
package/installation/macos.1649686826.txt.gz · Last modified: 2022/04/11 14:20 by lukas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki