Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with MPI Allreduce buffers in the MPAS components #392

Merged
merged 2 commits into from
Oct 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions components/mpas-cice/driver/ice_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ subroutine ice_init_mct( EClock, cdata_i, x2i_i, i2x_i, NLFilename )!{{{
character(len=StrKIND) :: cpl_seq_option

type (MPAS_Time_Type) :: currTime
integer :: iam,ierr
integer :: iam, ierr, ierr_local
integer :: iyear0, imonth0
character(len=StrKIND) :: starttype ! infodata start type
character(len=StrKIND) :: timeStamp
Expand Down Expand Up @@ -177,6 +177,7 @@ subroutine ice_init_mct( EClock, cdata_i, x2i_i, i2x_i, NLFilename )!{{{

logical, pointer :: tempLogicalConfig
character(len=StrKIND), pointer :: tempCharConfig
real (kind=RKIND), pointer :: tempRealConfig

interface
subroutine xml_stream_parser(xmlname, mgr_p, comm, ierr) bind(c)
Expand Down Expand Up @@ -553,8 +554,8 @@ end subroutine xml_stream_get_attributes
write (stderrUnit,*) 'Applying ICE coupling dt (s) of: ', ice_cpl_dt

! Verify the mpas time step fits into a coupling interval
call mpas_pool_get_config(domain % configs, 'config_dt', tempCharConfig)
call mpas_set_timeInterval(denInterval, timeString=tempCharConfig, ierr=ierr)
call mpas_pool_get_config(domain % configs, 'config_dt', tempRealConfig)
call mpas_set_timeInterval(denInterval, dt=tempRealConfig, ierr=ierr)
call mpas_set_timeInterval(zeroInterval, S=0, ierr=ierr)
call mpas_interval_division(start_time, alarmTimeStep, denInterval, numDivs, remInterval)

Expand All @@ -563,7 +564,8 @@ end subroutine xml_stream_get_attributes
if ( alarmTimeStep < denInterval ) then
ierr = 1
end if
call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand All @@ -577,7 +579,8 @@ end subroutine xml_stream_get_attributes
ierr = 1
end if

call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand Down
8 changes: 5 additions & 3 deletions components/mpas-o/driver/ocn_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )!{{{
character(len=StrKIND) :: cpl_seq_option

type (MPAS_Time_Type) :: currTime
integer :: iam,ierr
integer :: iam, ierr, ierr_local
integer :: iyear0, imonth0
character(len=StrKIND) :: starttype ! infodata start type
character(len=StrKIND) :: timeStamp
Expand Down Expand Up @@ -577,7 +577,8 @@ end subroutine xml_stream_get_attributes
if ( alarmTimeStep < denInterval ) then
ierr = 1
end if
call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand All @@ -591,7 +592,8 @@ end subroutine xml_stream_get_attributes
ierr = 1
end if

call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand Down
8 changes: 5 additions & 3 deletions components/mpasli/driver/glc_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ subroutine glc_init_mct( EClock, cdata_g, x2g_g, g2x_g, NLFilename )!{{{
character(len=StrKIND) :: cpl_seq_option

type (MPAS_Time_Type) :: currTime
integer :: iam,ierr
integer :: iam, ierr, ierr_local
integer :: iyear0, imonth0
character(len=StrKIND) :: starttype ! infodata start type
character(len=StrKIND) :: timeStamp
Expand Down Expand Up @@ -570,7 +570,8 @@ end subroutine xml_stream_get_attributes
if ( alarmTimeStep < denInterval ) then
ierr = 1
end if
call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand All @@ -584,7 +585,8 @@ end subroutine xml_stream_get_attributes
ierr = 1
end if

call mpas_dmpar_max_int(domain % dminfo, ierr, ierr)
ierr_local = ierr
call mpas_dmpar_max_int(domain % dminfo, ierr_local, ierr)

if ( ierr == 1 ) then
write(stderrUnit, *) ' ERROR: Coupling interval is: ', trim(coupleTimeStamp)
Expand Down
2 changes: 1 addition & 1 deletion components/mpasli/model
Submodule model updated from d5ef57 to 28f7c5