From a61bea6c69e4a8aed15ae36a40f13f1eb42abd47 Mon Sep 17 00:00:00 2001 From: Cheryl Craig Date: Wed, 18 Feb 2026 11:35:52 -0700 Subject: [PATCH 1/4] Add ccs_config for ifx compiler with CTSM and MOSART externals updated --- .gitmodules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index a14a9f2090..dbcd02c1f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -124,8 +124,8 @@ fxDONOTUSEurl = https://github.com/ESCOMP/RTM [submodule "mosart"] path = components/mosart -url = https://github.com/ESCOMP/MOSART -fxtag = mosart1.1.12 +url = https://github.com/billsacks/MOSART +fxtag = 7aa48b1 fxrequired = ToplevelRequired fxDONOTUSEurl = https://github.com/ESCOMP/MOSART @@ -139,7 +139,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.72 +fxtag = ccs_config_cesm1.0.75 fxrequired = ToplevelRequired fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git @@ -187,8 +187,8 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE [submodule "clm"] path = components/clm -url = https://github.com/ESCOMP/CTSM -fxtag = alpha-ctsm5.4.CMIP7.09.ctsm5.3.068 +url = https://github.com/billsacks/CTSM +fxtag = c7230f0 fxrequired = ToplevelRequired fxDONOTUSEurl = https://github.com/ESCOMP/CTSM From 9925df8235232d0dd81d44a5ca37f0a70ed41814 Mon Sep 17 00:00:00 2001 From: Haipeng Lin Date: Thu, 19 Feb 2026 12:06:16 -0500 Subject: [PATCH 2/4] Fixes for ifx compiler - division by zero in rrtmgp_inputs_cam.F90 --- src/physics/rrtmgp/rrtmgp_inputs_cam.F90 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/physics/rrtmgp/rrtmgp_inputs_cam.F90 b/src/physics/rrtmgp/rrtmgp_inputs_cam.F90 index 4b30630384..b4f2d47f67 100644 --- a/src/physics/rrtmgp/rrtmgp_inputs_cam.F90 +++ b/src/physics/rrtmgp/rrtmgp_inputs_cam.F90 @@ -198,11 +198,19 @@ subroutine rrtmgp_set_aer_sw( & ! set aerosol optical depth, clip to zero aer_sw%optical_props%tau(i,ktoprad:,:) = max(aer_tau(idxday(i),ktopcam:,:), 0._r8) ! set value of single scattering albedo - aer_sw%optical_props%ssa(i,ktoprad:,:) = merge(aer_tau_w(idxday(i),ktopcam:,:)/aer_tau(idxday(i),ktopcam:,:), & - 1._r8, aer_tau(idxday(i),ktopcam:,:) > 0._r8) + where (aer_tau(idxday(i),ktopcam:,:) > 0._r8) + aer_sw%optical_props%ssa(i,ktoprad:,:) = aer_tau_w(idxday(i),ktopcam:,:) & + / aer_tau(idxday(i),ktopcam:,:) + elsewhere + aer_sw%optical_props%ssa(i,ktoprad:,:) = 1._r8 + end where ! set value of asymmetry - aer_sw%optical_props%g(i,ktoprad:,:) = merge(aer_tau_w_g(idxday(i),ktopcam:,:)/aer_tau_w(idxday(i),ktopcam:,:), & - 0._r8, aer_tau_w(idxday(i),ktopcam:,:) > tiny) + where (aer_tau_w(idxday(i),ktopcam:,:) > tiny) + aer_sw%optical_props%g(i,ktoprad:,:) = aer_tau_w_g(idxday(i),ktopcam:,:) & + / aer_tau_w(idxday(i),ktopcam:,:) + elsewhere + aer_sw%optical_props%g(i,ktoprad:,:) = 0._r8 + end where end do ! impose limits on the components From 60bc7b097a0b5bd9fbc55f320f8293261f4d523f Mon Sep 17 00:00:00 2001 From: Haipeng Lin Date: Thu, 19 Feb 2026 13:14:08 -0500 Subject: [PATCH 3/4] Fixes for ifx compiler - zeroing out nan and fillvalues requires ensuring neither have nans first --- src/dynamics/se/dyn_comp.F90 | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/dynamics/se/dyn_comp.F90 b/src/dynamics/se/dyn_comp.F90 index bdddbf4df4..fd2d20ed09 100644 --- a/src/dynamics/se/dyn_comp.F90 +++ b/src/dynamics/se/dyn_comp.F90 @@ -2217,7 +2217,18 @@ subroutine read_dyn_field_2d(fieldname, fh, dimname, buffer) ! to NaN. In that case infld can return NaNs where the element GLL points ! are not "unique columns" ! Set NaNs or fillvalue points to zero - where (isnan(buffer) .or. (buffer==fillvalue)) buffer = 0.0_r8 + where (isnan(buffer)) + ! check for NaN first, as comparing NaN to fillvalue raises floating invalid. + buffer = 0.0_r8 + end where + + if (.not. isnan(fillvalue)) then + ! only compare against fillvalue if fillvalue is not NaN, otherwise the comparison + ! will raise floating invalid. + where (buffer == fillvalue) + buffer = 0.0_r8 + end where + end if end subroutine read_dyn_field_2d @@ -2247,7 +2258,18 @@ subroutine read_dyn_field_3d(fieldname, fh, dimname, buffer) ! to NaN. In that case infld can return NaNs where the element GLL points ! are not "unique columns" ! Set NaNs or fillvalue points to zero - where (isnan(buffer) .or. (buffer == fillvalue)) buffer = 0.0_r8 + where (isnan(buffer)) + ! check for NaN first, as comparing NaN to fillvalue raises floating invalid. + buffer = 0.0_r8 + end where + + if (.not. isnan(fillvalue)) then + ! only compare against fillvalue if fillvalue is not NaN, otherwise the comparison + ! will raise floating invalid. + where (buffer == fillvalue) + buffer = 0.0_r8 + end where + end if end subroutine read_dyn_field_3d From 8d8cc3d9d886ff7f627a2d05cfcd00f6edd9986f Mon Sep 17 00:00:00 2001 From: Haipeng Lin Date: Thu, 19 Feb 2026 17:52:03 -0500 Subject: [PATCH 4/4] Fixes for ifx compiler: mpi tag overflow in edyn_mpi The MPI_ibsend calls in edyn_mpi were generating MPI tags by concatenating the source and destination PE numbers which overflows the maximum MPI tag size (~65536) - the original tag numbers were around 10M (e.g., 12341235) Since communicators in mp_mag_jslot is scoped to the cols_comm sub-communicator for a single magnetic longitude column (up to nmagtaskj-1), there is no need for globally unique tags. The code has been updated to use sender rank number which is unique within the sub-communicator (tij) which is isrc at the receiver end. --- src/ionosphere/waccmx/edyn_mpi.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ionosphere/waccmx/edyn_mpi.F90 b/src/ionosphere/waccmx/edyn_mpi.F90 index c5eed873dd..c42ea2af42 100644 --- a/src/ionosphere/waccmx/edyn_mpi.F90 +++ b/src/ionosphere/waccmx/edyn_mpi.F90 @@ -1684,7 +1684,7 @@ subroutine mp_mag_jslot(fin,mlon00,mlon11,mlat00,mlat11, & integer :: ier,njneed,i,j,n,nj,idest, & icount,len,nlons,isrc,msgid,ifld,sndbuf_cntr integer :: tij ! rank in cols_comm (0 to nmagtaskj-1) - integer :: jhave(mxneed),njhave,wid + integer :: jhave(mxneed),njhave integer :: peersneed(mxneed,0:nmagtaskj-1) integer :: jneedall (mxneed,0:nmagtaskj-1) real(r8) :: sndbuf(mxmaglon+2,mxneed,nf,sndbuf_cntr_max) @@ -1730,7 +1730,6 @@ subroutine mp_mag_jslot(fin,mlon00,mlon11,mlat00,mlat11, & njhave = njhave+1 jhave(njhave) = peersneed(j,n) idest = n - wid = itask_table_geo(mytidi,idest) endif enddo if (njhave > 0) then @@ -1749,7 +1748,9 @@ subroutine mp_mag_jslot(fin,mlon00,mlon11,mlat00,mlat11, & enddo enddo len = nlons*njhave*nf - msgid = mytid+wid*10000 + ! sending tag uniquely identifies sender - tij is comm. rank + ! within this communicator only. + msgid = tij call mpi_ibsend(sndbuf(1:nlons,1:njhave,:,sndbuf_cntr),len,MPI_REAL8, & idest,msgid,cols_comm,ibsend_requests(sndbuf_cntr),ier) if (ier /= 0) & @@ -1783,7 +1784,8 @@ subroutine mp_mag_jslot(fin,mlon00,mlon11,mlat00,mlat11, & isrc = tasks(n)%magtidj ! task id in cols_comm to recv from nlons = mlon11-mlon00+1 len = nlons*njhave*nf - msgid = mytid*10000+n + ! receive tag is sender rank (tij from sender == magtidj) + msgid = isrc rcvbuf = 0._r8 call mpi_recv(rcvbuf(1:nlons,1:njhave,:),len,MPI_REAL8, & isrc,msgid,cols_comm,irstat,ier)