From ca680587e98f5a770e6a8f27e662589f86953f77 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Wed, 15 Apr 2020 09:14:28 -0500 Subject: [PATCH 1/2] Porting to Orion --- ccpp/build_ccpp.sh | 2 +- ccpp/set_compilers.sh | 7 +++++ gfsphysics/GFS_layer/GFS_driver.F90 | 26 +++++++++---------- gfsphysics/GFS_layer/GFS_physics_driver.F90 | 26 +++++++++---------- gfsphysics/GFS_layer/GFS_radiation_driver.F90 | 26 +++++++++---------- 5 files changed, 47 insertions(+), 40 deletions(-) diff --git a/ccpp/build_ccpp.sh b/ccpp/build_ccpp.sh index b5b8c53d7..c8512a2e1 100755 --- a/ccpp/build_ccpp.sh +++ b/ccpp/build_ccpp.sh @@ -5,7 +5,7 @@ set -eu # List of valid/tested machines VALID_MACHINES=( wcoss_cray wcoss_dell_p3 gaea.intel jet.intel \ - hera.intel hera.gnu \ + hera.intel hera.gnu orion.intel \ cheyenne.intel cheyenne.intel-impi cheyenne.gnu cheyenne.pgi endeavor.intel \ stampede.intel supermuc_phase2.intel macosx.gnu \ linux.intel linux.gnu linux.pgi ) diff --git a/ccpp/set_compilers.sh b/ccpp/set_compilers.sh index 5d797a161..8efe19dfe 100755 --- a/ccpp/set_compilers.sh +++ b/ccpp/set_compilers.sh @@ -46,6 +46,13 @@ case "$MACHINE_ID" in export F77=mpif77 export F90=mpif90 ;; + orion.intel) + export CC=mpiicc + export CXX=mpiicpc + export FC=mpiifort + export F77=mpiifort + export F90=mpiifort + ;; cheyenne.intel) export CC=mpicc export CXX=mpicxx diff --git a/gfsphysics/GFS_layer/GFS_driver.F90 b/gfsphysics/GFS_layer/GFS_driver.F90 index c75f7dec9..ca6c56e28 100644 --- a/gfsphysics/GFS_layer/GFS_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_driver.F90 @@ -705,7 +705,7 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, & ! Since IPD_func0d_proc declares all arguments as intent(inout), we ! need to do the same here - however, this way we are loosing the ! valuable information on the actual intent to this routine. *DH -#ifdef __GFORTRAN__ +!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -716,18 +716,18 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -#else - type(GFS_control_type), intent(in ) :: Model - type(GFS_statein_type), intent(in ) :: Statein - type(GFS_stateout_type), intent(in ) :: Stateout - type(GFS_sfcprop_type), intent(in ) :: Sfcprop - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in ) :: Grid - type(GFS_tbd_type), intent(in ) :: Tbd - type(GFS_cldprop_type), intent(in ) :: Cldprop - type(GFS_radtend_type), intent(in ) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag -#endif +!#else +! type(GFS_control_type), intent(in ) :: Model +! type(GFS_statein_type), intent(in ) :: Statein +! type(GFS_stateout_type), intent(in ) :: Stateout +! type(GFS_sfcprop_type), intent(in ) :: Sfcprop +! type(GFS_coupling_type), intent(inout) :: Coupling +! type(GFS_grid_type), intent(in ) :: Grid +! type(GFS_tbd_type), intent(in ) :: Tbd +! type(GFS_cldprop_type), intent(in ) :: Cldprop +! type(GFS_radtend_type), intent(in ) :: Radtend +! type(GFS_diag_type), intent(inout) :: Diag +!#endif !--- local variables integer :: k, i real(kind=kind_phys) :: upert, vpert, tpert, qpert, qnew,sppt_vwt diff --git a/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/gfsphysics/GFS_layer/GFS_physics_driver.F90 index 1929f030b..4acabb06e 100644 --- a/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -451,7 +451,7 @@ subroutine GFS_physics_driver & ! Since IPD_func0d_proc declares all arguments as intent(inout), we ! need to do the same here - however, this way we are loosing the ! valuable information on the actual intent to this routine. *DH -#ifdef __GFORTRAN__ +!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -462,18 +462,18 @@ subroutine GFS_physics_driver & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -#else - type(GFS_control_type), intent(in) :: Model - type(GFS_statein_type), intent(inout) :: Statein - type(GFS_stateout_type), intent(inout) :: Stateout - type(GFS_sfcprop_type), intent(inout) :: Sfcprop - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_tbd_type), intent(inout) :: Tbd - type(GFS_cldprop_type), intent(inout) :: Cldprop - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag -#endif +!#else +! type(GFS_control_type), intent(in) :: Model +! type(GFS_statein_type), intent(inout) :: Statein +! type(GFS_stateout_type), intent(inout) :: Stateout +! type(GFS_sfcprop_type), intent(inout) :: Sfcprop +! type(GFS_coupling_type), intent(inout) :: Coupling +! type(GFS_grid_type), intent(in) :: Grid +! type(GFS_tbd_type), intent(inout) :: Tbd +! type(GFS_cldprop_type), intent(inout) :: Cldprop +! type(GFS_radtend_type), intent(inout) :: Radtend +! type(GFS_diag_type), intent(inout) :: Diag +!#endif ! !## CCPP ## Note: Variables defined locally in this file for temporary calculations ! or transfer of data between schemes are defined in gfsphysics/GFS_layer/GFS_typedefs.F90 diff --git a/gfsphysics/GFS_layer/GFS_radiation_driver.F90 b/gfsphysics/GFS_layer/GFS_radiation_driver.F90 index dad425a73..bceae3183 100644 --- a/gfsphysics/GFS_layer/GFS_radiation_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_radiation_driver.F90 @@ -1033,7 +1033,7 @@ subroutine GFS_radiation_driver & ! Since IPD_func0d_proc declares all arguments as intent(inout), we ! need to do the same here - however, this way we are loosing the ! valuable information on the actual intent to this routine. *DH -#ifdef __GFORTRAN__ +!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -1044,18 +1044,18 @@ subroutine GFS_radiation_driver & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -#else - type(GFS_control_type), intent(in) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_stateout_type), intent(inout) :: Stateout - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag -#endif +!#else +! type(GFS_control_type), intent(in) :: Model +! type(GFS_statein_type), intent(in) :: Statein +! type(GFS_stateout_type), intent(inout) :: Stateout +! type(GFS_sfcprop_type), intent(in) :: Sfcprop +! type(GFS_coupling_type), intent(inout) :: Coupling +! type(GFS_grid_type), intent(in) :: Grid +! type(GFS_tbd_type), intent(in) :: Tbd +! type(GFS_cldprop_type), intent(in) :: Cldprop +! type(GFS_radtend_type), intent(inout) :: Radtend +! type(GFS_diag_type), intent(inout) :: Diag +!#endif ! ================= subprogram documentation block ================ ! ! ! From cfa3c5dbdff86fcc4c50b02f216b7b5b9df840a6 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Mon, 20 Apr 2020 09:29:26 -0500 Subject: [PATCH 2/2] Remove old comments/code related to arguments mismatch (ifdef __GFORTRAN__) --- gfsphysics/GFS_layer/GFS_driver.F90 | 23 +------------------ gfsphysics/GFS_layer/GFS_physics_driver.F90 | 22 ------------------ gfsphysics/GFS_layer/GFS_radiation_driver.F90 | 22 ------------------ 3 files changed, 1 insertion(+), 66 deletions(-) diff --git a/gfsphysics/GFS_layer/GFS_driver.F90 b/gfsphysics/GFS_layer/GFS_driver.F90 index ca6c56e28..a3918a59d 100644 --- a/gfsphysics/GFS_layer/GFS_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_driver.F90 @@ -696,16 +696,6 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, & implicit none !--- interface variables -! DH* gfortran correctly throws an error if the intent() declarations -! for arguments differ between the actual routine (here) and the dummy -! interface routine (IPD_func0d_proc in IPD_typedefs.F90): -! -! Error: Interface mismatch in procedure pointer assignment at (1): INTENT mismatch in argument 'control' -! -! Since IPD_func0d_proc declares all arguments as intent(inout), we -! need to do the same here - however, this way we are loosing the -! valuable information on the actual intent to this routine. *DH -!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -716,18 +706,7 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -!#else -! type(GFS_control_type), intent(in ) :: Model -! type(GFS_statein_type), intent(in ) :: Statein -! type(GFS_stateout_type), intent(in ) :: Stateout -! type(GFS_sfcprop_type), intent(in ) :: Sfcprop -! type(GFS_coupling_type), intent(inout) :: Coupling -! type(GFS_grid_type), intent(in ) :: Grid -! type(GFS_tbd_type), intent(in ) :: Tbd -! type(GFS_cldprop_type), intent(in ) :: Cldprop -! type(GFS_radtend_type), intent(in ) :: Radtend -! type(GFS_diag_type), intent(inout) :: Diag -!#endif + !--- local variables integer :: k, i real(kind=kind_phys) :: upert, vpert, tpert, qpert, qnew,sppt_vwt diff --git a/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/gfsphysics/GFS_layer/GFS_physics_driver.F90 index 739016e56..ab92b7ebc 100644 --- a/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -442,16 +442,6 @@ subroutine GFS_physics_driver & implicit none ! ! --- interface variables -! DH* gfortran correctly throws an error if the intent() declarations -! for arguments differ between the actual routine (here) and the dummy -! interface routine (IPD_func0d_proc in IPD_typedefs.F90): -! -! Error: Interface mismatch in procedure pointer assignment at (1): INTENT mismatch in argument 'control' -! -! Since IPD_func0d_proc declares all arguments as intent(inout), we -! need to do the same here - however, this way we are loosing the -! valuable information on the actual intent to this routine. *DH -!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -462,18 +452,6 @@ subroutine GFS_physics_driver & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -!#else -! type(GFS_control_type), intent(in) :: Model -! type(GFS_statein_type), intent(inout) :: Statein -! type(GFS_stateout_type), intent(inout) :: Stateout -! type(GFS_sfcprop_type), intent(inout) :: Sfcprop -! type(GFS_coupling_type), intent(inout) :: Coupling -! type(GFS_grid_type), intent(in) :: Grid -! type(GFS_tbd_type), intent(inout) :: Tbd -! type(GFS_cldprop_type), intent(inout) :: Cldprop -! type(GFS_radtend_type), intent(inout) :: Radtend -! type(GFS_diag_type), intent(inout) :: Diag -!#endif ! !## CCPP ## Note: Variables defined locally in this file for temporary calculations ! or transfer of data between schemes are defined in gfsphysics/GFS_layer/GFS_typedefs.F90 diff --git a/gfsphysics/GFS_layer/GFS_radiation_driver.F90 b/gfsphysics/GFS_layer/GFS_radiation_driver.F90 index bceae3183..b68d49861 100644 --- a/gfsphysics/GFS_layer/GFS_radiation_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_radiation_driver.F90 @@ -1024,16 +1024,6 @@ subroutine GFS_radiation_driver & implicit none -! DH* gfortran correctly throws an error if the intent() declarations -! for arguments differ between the actual routine (here) and the dummy -! interface routine (IPD_func0d_proc in IPD_typedefs.F90): -! -! Error: Interface mismatch in procedure pointer assignment at (1): INTENT mismatch in argument 'control' -! -! Since IPD_func0d_proc declares all arguments as intent(inout), we -! need to do the same here - however, this way we are loosing the -! valuable information on the actual intent to this routine. *DH -!#ifdef __GFORTRAN__ type(GFS_control_type), intent(inout) :: Model type(GFS_statein_type), intent(inout) :: Statein type(GFS_stateout_type), intent(inout) :: Stateout @@ -1044,18 +1034,6 @@ subroutine GFS_radiation_driver & type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_diag_type), intent(inout) :: Diag -!#else -! type(GFS_control_type), intent(in) :: Model -! type(GFS_statein_type), intent(in) :: Statein -! type(GFS_stateout_type), intent(inout) :: Stateout -! type(GFS_sfcprop_type), intent(in) :: Sfcprop -! type(GFS_coupling_type), intent(inout) :: Coupling -! type(GFS_grid_type), intent(in) :: Grid -! type(GFS_tbd_type), intent(in) :: Tbd -! type(GFS_cldprop_type), intent(in) :: Cldprop -! type(GFS_radtend_type), intent(inout) :: Radtend -! type(GFS_diag_type), intent(inout) :: Diag -!#endif ! ================= subprogram documentation block ================ ! ! !