Skip to content

Commit

Permalink
replace use of master with main
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jan 9, 2023
1 parent 6d4c1ff commit 000c0dc
Show file tree
Hide file tree
Showing 35 changed files with 229 additions and 229 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Bump version
on:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/extbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name: extbuild

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the main branch
on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/srt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
name: scripts regression tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the main branch
on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- run: echo "PyYAML" > requirements.txt
- name: Install PyYAML
run: pip install -r requirements.txt
# use the latest cesm master
# use the latest cesm main
- name: cesm checkout
uses: actions/checkout@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions cesm/driver/ensemble_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Ensemble_driver

use shr_kind_mod , only : cl=>shr_kind_cl, cs=>shr_kind_cs
use shr_log_mod , only : shr_log_setLogUnit
use esm_utils_mod , only : mastertask, logunit, chkerr
use esm_utils_mod , only : maintask, logunit, chkerr

implicit none
private
Expand Down Expand Up @@ -250,15 +250,15 @@ subroutine SetModelServices(ensemble_driver, rc)
call NUOPC_CompAttributeGet(driver, name="logfile", value=logfile, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
open (newunit=logunit,file=trim(diro)//"/"//trim(logfile))
mastertask = .true.
maintask = .true.
else
logUnit = 6
mastertask = .false.
maintask = .false.
endif
call shr_log_setLogUnit (logunit)

! Create a clock for each driver instance
call esm_time_clockInit(ensemble_driver, driver, logunit, mastertask, rc)
call esm_time_clockInit(ensemble_driver, driver, logunit, maintask, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

endif
Expand Down
16 changes: 8 additions & 8 deletions cesm/driver/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module ESM
use shr_mpi_mod , only : shr_mpi_bcast
use shr_mem_mod , only : shr_mem_init
use shr_log_mod , only : shr_log_setLogunit
use esm_utils_mod, only : logunit, mastertask, dbug_flag, chkerr
use esm_utils_mod, only : logunit, maintask, dbug_flag, chkerr
use perf_mod , only : t_initf, t_setLogUnit

implicit none
Expand Down Expand Up @@ -154,9 +154,9 @@ subroutine SetModelServices(driver, rc)
call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (localPet == 0) then
mastertask=.true.
maintask=.true.
else
mastertask = .false.
maintask = .false.
end if

!-------------------------------------------
Expand Down Expand Up @@ -206,15 +206,15 @@ subroutine SetModelServices(driver, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

! Memory test
if (mastertask) then
if (maintask) then
call shr_mem_init(strbuf=meminitstr)
write(logunit,*) trim(meminitstr)
end if

!-------------------------------------------
! Timer initialization (has to be after pelayouts are determined)
!-------------------------------------------
call t_initf('drv_in', LogPrint=.true., LogUnit=logunit, mpicom=global_comm, mastertask=mastertask, MaxThreads=maxthreads)
call t_initf('drv_in', LogPrint=.true., LogUnit=logunit, mpicom=global_comm, maintask=maintask, MaxThreads=maxthreads)

call ESMF_LogWrite(trim(subname)//": done", ESMF_LOGMSG_INFO)

Expand Down Expand Up @@ -301,7 +301,7 @@ subroutine pretty_print_nuopc_freeformat(ffstuff, label, rc)

rc = ESMF_SUCCESS

if (mastertask .or. dbug_flag > 3) then
if (maintask .or. dbug_flag > 3) then
write(logunit, *) 'BEGIN: ', trim(label)
call NUOPC_FreeFormatGet(ffstuff, linecount=linecnt, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
Expand Down Expand Up @@ -467,7 +467,7 @@ subroutine InitAttributes(driver, rc)
call NUOPC_CompAttributeGet(driver, name="tfreeze_option", value=tfreeze_option, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

call shr_frz_freezetemp_init(tfreeze_option, mastertask)
call shr_frz_freezetemp_init(tfreeze_option, maintask)

call NUOPC_CompAttributeGet(driver, name='cpl_rootpe', value=cvalue, rc=rc)
read(cvalue, *) rootpe_med
Expand Down Expand Up @@ -1519,7 +1519,7 @@ subroutine esm_finalize(driver, rc)

rc = ESMF_SUCCESS

if (mastertask) then
if (maintask) then
write(logunit,*)' SUCCESSFUL TERMINATION OF CESM'
end if

Expand Down
18 changes: 9 additions & 9 deletions cesm/driver/esm_time_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ module esm_time_mod
contains
!===============================================================================

subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastertask, rc)
subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, maintask, rc)

! input/output variables
type(ESMF_GridComp) :: ensemble_driver, instance_driver
integer, intent(in) :: logunit
logical, intent(in) :: mastertask
logical, intent(in) :: maintask
integer, intent(out) :: rc

! local variables
Expand Down Expand Up @@ -142,7 +142,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert

restart_pfile = trim(restart_file)//inst_suffix

if (mastertask) then
if (maintask) then
call ESMF_LogWrite(trim(subname)//" read rpointer file = "//trim(restart_pfile), &
ESMF_LOGMSG_INFO)
open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old',iostat=ierr)
Expand All @@ -160,7 +160,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
return
end if
close(unitn)
if (mastertask) then
if (maintask) then
write(logunit,'(a)') trim(subname)//" reading driver restart from file = "//trim(restart_file)
end if
call esm_time_read_restart(restart_file, start_ymd, start_tod, curr_ymd, curr_tod, rc)
Expand All @@ -177,7 +177,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert

else

if (mastertask) then
if (maintask) then
write(logunit,*) ' NOTE: the current compset has no mediator - which provides the clock restart information'
write(logunit,*) ' In this case the restarts are handled solely by the component being used and'
write(logunit,*) ' and the driver clock will always be starting from the initial date on restart'
Expand All @@ -200,7 +200,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
call ESMF_TimeSet( StartTime, yy=yr, mm=mon, dd=day, s=start_tod, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

if(mastertask) then
if(maintask) then
write(tmpstr,'(i10)') start_ymd
call ESMF_LogWrite(trim(subname)//': driver start_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver start_ymd: '// trim(tmpstr)
Expand All @@ -214,7 +214,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
call ESMF_TimeSet( CurrTime, yy=yr, mm=mon, dd=day, s=curr_tod, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

if(mastertask) then
if(maintask) then
write(tmpstr,'(i10)') curr_ymd
call ESMF_LogWrite(trim(subname)//': driver curr_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver curr_ymd: '// trim(tmpstr)
Expand Down Expand Up @@ -267,7 +267,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
read(cvalue,*) glc_avg_period

dtime_drv = minval((/atm_cpl_dt, lnd_cpl_dt, ocn_cpl_dt, ice_cpl_dt, glc_cpl_dt, rof_cpl_dt, wav_cpl_dt/))
if(mastertask) then
if(maintask) then
write(tmpstr,'(i10)') dtime_drv
call ESMF_LogWrite(trim(subname)//': driver time interval is : '// trim(tmpstr), ESMF_LOGMSG_INFO, rc=rc)
write(logunit,*) trim(subname)//': driver time interval is : '// trim(tmpstr)
Expand Down Expand Up @@ -314,7 +314,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
stop_tod = 0
endif

if (mastertask) then
if (maintask) then
write(tmpstr,'(i10)') stop_ymd
call ESMF_LogWrite(trim(subname)//': driver stop_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver stop_ymd: '// trim(tmpstr)
Expand Down
12 changes: 6 additions & 6 deletions cesm/nuopc_cap_share/driver_pio_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module driver_pio_mod
logical, allocatable :: pio_async_interface(:)

integer :: total_comps
logical :: mastertask
logical :: maintask
#define DEBUGI 1

#ifdef DEBUGI
Expand Down Expand Up @@ -72,15 +72,15 @@ subroutine driver_pio_init(driver, rc)

call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
mastertask = (localPet == 0)
maintask = (localPet == 0)

call NUOPC_CompAttributeGet(driver, name="pio_buffer_size_limit", value=cname, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
read(cname,*) pio_buffer_size_limit

! 0 is a valid value of pio_buffer_size_limit
if(pio_buffer_size_limit>=0) then
if(mastertask) write(shr_log_unit,*) 'Setting pio_buffer_size_limit : ',pio_buffer_size_limit
if(maintask) write(shr_log_unit,*) 'Setting pio_buffer_size_limit : ',pio_buffer_size_limit
call pio_set_buffer_size_limit(pio_buffer_size_limit)
endif

Expand All @@ -89,7 +89,7 @@ subroutine driver_pio_init(driver, rc)
read(cname, *) pio_blocksize

if(pio_blocksize>0) then
if(mastertask) write(shr_log_unit,*) 'Setting pio_blocksize : ',pio_blocksize
if(maintask) write(shr_log_unit,*) 'Setting pio_blocksize : ',pio_blocksize
call pio_set_blocksize(pio_blocksize)
endif

Expand All @@ -98,7 +98,7 @@ subroutine driver_pio_init(driver, rc)
read(cname, *) pio_debug_level

if(pio_debug_level > 0) then
if(mastertask) write(shr_log_unit,*) 'Setting pio_debug_level : ',pio_debug_level
if(maintask) write(shr_log_unit,*) 'Setting pio_debug_level : ',pio_debug_level
ret = pio_set_log_level(pio_debug_level)
endif

Expand Down Expand Up @@ -145,7 +145,7 @@ subroutine driver_pio_init(driver, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
read(cname, *) pio_rearr_opts%comm_fc_opts_io2comp%max_pend_req

if(mastertask) then
if(maintask) then
! Log the rearranger options
write(shr_log_unit, *) "PIO rearranger options:"
write(shr_log_unit, *) " comm type = ", pio_rearr_opts%comm_type, " (",trim(pio_rearr_comm_type),")"
Expand Down
2 changes: 1 addition & 1 deletion cesm/nuopc_cap_share/esm_utils_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module esm_utils_mod
implicit none
public

logical :: mastertask
logical :: maintask
integer :: logunit
integer :: dbug_flag = 0

Expand Down
12 changes: 6 additions & 6 deletions cesm/nuopc_cap_share/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ module nuopc_shr_methods
contains
!===============================================================================

subroutine memcheck(string, level, mastertask)
subroutine memcheck(string, level, maintask)

! input/output variables
character(len=*) , intent(in) :: string
integer , intent(in) :: level
logical , intent(in) :: mastertask
logical , intent(in) :: maintask

! local variables
integer :: ierr
Expand All @@ -90,7 +90,7 @@ subroutine memcheck(string, level, mastertask)
!-----------------------------------------------------------------------

#ifdef CESMCOUPLED
if ((mastertask .and. memdebug_level > level) .or. memdebug_level > level+1) then
if ((maintask .and. memdebug_level > level) .or. memdebug_level > level+1) then
ierr = GPTLprint_memusage(string)
endif
#endif
Expand Down Expand Up @@ -131,11 +131,11 @@ end subroutine get_component_instance

!===============================================================================

subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc)
subroutine set_component_logging(gcomp, maintask, logunit, shrlogunit, rc)
use driver_pio_mod, only : driver_pio_log_comp_settings
! input/output variables
type(ESMF_GridComp) :: gcomp
logical, intent(in) :: mastertask
logical, intent(in) :: maintask
integer, intent(out) :: logunit
integer, intent(out) :: shrlogunit
integer, intent(out) :: rc
Expand All @@ -149,7 +149,7 @@ subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc)

rc = ESMF_SUCCESS

if (mastertask) then
if (maintask) then
call NUOPC_CompAttributeGet(gcomp, name="diro", value=diro, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call NUOPC_CompAttributeGet(gcomp, name="logfile", value=logfile, rc=rc)
Expand Down
4 changes: 2 additions & 2 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</entry>

<!-- ===================================================================== -->
<!-- master configuration file that specifies all relevant filenames and -->
<!-- main configuration file that specifies all relevant filenames and -->
<!-- and directories to configure a case -->
<!-- ===================================================================== -->

Expand All @@ -54,7 +54,7 @@
<default_value>$CIMEROOT/config_files.xml</default_value>
<group>case_def</group>
<file>env_case.xml</file>
<desc> master configuration file that specifies all relevant filenames
<desc> main configuration file that specifies all relevant filenames
and directories to configure a case</desc>
</entry>

Expand Down
2 changes: 1 addition & 1 deletion doc/source/addendum/req_attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Scalar attributes
between the mediator and a component. Currently scalar values are
put into a field bundle that only contains an undistributed
dimension equal to the size of ``ScalarFieldCount`` and communicated
between the component and the mediator on the `master task` of each
between the component and the mediator on the `main task` of each
component.

**ScalarFieldName** (required)
Expand Down
Loading

0 comments on commit 000c0dc

Please sign in to comment.