Skip to content

Commit

Permalink
Add scream system workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca authored and dqwu committed Jul 27, 2024
1 parent 19a53ec commit ccf8f1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(SCC "cc")
set(SCXX "hipcc")
set(SFC "ftn")

string(APPEND CPPDEFS " -DLINUX")
string(APPEND CPPDEFS " -DLINUX -DSCREAM_SYSTEM_WORKAROUND=1")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
Expand Down
15 changes: 10 additions & 5 deletions components/elm/src/biogeochem/FireDataBaseType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ module FireDataBaseType
!
! !USES:
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_CL
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
use shr_strdata_mod , only : shr_strdata_type, shr_strdata_create, shr_strdata_print
use shr_strdata_mod , only : shr_strdata_advance
#else
use shr_strdata_mod , only : shr_strdata_type
#endif
use shr_log_mod , only : errMsg => shr_log_errMsg
use elm_varctl , only : iulog, inst_name
use spmdMod , only : masterproc, mpicom, comp_id
Expand All @@ -35,7 +40,7 @@ module FireDataBaseType
real(r8), public, pointer :: forc_hdm(:) ! Human population density

real(r8), public, pointer :: gdp_lf_col(:) ! col global real gdp data (k US$/capita)
#ifdef CCE_17_COMPILER_BUG_FIXED
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
type(shr_strdata_type), private :: sdat_hdm ! Human population density input data stream
type(shr_strdata_type), private :: sdat_lnfm ! Lightning input data stream
#endif
Expand Down Expand Up @@ -218,7 +223,7 @@ subroutine hdm_init( this, bounds, NLFilename )
endif

call elm_domain_mct (bounds, dom_elm)
#ifdef CCE_17_COMPILER_BUG_FIXED
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
call shr_strdata_create(this%sdat_hdm,name="clmhdm", &
pio_subsystem=pio_subsystem, &
pio_iotype=shr_pio_getiotype(inst_name), &
Expand Down Expand Up @@ -281,7 +286,7 @@ subroutine hdm_interp( this, bounds )

call get_curr_date(year, mon, day, sec)
mcdate = year*10000 + mon*100 + day
#ifdef CCE_17_COMPILER_BUG_FIXED
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
call shr_strdata_advance(this%sdat_hdm, mcdate, sec, mpicom, 'hdmdyn')

ig = 0
Expand Down Expand Up @@ -374,7 +379,7 @@ subroutine lnfm_init( this, bounds, NLFilename )
endif

call elm_domain_mct (bounds, dom_elm)
#ifdef CCE_17_COMPILER_BUG_FIXED
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
call shr_strdata_create(this%sdat_lnfm,name="clmlnfm", &
pio_subsystem=pio_subsystem, &
pio_iotype=shr_pio_getiotype(inst_name), &
Expand Down Expand Up @@ -437,7 +442,7 @@ subroutine lnfm_interp(this, bounds )

call get_curr_date(year, mon, day, sec)
mcdate = year*10000 + mon*100 + day
#ifdef CCE_17_COMPILER_BUG_FIXED
#if !defined SCREAM_SYSTEM_WORKAROUND || SCREAM_SYSTEM_WORKAROUND != 1
call shr_strdata_advance(this%sdat_lnfm, mcdate, sec, mpicom, 'lnfmdyn')

ig = 0
Expand Down

0 comments on commit ccf8f1e

Please sign in to comment.