From 63b68796e8d2f1bf8de975b4594856fc83a79d51 Mon Sep 17 00:00:00 2001 From: llpcarson Date: Mon, 14 Aug 2017 21:30:30 +0000 Subject: [PATCH 1/5] makefile update: list $(OBJS) to create the dynamic library --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index c0e8b9e25..a2a1888d3 100644 --- a/makefile +++ b/makefile @@ -167,7 +167,7 @@ OBJS = $(OBJS_f) $(OBJS_f90) $(OBJS_F) $(OBJS_F90) $(OBJS_c) all default: depend $(LIBRARY) $(LIBRARY): $(OBJS) - $(FC) -shared -Wl,-soname,$(LIBRARY).$(VER_MAJOR) -o $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) + $(FC) -shared -Wl,-soname,$(LIBRARY).$(VER_MAJOR) $(OBJS) -o $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) ln -sf $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) $(LIBRARY) ln -sf $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) $(LIBRARY).$(VER_MAJOR) From 1c6fb1036d8eb24da55b383443e01ec7778dd78c Mon Sep 17 00:00:00 2001 From: Laurie Date: Mon, 14 Aug 2017 15:37:37 -0600 Subject: [PATCH 2/5] makefile updates for dynamic lib --- makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/makefile b/makefile index c0e8b9e25..a547da291 100644 --- a/makefile +++ b/makefile @@ -67,7 +67,6 @@ SRCS_f = \ ./physics/moninshoc.f \ ./physics/mstadb.f \ ./physics/mstadbtn.f \ - ./physics/mstadbtn2.f \ ./physics/mstcnv.f \ ./physics/namelist_soilveg.f \ ./physics/ozne_def.f \ @@ -77,7 +76,6 @@ SRCS_f = \ ./physics/precpd.f \ ./physics/precpd_shoc.f \ ./physics/precpdp.f \ - ./physics/precpd_shoc.f \ ./physics/progt2.f \ ./physics/progtm_module.f \ ./physics/rad_initialize.f \ @@ -110,8 +108,6 @@ SRCS_f = \ ./physics/sflx.f \ ./physics/shalcnv.f \ ./physics/shalcv.f \ - ./physics/shalcv_1lyr.f \ - ./physics/shalcv_fixdp.f \ ./physics/shalcv_opr.f \ ./physics/tracer_const_h.f \ ./physics/tridi2t3.f @@ -167,7 +163,7 @@ OBJS = $(OBJS_f) $(OBJS_f90) $(OBJS_F) $(OBJS_F90) $(OBJS_c) all default: depend $(LIBRARY) $(LIBRARY): $(OBJS) - $(FC) -shared -Wl,-soname,$(LIBRARY).$(VER_MAJOR) -o $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) + $(FC) -shared -Wl,-soname,$(LIBRARY).$(VER_MAJOR) $(OBJS) -o $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) ln -sf $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) $(LIBRARY) ln -sf $(LIBRARY).$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) $(LIBRARY).$(VER_MAJOR) From 361031c4eb095461d2973c54072e0e156679c4e9 Mon Sep 17 00:00:00 2001 From: Laurie Date: Fri, 25 Aug 2017 15:45:48 -0600 Subject: [PATCH 3/5] Bug fix: In the gfsphyics IPD_driver_cap.f90 there were two references to "ccpp_fields_get_ptr": https://github.com/NCAR/gmtb-gfsphysics/blob/features/ccpp/IPD_layer/IPD_driver_cap.f90 lines 246 & 309. The subroutine is not public. I (Tim) wrapped it with an interface/module procedure as ccpp_fields_get() so as to be able to get an int, real, logical and pointer. We should not be calling the _ptr subroutine. modified: IPD_layer/IPD_driver_cap.f90 --- IPD_layer/IPD_driver_cap.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPD_layer/IPD_driver_cap.f90 b/IPD_layer/IPD_driver_cap.f90 index 6eacc641b..bbac32367 100644 --- a/IPD_layer/IPD_driver_cap.f90 +++ b/IPD_layer/IPD_driver_cap.f90 @@ -243,7 +243,7 @@ subroutine ipd_physics_step1_cap(ptr) bind(c) call c_f_pointer(ptr, cdata) - call ccpp_fields_get_ptr(cdata, 'IPD_Control', tmp, ierr) + call ccpp_fields_get(cdata, 'IPD_Control', tmp, ierr) if (ierr /= 0) then call ccpp_error('Unable to retrieve IPD_Control') return @@ -306,7 +306,7 @@ subroutine ipd_physics_step2_cap(ptr) bind(c) call c_f_pointer(ptr, cdata) - call ccpp_fields_get_ptr(cdata, 'IPD_Control', tmp, ierr) + call ccpp_fields_get(cdata, 'IPD_Control', tmp, ierr) if (ierr /= 0) then call ccpp_error('Unable to retrieve IPD_Control') return From dde882e5805261f2b54ba8ac8dc7ca1636eeec20 Mon Sep 17 00:00:00 2001 From: Laurie Date: Mon, 28 Aug 2017 10:39:57 -0600 Subject: [PATCH 4/5] Corrected call to ccpp_fields_get for PTR type modified: IPD_layer/IPD_driver_cap.f90 --- IPD_layer/IPD_driver_cap.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPD_layer/IPD_driver_cap.f90 b/IPD_layer/IPD_driver_cap.f90 index bbac32367..8a19864cd 100644 --- a/IPD_layer/IPD_driver_cap.f90 +++ b/IPD_layer/IPD_driver_cap.f90 @@ -243,7 +243,7 @@ subroutine ipd_physics_step1_cap(ptr) bind(c) call c_f_pointer(ptr, cdata) - call ccpp_fields_get(cdata, 'IPD_Control', tmp, ierr) + call ccpp_fields_get(cdata, 'IPD_Control', ptr, ierr) if (ierr /= 0) then call ccpp_error('Unable to retrieve IPD_Control') return @@ -306,7 +306,7 @@ subroutine ipd_physics_step2_cap(ptr) bind(c) call c_f_pointer(ptr, cdata) - call ccpp_fields_get(cdata, 'IPD_Control', tmp, ierr) + call ccpp_fields_get(cdata, 'IPD_Control', ptr, ierr) if (ierr /= 0) then call ccpp_error('Unable to retrieve IPD_Control') return From 58083a5f02e9fa037257c30494b697fcfa7662e4 Mon Sep 17 00:00:00 2001 From: Laurie Date: Wed, 4 Oct 2017 12:06:49 -0600 Subject: [PATCH 5/5] Reduce optimization for GFS_diagnostics.F90: reduces compilation time and eliminates compile failure for Intel >17.x M modified: makefile --- makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makefile b/makefile index 2a92e1523..e99aaf95b 100644 --- a/makefile +++ b/makefile @@ -173,6 +173,9 @@ $(LIBRARY): $(OBJS) ./radiation_aerosols.o : ./gfsphys/radiation_aerosols.f $(FC) $(FFLAGS) $(OTHER_FFLAGS) -xCORE-AVX-I -c $< -o $@ +./GFS_layer/GFS_diagnostics.o : ./GFS_layer/GFS_diagnostics.F90 + $(FC) $(FFLAGS) $(OTHER_FFLAGS) -O0 -c $< -o $@ + .PHONY: clean clean: @echo "Cleaning gfsphysics ... "