My first Apple laptop was a PowerBook running the PowerPC G4 processor. The transition to Intel x86 chips provided many opportunities, but they lost their edge over time to become efficient heat generators. So far, I am very impressed by the ARM M2 processor and its 20 billion transistors. It does take some effort to get everything nicely configured. I am running macOS Ventura 13.1.
Awaken UNIX
Call me lazy, but I find the App Store convenient. It remembers that I have downloaded standard software such as Microsoft Office, Slack, and Xcode on some other machine, so it is a one-click installation for those. Not everything is there, but it does save time.
I also rely on homebrew for package management these days. Once I have Xcode installed, it is just a one line installation and one more to install a range of packages that I will use.
zsh is the default UNIX shell.
Set up your zprofile, ssh config, and vimrc files to make working faster and more comfortable. My .zprofile
has some basic settings such as:
Later I will need C libraries that are in a non-standard location, so I find it useful to create the following link:
It may be very specific to this moment, but I had an issue with gcc-12
and g++-12
not finding standard headers due to a mismatch with the Xcode version.
After spotting the source of the issue with cpp-12 -v
, there is a simple fix:
Python
I use conda as standard. This comes with the core python-related packages including jupyter-lab. It’s straightforward once you download the Apple Silicon (not x86) installation file. Then you are free to install all of your favourite packages, e.g.
DFT: VASP
I use a range of density functional theory (DFT) packages, but VASP is a robust standard. Thanks to Alex for some of the tips used in getting this to work. Taking the shiny 6.3.2 version, I untared the source code, and:
makefile.include
needs some tweaking, including:
-
Change all instances of
gcc
togcc-12
andg++
tog++-12
-
Add
-Dqd_emulate
toCPP_OPTIONS
and then modify the library links to point to the homebrew installation:
-
Set
SCALAPACK_ROOT ?= /opt/homebrew/
-
Set
OPENBLAS_ROOT ?= /opt/homebrew/Cellar/openblas/0.3.21
-
Set
FFTW_ROOT ?= /opt/homebrew/
To enable HDF5 support, uncomment that block of text and edit HDF5_ROOT ?= /opt/homebrew/
. I have copied my working makefile.include
over here.
make all
and wait a few minutes. Check the outcome by running mpirun -np 4 vasp_std
in the bin. You are treated to a warm hello characteristic of the vaspmaster.
DFT: FHI-AIMS
The all-electron DFT package FHI-AIMS uses cmake
for compilation setup, which has already been installed above via homebrew. Taking the latest version:
I edited initial_cache.cmake
to change mpif90
to gfortan
and cc
to gcc-12
, along with
The edited file is over here. Then, simply:
Check the outcome with mpirun -np 4 aims.221103.scalapack.mpi.x
. Happy computing.