Skip to content

Commit

Permalink
eCLM-PDAF related changes concerning cpl_inst_tag (HPSCTerrSys#46)
Browse files Browse the repository at this point in the history
- PDAF: `cpl_inst_tag = ""` when `USE_PDAF` is true
- PDAF: add error message for unsupported `num_inst_driver > 1`
- use clear `#ifdef` inside single conditions
- add an error if `pdaf_id` or `pdaf_max` not present
  • Loading branch information
jjokella authored Oct 18, 2024
1 parent 4582f14 commit c984ada
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/eclm/cime_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -658,16 +658,26 @@ subroutine cime_pre_init1(esmf_log_option)
! if (Global_comm /= MPI_COMM_NULL) then

if (num_inst_driver > 1) then
#ifdef USE_PDAF
call shr_sys_abort( subname//':: num_inst_driver > 1'// &
' not supported for PDAF' )
#else
call seq_comm_init(global_comm, driver_comm, NLFileName, drv_comm_ID=driver_id)
write(cpl_inst_tag,'("_",i4.4)') driver_id
#ifdef USE_PDAF
else if (present(pdaf_id) .and. present(pdaf_max)) then
call seq_comm_init(global_comm, driver_comm, NLFileName, &
pdaf_id=pdaf_id, pdaf_max=pdaf_max)
#endif
else
#ifdef USE_PDAF
if (present(pdaf_id) .and. present(pdaf_max)) then
call seq_comm_init(global_comm, driver_comm, NLFileName, pdaf_id=pdaf_id, pdaf_max=pdaf_max)
cpl_inst_tag = ''
else
call shr_sys_abort( subname//':: pdaf_id and pdaf_max'// &
' have to be present for PDAF' )
end if
#else
call seq_comm_init(global_comm, driver_comm, NLFileName)
cpl_inst_tag = ''
#endif
end if

!--- set task based threading counts ---
Expand Down

0 comments on commit c984ada

Please sign in to comment.