macOS
The following instructions have been tested on macOS 15.3 (with Apple M4).
Requirements:
C and Fortran compilers (e.g. gcc/gfortran in GCC)
MPI (e.g. OpenMPI)
BLAS/LAPACK (e.g. Apple Accelerate)
Python3
The dependencies can be installed via Homebrew or compiled manually from source.
Building WEST
WEST executables can be compiled using the following script:
$ cat build_west.sh
#!/bin/bash
export MPIF90=mpif90
export F90=gfortran
export CC=gcc
export BLAS_LIBS="-framework Accelerate"
export LAPACK_LIBS="-framework Accelerate"
export LIBDIRS="-L/PATH/TO/FFTW3/lib"
./configure
# Add -I/PATH/TO/FFTW3/include to IFLAGS if needed
make -j 4 pw
cd West
make conf PYT=python3 PYT_LDFLAGS="`python3-config --ldflags --embed`"
make -j 4 all
To use the script do:
$ bash build_west.sh
Running WEST
We can run the wstat.x WEST executables on 2 cores using the following command:
$ export OMP_NUM_THREADS=1
$ mpirun -np 2 ./wstat.x -i wstat.in > wstat.out