Skip to content

Commit

Permalink
Update BaseCamp make.inc files
Browse files Browse the repository at this point in the history
  • Loading branch information
wyphan committed Dec 31, 2020
1 parent 6aa533b commit d15b392
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 60 deletions.
28 changes: 18 additions & 10 deletions make.inc.basecamp.gcc.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,31 @@ EXE_SFX = opt
#LAPACK_LIB = -lblas -llapack

# Use OpenBLAS
OBLAS_PATH = /opt/openblas/openblas-0.3.10/gcc-9.3.0
LAPACK_LIB = -L$(OBLAS_PATH)/lib -lopenblas
LAPACK_LIB = -L${OPENBLAS_DIR}/lib -lopenblas

# Use AMD AOCL
#AOCL_PATH = /opt/AMD/aocl/aocl-linux-gcc-2.2.0
#LAPACK_LIB = -L$(AOCL_PATH)/lib -lblis -lflame
#LAPACK_LIB = -L${AOCLhome}/lib -lblis -lflame

#==============================================================================
# FFTW 3
#==============================================================================

# To disable, comment these three lines
FFT_INC = -I${FFTW_DIR}/include
FFT_LIB = -L${FFTW_DIR}/lib -lfftw3_omp -lfftw3 -lm
FFT_CPP_OPTS = -D_FFTW3_

CPP_OPTS += $(FFT_CPP_OPTS)
F90_OPTS += $(FFT_INC)

#==============================================================================
# HDF5
#==============================================================================

# To disable, comment these three lines
# Make sure to `module load hdf5`
#HDF5_INC = -I${OLCF_HDF5_ROOT}/include
#HDF5_LIB = -L${OLCF_HDF5_ROOT}/lib -lhdf5_fortran -lhdf5_cpp -lhdf5_hl -lhdf5 -ldl
#HDF5_CPP_OPTS = -WF,-qfpp,-D_HDF5_
HDF5_INC = -I${HDF5_DIR}/include
HDF5_LIB = -L${HDF5_DIR}/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
HDF5_CPP_OPTS = -D_HDF5_

CPP_OPTS += $(HDF5_CPP_OPTS)
F90_OPTS += $(HDF5_INC)
Expand All @@ -130,5 +139,4 @@ F90_OPTS += $(HDF5_INC)
# List all libraries to link
#==============================================================================

LIBS = $(LAPACK_LIB) $(HDF5_LIB)

LIBS = $(LAPACK_LIB) $(FFT_LIB) $(HDF5_LIB)
32 changes: 19 additions & 13 deletions make.inc.basecamp.llvm.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ EXE_SFX = opt

# Profiling
#F90_OPTS += -pg -g -O2 -funroll-loops
# Make sure to enable ESSL (see BLAS and LAPACK section)
#F90_LINK_OPTS = $(F90_OPTS) -fPIC
#EXE_SFX = prof

Expand All @@ -90,28 +89,35 @@ EXE_SFX = opt
#LAPACK_LIB = -lblas -llapack

# Use reference BLAS and LAPACK 3.9.0
#REFLAPACK_PATH = /opt/reflapack/lapack-3.9.0/aocc-2.3.0
#LAPACK_LIB = -L$(REFLAPACK_PATH)/lib -lblas -llapack
#LAPACK_LIB = -L${LAPACK_DIR}/lib -lblas -llapack

# Use OpenBLAS
OBLAS_PATH = /opt/openblas/openblas-0.3.10/aocc-2.3.0
LAPACK_LIB = -L$(OBLAS_PATH)/lib -lopenblas
#LAPACK_LIB = -L${OPENBLAS_DIR}/lib -lopenblas

# Use AMD AOCL
#AOCL_PATH = /opt/AMD/aocl/aocl-linux-aocc-2.2.0
#LAPACK_LIB = -L$(AOCL_PATH)/lib -lblis -lflame
LAPACK_LIB = -L${AOCLhome}/lib -lblis -lflame

#==============================================================================
# FFTW 3
#==============================================================================

# To disable, comment these three lines
FFT_INC = -I${FFTW_DIR}/include
FFT_LIB = -L${FFTW_DIR}/lib -lfftw3_omp -lfftw3 -lm
FFT_CPP_OPTS = -D_FFTW3_

CPP_OPTS += $(FFT_CPP_OPTS)
F90_OPTS += $(FFT_INC)

#==============================================================================
# HDF5
#==============================================================================

# TODO: resolve JIRA ticket https://jira.hdfgroup.org/browse/SUPPORT-1107

# To disable, comment these four lines
# Make sure to `module load hdf5`
#HDF5_PATH = /opt/hdf5/hdf5-1.12.0/aocc-2.3.0
#HDF5_INC = -I$(HDF5_PATH)/include
#HDF5_LIB = -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
# To disable, comment these three lines
#HDF5_INC = -I${HDF5_DIR}/include
#HDF5_LIB = -L${HDF5_DIR}/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
#HDF5_CPP_OPTS = -D_HDF5_

CPP_OPTS += $(HDF5_CPP_OPTS)
Expand Down Expand Up @@ -139,5 +145,5 @@ F90_OPTS += $(HDF5_INC)
# List all libraries to link
#==============================================================================

LIBS = $(LAPACK_LIB) $(HDF5_LIB)
LIBS = $(LAPACK_LIB) $(FFT_LIB) $(HDF5_LIB)

24 changes: 8 additions & 16 deletions make.inc.basecamp.nv.acc
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,14 @@ EXE_SFX = opt-acc
#LAPACK_LIB = -lblas -llapack

# Use reference BLAS and LAPACK 3.9.0
REFLAPACK_PATH = /opt/reflapack/lapack-3.9.0/nv-20.11
LAPACK_LIB = -L$(REFLAPACK_PATH)/lib -lblas -llapack
LAPACK_LIB = -L${LAPACK_DIR}/lib -lblas -llapack

# Use OpenBLAS
#OBLAS_PATH = /opt/openblas/openblas-0.3.13/nv20.11
#LAPACK_LIB = -L$(OBLAS_PATH)/lib -lopenblas
#LAPACK_LIB = -L${OPENBLAS_DIR}/lib -lopenblas

# Use MAGMA
# TODO: compile MAGMA with nvhpc 20.9, 20.11
MAGMA_PATH = /opt/magma/magma-2.5.3/pgi19.10+cuda11.0+openblas0.3.10
MAGMA_INC = -I$(MAGMA_PATH)/include
LAPACK_LIB += -L$(MAGMA_PATH)/lib -lmagma
MAGMA_INC = -I${MAGMA_DIR}/include
LAPACK_LIB += -L${MAGMA_DIR}/lib -lmagma
CPP_OPTS += -D_MAGMA_ -DNGPUS=1
F90_OPTS += $(MAGMA_INC)

Expand All @@ -130,10 +126,8 @@ F90_OPTS += $(MAGMA_INC)
#==============================================================================

# To disable, comment these three lines
# Make sure to `module load hdf5`
FFT_PATH = /opt/fftw/fftw-3.3.8/pgi19.10+nollvm
FFT_INC = -I$(FFT_PATH)/include
FFT_LIB = -L$(FFT_PATH)/lib -lfftw3_omp -lfftw3 -lm
FFT_INC = -I${FFTW_DIR}/include
FFT_LIB = -L${FFTW_DIR}/lib -lfftw3_omp -lfftw3 -lm
FFT_CPP_OPTS = -D_FFTW3_

CPP_OPTS += $(FFT_CPP_OPTS)
Expand All @@ -144,9 +138,8 @@ F90_OPTS += $(FFT_INC)
#==============================================================================

# To disable, comment these three lines
# Make sure to `module load hdf5`
HDF5_INC = -I/opt/hdf5/hdf5-1.12.0/pgi-19.10/include
HDF5_LIB = -L/opt/hdf5/hdf5-1.12.0/pgi-19.10/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
HDF5_INC = -I${HDF5_DIR}/include
HDF5_LIB = -L${HDF5_DIR}/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
HDF5_CPP_OPTS = -D_HDF5_

CPP_OPTS += $(HDF5_CPP_OPTS)
Expand Down Expand Up @@ -175,4 +168,3 @@ F90_OPTS += $(HDF5_INC)
#==============================================================================

LIBS = $(LAPACK_LIB) $(FFT_LIB) $(HDF5_LIB)

30 changes: 9 additions & 21 deletions make.inc.basecamp.pgi.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,23 @@ EXE_SFX = dbg-acc
# BLAS and LAPACK
#==============================================================================

# Use PGI's bundled BLAS and LAPACK
# Use PGI's bundled OpenBLAS (not threadsafe!)
#LAPACK_LIB = -lblas -llapack

# Use reference BLAS and LAPACK 3.9.0
#REFLAPACK_PATH = /opt/reflapack/lapack-3.9.0/pgi-19.10
#LAPACK_LIB = -L$(REFLAPACK_PATH)/lib -lblas -llapack
#LAPACK_LIB = -L${LAPACK_DIR}/lib -lblas -llapack

# Use OpenBLAS
OBLAS_PATH = /opt/openblas/openblas-0.3.10/pgi-19.10+nollvm
LAPACK_LIB = -L$(OBLAS_PATH)/lib -lopenblas

# Use MAGMA
#MAGMA_PATH = /opt/magma/magma-2.5.3/pgi19.10+cuda11.0+openblas0.3.10
#MAGMA_INC = -I$(MAGMA_PATH)/include
#LAPACK_LIB += -L$(MAGMA_PATH)/lib -lmagma
#CPP_OPTS += -D_MAGMA_ -DNGPUS=1
#F90_OPTS += $(MAGMA_INC)
LAPACK_LIB = -L${OPENBLAS_DIR}/lib -lopenblas

#==============================================================================
# FFTW 3
#==============================================================================

# To disable, comment these four lines
# Make sure to `module load fftw`
#FFT_PATH = /opt/fftw/fftw-3.3.8/pgi19.10+nollvm
#FFT_INC = -I$(FFT_PATH)/include
#FFT_LIB = -L$(FFT_PATH)/lib -lfftw3_omp -lfftw3 -lm
#FFT_CPP_OPTS = -D_FFTW3_
# To disable, comment these three lines
FFT_INC = -I${FFTW_DIR}/include
FFT_LIB = -L${FFTW_DIR}/lib -lfftw3_omp -lfftw3 -lm
FFT_CPP_OPTS = -D_FFTW3_

CPP_OPTS += $(FFT_CPP_OPTS)
F90_OPTS += $(FFT_INC)
Expand All @@ -143,8 +132,8 @@ F90_OPTS += $(FFT_INC)

# To disable, comment these three lines
# Make sure to `module load hdf5`
HDF5_INC = -I/opt/hdf5/hdf5-1.12.0/pgi-19.10/include
HDF5_LIB = -L/opt/hdf5/hdf5-1.12.0/pgi-19.10/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
HDF5_INC = -I{HDF5_DIR}/include
HDF5_LIB = -L{HDF5_DIR}/lib -lhdf5_fortran -lhdf5_hl -lhdf5 -ldl
HDF5_CPP_OPTS = -D_HDF5_

CPP_OPTS += $(HDF5_CPP_OPTS)
Expand Down Expand Up @@ -173,4 +162,3 @@ F90_OPTS += $(HDF5_INC)
#==============================================================================

LIBS = $(LAPACK_LIB) $(FFT_LIB) $(HDF5_LIB)

0 comments on commit d15b392

Please sign in to comment.