Skip to content

Commit eb6ca67

Browse files
committed
put back aed2, started ground-water option
1 parent 79c6d5a commit eb6ca67

23 files changed

+1880
-51
lines changed

GLM_CONFIG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44

55
#export FABM=true
6+
export AED2=true
67
export AED=true
78
export USE_DL=false
89
export WITH_PLOTS=true
@@ -20,6 +21,8 @@ export WITH_XPLOTS=true
2021
export CURDIR=`pwd`
2122
export FABMDIR=${CURDIR}/../fabm-git
2223
export PLOTDIR=${CURDIR}/../libplot
24+
export AED2DIR=${CURDIR}/../libaed2
25+
export AED2PLS=${CURDIR}/../libaed2-plus
2326
export UTILDIR=${CURDIR}/../libutil
2427

2528
export GLM_CONFIGURED=true

Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,26 @@ ifeq ($(AED),true)
154154
GLM_DEPS+=$(AEDWATDIR)/lib/libaed-water.a
155155
endif
156156

157+
ifeq ($(AED2),true)
158+
DEFINES+=-DAED2
159+
160+
ifeq ($(AED2DIR),)
161+
AED2DIR=../libaed2
162+
endif
163+
164+
FINCLUDES+=-I$(AED2DIR)/include -I$(AED2DIR)/mod
165+
AED2LIBS=-L$(AED2DIR)/lib -laed2
166+
ifneq ("$(wildcard ${AED2PLS}/Makefile)","")
167+
AED2PLBS=-L${AED2PLS}/lib -laed2+
168+
endif
169+
170+
ifeq ($(USE_DL),true)
171+
AED2TARGETS=libglm_wq_aed2.${so_ext}
172+
endif
173+
174+
GLM_DEPS+=$(AED2DIR)/lib/libaed2.a
175+
endif
176+
157177
FLIBS=
158178
# Select specific compiler bits
159179
ifeq ($(F90),ifort)
@@ -211,7 +231,7 @@ else
211231
endif
212232

213233
ifneq ($(USE_DL),true)
214-
WQLIBS=$(AEDLIBS) $(FABMLIBS)
234+
WQLIBS=$(AEDLIBS) $(FABMLIBS) $(AED2LIBS)
215235
endif
216236

217237
ifeq ($(DEBUG),true)
@@ -293,6 +313,9 @@ else
293313
else ifeq ($(FABM),true)
294314
OBJS+=${objdir}/glm_zones.o
295315
endif
316+
ifeq ($(AED2),true)
317+
OBJS+=${objdir}/glm_aed2.o
318+
endif
296319
ifeq ($(AED),true)
297320
OBJS+=${objdir}/glm_aed.o \
298321
${objdir}/aed_external.o

build_glm.sh

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,40 @@ else
4848
fi
4949

5050

51-
# if FC is not defined we look for gfortran-8 first because some systems
52-
# will have gfortran at version 7 but also gfortran version 8 as gfortran-8
53-
# if we can't find gfortran default to ifort
51+
# see if FC is defined, if not look for gfortran at least v8
5452
if [ "$FC" = "" ] ; then
55-
gfortran-8 -v > /dev/null 2>&1
53+
gfortran -v > /dev/null 2>&1
5654
if [ $? != 0 ] ; then
57-
gfortran -v > /dev/null 2>&1
58-
if [ $? != 0 ] ; then
59-
export FC=ifort
55+
export FC=ifort
56+
else
57+
VERS=`gfortran -dumpversion | cut -d\. -f1`
58+
if [ $VERS -ge 8 ] ; then
59+
export FC=gfortran
6060
else
61-
VERS=`gfortran -dumpversion | cut -d\. -f1`
62-
if [ $VERS -ge 8 ] ; then
63-
export FC=gfortran
64-
else
61+
gfortran-8 -v > /dev/null 2>&1
62+
if [ $? != 0 ] ; then
6563
export FC=ifort
64+
else
65+
export gfortran-8
6666
fi
6767
fi
68-
else
69-
export FC=gfortran-8
7068
fi
7169
fi
7270

7371
if [ "$FC" = "ifort" ] ; then
74-
if [ -d /opt/intel/bin ] ; then
75-
. /opt/intel/bin/compilervars.sh intel64
76-
fi
77-
which ifort > /dev/null 2>&1
78-
if [ $? != 0 ] ; then
79-
echo ifort compiler requested, but not found
80-
exit 1
81-
fi
72+
# if trying the intel fortran, initialise it
73+
if [ -d /opt/intel/oneapi ] ; then
74+
. /opt/intel/oneapi/setvars.sh
75+
else
76+
if [ -d /opt/intel/bin ] ; then
77+
. /opt/intel/bin/compilervars.sh intel64
78+
fi
79+
which ifort > /dev/null 2>&1
80+
if [ $? != 0 ] ; then
81+
echo ifort compiler requested, but not found
82+
exit 1
83+
fi
84+
fi
8285
fi
8386

8487
export F77=$FC
@@ -87,6 +90,9 @@ export F95=$FC
8790

8891
export MPI=OPENMPI
8992

93+
if [ "$AED2DIR" = "" ] ; then
94+
export AED2DIR=../libaed2
95+
fi
9096
if [ "$PLOTDIR" = "" ] ; then
9197
export PLOTDIR=../libplot
9298
fi
@@ -125,6 +131,19 @@ if [ "$FABM" = "true" ] ; then
125131
${MAKE} || exit 1
126132
fi
127133

134+
if [ "${AED2}" = "true" ] ; then
135+
cd ${AED2DIR}
136+
${MAKE} || exit 1
137+
cd ..
138+
if [ "${AED2PLS}" != "" ] ; then
139+
if [ -d ${AED2PLS} ] ; then
140+
cd ${AED2PLS}
141+
${MAKE} || exit 1
142+
cd ..
143+
fi
144+
fi
145+
fi
146+
128147
if [ "${AED}" = "true" ] ; then
129148
cd ${CURDIR}/../libaed-water
130149
${MAKE} || exit 1
@@ -171,9 +190,14 @@ if [ "$FC" = "flang" ] && [ -d flang_extra ] ; then
171190
fi
172191

173192
cd ${CURDIR}
174-
/bin/rm obj/aed_external.o
193+
if [ -f obj/aed_external.o ] ; then
194+
/bin/rm obj/aed_external.o
195+
fi
175196
${MAKE} AEDBENDIR=$DAEDBENDIR AEDDMODIR=$DAEDDMODIR || exit 1
176-
/bin/rm obj/aed_external.o
177-
${MAKE} glm+ AEDBENDIR=$DAEDBENDIR AEDDMODIR=$DAEDDMODIR AEDRIPDIR=$DAEDRIPDIR AEDDEVDIR=$DAEDDEVDIR || exit 1
197+
if [ "${DAEDDEVDIR}" != "" -a -d ${DAEDDEVDIR} ] ; then
198+
echo now build plus version
199+
/bin/rm obj/aed_external.o
200+
${MAKE} glm+ AEDBENDIR=$DAEDBENDIR AEDDMODIR=$DAEDDMODIR AEDRIPDIR=$DAEDRIPDIR AEDDEVDIR=$DAEDDEVDIR || exit 1
201+
fi
178202

179203
exit 0

debian/changelog

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
glm (3.2.0a3-0) UNRELEASED; urgency=low
1+
glm (3.2.0a6-0) UNRELEASED; urgency=low
22

33
[ Casper Boon ]
44
* new version 3.0.0
@@ -11,8 +11,11 @@ glm (3.2.0a3-0) UNRELEASED; urgency=low
1111
* new version 3.2.0a1
1212
* new version 3.2.0a2
1313
* new version 3.2.0a3
14+
* new version 3.2.0a4
15+
* new version 3.2.0a5
16+
* new version 3.2.0a6
1417

15-
-- Casper Boon <casper@shark> Fri, 27 Nov 2020 16:01:22 +0800
18+
-- Casper Boon <casper@eridanus.aed-net.science.uwa.edu.au> Fri, 30 Apr 2021 08:58:18 +0800
1619

1720
glm (2.4.1-0) UNRELEASED; urgency=low
1821

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package=glm
44
year=2020
5-
version=3.2.0a3
5+
version=3.2.0a6
66
release=0.0
77

88
#export DH_VERBOSE=1

src/glm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#endif
3636
#define USE_FILLVALUE 1
3737

38-
#define GLM_VERSION "3.2.0a4"
38+
#define GLM_VERSION "3.2.0a6"
3939

4040
#define POINT 0
4141
#define Z_SHAPE 1

0 commit comments

Comments
 (0)