Apple M1 Max build

Qbox installation issues
Forum rules
You must be a registered user to post in this forum. Registered users may also post new topics if they consider that their subject do not correspond to any topic already present on the forum.
Post Reply
mgovoni
Posts: 2
Joined: Thu Mar 24, 2022 6:53 pm

Apple M1 Max build

Post by mgovoni »

The following instructions were used to build Qbox rel1_74_1 on Apple M1 Max.

In the /src folder create the file macos.mk, with the following:

Code: Select all

 PLT=macos

 SCALAPACKDIR=/Users/mgovoni/LIBRARIES/SCALAPACK
 BLASDIR=/Users/mgovoni/LIBRARIES/BLAS
 LAPACKDIR=/Users/mgovoni/LIBRARIES/LAPACK

# PLTOBJECTS = readTSC.o

 CXX=mpiCC
 LD=$(CXX)

 PLTFLAGS += -DIA32 -DUSE_MPI -DUSE_FFTW3 -D_LARGEFILE_SOURCE \
             -D_FILE_OFFSET_BITS=64 -DADD_ \
             -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES -DXERCESC_3 \
             -DSCALAPACK -DUSE_UUID

 INCLUDE = -I/Users/mgovoni/LIBRARIES/FFTW3/include -I/Users/mgovoni/LIBRARIES/XERCES/include

 CXXFLAGS= -g -O3 -std=c++11 -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)

 LIBPATH = -L$(SCALAPACKDIR) -L$(LAPACKDIR) -L$(BLASDIR) -L/Users/mgovoni/LIBRARIES/XERCES/lib -L/Users/mgovoni/LIBRARIES/FFTW3/lib

 LIBS =  -lfftw3 -lscalapack -llapack -lblas -lm -lgfortran \
         -lxerces-c -lpthread -lstdc++

 LDFLAGS = $(LIBPATH) $(LIBS)
To build, execute the following command: make TARGET=macos
Post Reply