Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace built-in linear system solver with LAPACK #410

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends gfortran libhdf5-openmpi-dev libopenmpi-dev
run: sudo apt-get install -y --no-install-recommends gfortran libhdf5-openmpi-dev libopenmpi-dev libblas-dev liblapack-dev
- name: Install ED2
run: |
cd ED/build
Expand Down
4 changes: 2 additions & 2 deletions BRAMS/build/bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif


#----- Compiler commands. -----------------------------------------------------------------#
INCLUDES = $(PAR_INCS) -I$(UTILS_INCS) $(HDF5_INCS) $(MPI_INCS)
INCLUDES = $(PAR_INCS) -I$(UTILS_INCS) $(HDF5_INCS) $(MPI_INCS) $(LAPACK_INCS)
F90_COMMAND = $(F_COMP) -c $(F_OPTS) $(INCLUDES) $(PAR_DEFS)
F90_LOWO_COMMAND = $(F_COMP) -c $(F_LOWO_OPTS) $(INCLUDES) $(PAR_DEFS)
FPP_COMMAND = $(F_COMP) -c -DUSE_INTERF=$(USE_INTERF) -DUSENC=$(USENC) -D$(CMACH) \
Expand Down Expand Up @@ -63,7 +63,7 @@ gendep:
$(EXE): $(LIBMODEL) $(MAINOBJ)
@echo ""
$(LOADER) -o $(EXE) rammain.o $(LOADER_OPTS) $(LIBMODEL) \
$(HDF4_LIBS) $(HDF5_LIBS) $(PAR_LIBS) $(NC_LIBS) $(LIBS)
$(HDF4_LIBS) $(HDF5_LIBS) $(PAR_LIBS) $(LAPACK_LIBS) $(NC_LIBS) $(LIBS)
@echo ""
@echo Finished building === $(EXE)
@echo ""
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.32intel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ HDF5_LIBS=-L/n/Moorcroft_Lab/Users/mlongo/util/hdflib/hdf5_32/hdf5/lib \
# may benefit from collective I/O, then use this flag = 1
# Otherwise, set it to zero.


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#

USE_COLLECTIVE_MPIO=0

#---------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.gfortran
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ HDF5_LIBS=-lz -L/opt/hdf5/1.8.1/ompi-tcp-gnu41/lib \



#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#


# HDF libraries-------------------------------------------------
# HDF4 library: Instructions to install: www.cptec.inpe.br/brams
# If you run "configure" script, you don't need to edit line bellow
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ HDF4_LIBS=-L./.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz
USE_MPIWTIME=0


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#


#----------------- SGI -n32 ------------------------------------
#CMACH=SGI
#F_COMP=f90
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.intel
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl
#------------------------------------------------------------------------------------------#


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#



#------------------------------------------------------------------------------------------#
# If you have a version of hdf5 compiled in parallel, then you may benefit from #
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ NC_LIBS=-L/dev/null
# --------------------------------------------------------------


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#


# MPI_Wtime. ---------------------------------------------------
# If USE_MPIWTIME=1, then it will use MPI libraries to compute
# the wall time (the only double-precision intrinsic). In case
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.nec
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ HDF4_LIBS=
USE_MPIWTIME=1


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#


#----------------- SGI -n32 ------------------------------------
#CMACH=SGI
#F_COMP=f90
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.odyssey
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ HDF5_LIBS= -lz -lm -L$(HDF5_PATH)/lib -lhdf5 -lhdf5_fortran -lhdf5_hl
#------------------------------------------------------------------------------------------#


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#



#------------------------------------------------------------------------------------------#
# If you have a version of hdf5 compiled in parallel, then you may benefit from #
Expand Down
13 changes: 13 additions & 0 deletions BRAMS/build/bin/include.mk.opt.pgi
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ HDF4_LIBS=
#HDF4_LIBS=-L.hdf4_libs -lmfhdf -ldf -lz -ljpeg -lsz
# --------------------------------------------------------------


#------------------------------------------------------------------------------------------#
# Linear Algebra Package (LAPACK) libraries. #
# #
# Lapack is a well-established package for solving linear systems in Fortran. This is #
# more efficient than the former built-in solution, and thus it became the new default. #
# Consequently, it is now required to link the lapack libraries during compilation. #
#------------------------------------------------------------------------------------------#
LAPACK_PATH=/usr/local/opt/lapack
LAPACK_INCS=-I$(LAPACK_PATH)/include
LAPACK_LIBS=-L$(LAPACK_PATH)/lib -llapack -lblas
#------------------------------------------------------------------------------------------#

# HDF 5 Libraries
# ED2 HAS OPTIONAL HDF 5 I/O
# If you wish to use this functionality specify USE_HDF5=1
Expand Down
Loading
Loading