Skip to content

Commit

Permalink
Add requested changes from Harshula
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBryan51 committed Jan 25, 2024
1 parent 34d89ce commit 1926e50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/offline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,18 @@ OBJS := ${LSRC:.F90=.o}
.SUFFIXES: .F90 .o
#default rules for these suffixes
.F90.o:
$(FC) $(CFLAGS) $(CINC) -c $<
$(FC) $(CFLAGS) -c $<

SUPPRESS_FLAGS := -warn nostderrors -diag-disable 10145

# the first target is the default target
.PHONY: serial
serial: cable_driver.F90 $(OBJS)
$(FC) $(SUPPRESS_FLAGS) $(CFLAGS) -o $(PROG_SERIAL) $^ $(CINC) $(LDFLAGS)
$(FC) $(SUPPRESS_FLAGS) $(CFLAGS) -o $(PROG_SERIAL) $^ $(LDFLAGS)

.PHONY: mpi
mpi: cable_mpidrv.F90 cable_mpicommon.o cable_mpimaster.o cable_mpiworker.o pop_mpi.o $(OBJS)
$(FC) $(SUPPRESS_FLAGS) $(CFLAGS) -o $(PROG_MPI) $^ $(CINC) $(LDFLAGS)
$(FC) $(SUPPRESS_FLAGS) $(CFLAGS) -o $(PROG_MPI) $^ $(LDFLAGS)

cable_mpicommon.o: cable_mpicommon.F90 $(OBJS)
pop_mpi.o: pop_mpi.F90 cable_mpicommon.o $(OBJS)
Expand Down
14 changes: 7 additions & 7 deletions src/offline/build3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ host_gadi()
# pkg-config (Note, we manually prepend to PKG_CONFIG_PATH instead of
# using `module prepend-path` so that we can invoke this script successfully
# in benchcab):
export PKG_CONFIG_PATH=${NETCDF_BASE}/lib/Intel/pkgconfig/:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH="${NETCDF_BASE}/lib/Intel/pkgconfig/:${PKG_CONFIG_PATH}"

if ! pkg-config --exists netcdf-fortran; then
echo ''
echo 'Unable to find netcdf-fortran via pkg-config. Exiting...'
echo ''
echo -e "\nUnable to find netcdf-fortran via pkg-config. Exiting...\n"
exit 1
fi

export CFLAGS='-O2 -fp-model precise '
export LDFLAGS=`pkg-config --libs netcdf-fortran`
export CINC=`pkg-config --cflags netcdf-fortran`
CFLAGS=$(pkg-config --cflags netcdf-fortran)
LDFLAGS=$(pkg-config --libs netcdf-fortran)

CFLAGS+="-O2 -fp-model precise "
export CFLAGS LDFLAGS

if [[ $1 = 'mpi' ]]; then
module add intel-mpi/2019.5.281
Expand Down

0 comments on commit 1926e50

Please sign in to comment.