Step 1: Download LATTE Source Code from Project
Download or clone the LATTE source code from https://github.com/lanl/LATTE. If you download a zipfile or tarball, unpack the tarball either in this /lib/latte directory or somewhere else on your system.
Step 2: Modify makefile.CHOICES
Modify the makefile.CHOICES according to your system architecture and compilers. Check that the MAKELIB flag is ON in makefile.CHOICES and finally, build the code via the make command
#
# Compilation and link flags for LATTE
#
# Precision - double or single
PRECISION = DOUBLE
#PRECISION = SINGLE
# Make the latte library
# AR and RUNLIB executable default path to compile
# latte as a library (change accordingly)
MAKELIB = ON
AR = /usr/bin/ar cq
RANLIB = /usr/bin/ranlib
# Use PROGRESS and BML libraries
PROGRESS = OFF
PROGRESS_PATH= $(HOME)/qmd-progress/install/lib
BML_PATH= $(HOME)/bml/install/lib
# Use METIS library for graph partitioning
METIS = OFF
METIS_PATH= $(HOME)/metis/metis-5.1.0/install
# GPU available - OFF or ON
GPUOPT = OFF
# Using DBCSR library from cp2k? OFF or ON
DBCSR_OPT = OFF
# Parallelizing over k-points?
MPIOPT = OFF
#
# CPU Fortran options
#
#For GNU compiler:
#FC = mpif90
FC = gfortran
FCL = $(FC)
FFLAGS = -O3 -fopenmp -cpp
#FFLAGS = -fast -Mpreprocess -mp
LINKFLAG = -fopenmp
#For intel compiler:
FC = ifort
FCL = $(FC)
FFLAGS = -O3 -fpp -qopenmp
LINKFLAG = -qopenmp
LIB = -mkl=parallel
#GNU BLAS/LAPACK libraries:
#LIB = -L/usr/local/lapack-3.8.0 -llapack -L/usr/local/blas-3.8.0/lib -lblas
#Intel MKL BLAS/LAPACK libraries:
LIB = -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 \
-lmkl_lapack95_lp64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core \
-lmkl_gnu_thread -lmkl_core -ldl -lpthread -lm
#Alternative flags for MKL:
#LIB += -mkl=parallel
#Other BLAS/LAPACK vendors:
#LIB = -framework Accelerate
#LIB = -L/usr/projects/hpcsoft/toss2/common/acml/5.3.1/gfortran64/lib -lacml
# Uncomment for coverage
#CVR = OFF
ifeq ($(CVR), ON)
FFLAGS += -fprofile-arcs -ftest-coverage
LINKFLAG += -fprofile-arcs -ftest-coverage
endif
ifeq ($(PROGRESS), ON)
LIB += -L$(PROGRESS_PATH) -lprogress -L$(BML_PATH) -lbml_fortran -lbml
FFLAGS += -I$(BML_PATH)/../include -I$(PROGRESS_PATH)/../include
endif
ifeq ($(GRAPH), ON)
LIB += -L$(METIS_PATH)/lib -lmetis
FFLAGS += -I$(METIS_PATH)/include
endif
#DBCSR_LIB = -L/home/cawkwell/cp2k/lib/cawkwell/popt -lcp2k_dbcsr_lib
#DBCSR_MOD = -I/home/cawkwell/cp2k/obj/cawkwell/popt
#
# GPU options
#
GPU_CUDA_LIB = -L/usr/local/cuda-9.1/lib64 -lcublas -lcudart
GPU_ARCH = sm_20
# make
You should see liblatte.a file.

