Re: MacOS installation error, OpenMX-3.9 ( No.1 )
Date: 2022/03/07 21:59
Name: Naoya Yamaguchi

Hi,

Recently, I've installed the OpenMX on an M1 Mac, and I leave examples of `CC`, `FC` and `LIB` for the `makefile` below.

1. with Rosetta and MacPorts (GCC+MPICH+MKL)
MKLROOT=/opt/intel/oneapi/mkl/2021.3.0
CC = mpicc-mpich-gcc9 -Ofast -march=native -ffast-math -fopenmp -I$(MKLROOT)/include/fftw -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
FC = mpif90-mpich-gcc9 -Ofast -march=native -ffast-math -fopenmp
LIB= -L${MKLROOT}/lib -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_mpich_lp64 -L/opt/intel/oneapi/compiler/2021.3.0/mac/compiler/lib -liomp5 -lpthread -lm -ldl -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -lgfortran -lmpi -lmpifort

2. native with Homebrew (Clang+GFortran+OpenMPI+ScaLAPACK+FFTW)
CC = mpicc -O3 -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/13.0.0/include -Wno-error=implicit-function-declaration -Dnosse -I/opt/homebrew/Cellar/fftw/3.3.10/include
FC = mpif90 -O3 -ffast-math -march=native -fopenmp -Dnosse -fallow-argument-mismatch
LIB= -L/opt/homebrew/Cellar/scalapack/2.1.0_3/lib -lscalapack -llapack -lblas -L/opt/homebrew/Cellar/fftw/3.3.10/lib -lfftw3 -lmpi_mpifh -L/opt/homebrew/Cellar/llvm/13.0.0_1/lib -lomp -lpthread -L/opt/homebrew/Cellar/gcc/11.2.0_3/lib/gcc/11 -lgfortran

You can compare yours with example 2.

Regards,
Naoya Yamaguchi