Skip to content

Commit

Permalink
Merge branch 'ndk/cam/fix-add-tmp-arrays-use-ncol' into next (PR #1521)
Browse files Browse the repository at this point in the history
Fixes tmp_array size to avoid array mismatch found by GNU

This is a fix to a PR #1501 (github issue #1263).
 I allocated the tmp_array to be too large and GNU compiler stopped
 with  an array mismatch.
 Change this to be state%ncol in size, not pcol

 Fixes #1263

[BFB]

* ndk/cam/fix-add-tmp-arrays-use-ncol:
  This is a fix to a PR #1501 (github issue #1263). I allocated the
  tmp_array to be too large and GNU compiler stopped with an array
  mismatch. Change this to be state%ncol in size, not pcol Add a
  more reasonable pe layout for the a%ne30np4 grid for cori-knl.
  May not be optimal, but allows for testing.
  • Loading branch information
singhbalwinder committed May 10, 2017
2 parents fac20f3 + cf9e47a commit cee0ac4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions cime/config/acme/allactive/config_pesall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5762,6 +5762,43 @@
</pes>
</mach>
</grid>
<grid name="a%ne30np4">
<mach name="cori-knl">
<pes compset="CAM5.+CLM45.+MPASCICE.+MPASO.+MOSART.+SGLC.+SWAV" pesize="any">
<comment>"first attempt for testing"</comment>
<ntasks>
<ntasks_atm>5400</ntasks_atm>
<ntasks_lnd>640</ntasks_lnd>
<ntasks_rof>640</ntasks_rof>
<ntasks_ice>4800</ntasks_ice>
<ntasks_ocn>3600</ntasks_ocn>
<ntasks_glc>640</ntasks_glc>
<ntasks_wav>4800</ntasks_wav>
<ntasks_cpl>4800</ntasks_cpl>
</ntasks>
<nthrds>
<nthrds_atm>1</nthrds_atm>
<nthrds_lnd>1</nthrds_lnd>
<nthrds_rof>1</nthrds_rof>
<nthrds_ice>1</nthrds_ice>
<nthrds_ocn>1</nthrds_ocn>
<nthrds_glc>1</nthrds_glc>
<nthrds_wav>1</nthrds_wav>
<nthrds_cpl>1</nthrds_cpl>
</nthrds>
<rootpe>
<rootpe_atm>0</rootpe_atm>
<rootpe_lnd>4800</rootpe_lnd>
<rootpe_rof>4800</rootpe_rof>
<rootpe_ice>0</rootpe_ice>
<rootpe_ocn>5440</rootpe_ocn>
<rootpe_glc>4800</rootpe_glc>
<rootpe_wav>0</rootpe_wav>
<rootpe_cpl>0</rootpe_cpl>
</rootpe>
</pes>
</mach>
</grid>
<grid name="any">
<mach name="cori-haswell">
<pes compset="CAM5.+CLM45.+MPASCICE.+MPASO.+MOSART.+SGLC.+SWAV" pesize="any">
Expand Down
2 changes: 1 addition & 1 deletion components/cam/src/physics/cam/clubb_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ subroutine clubb_tend_cam( &
real(r8) :: es(pcols,pver)
real(r8) :: qs(pcols,pver)
real(r8) :: gam(pcols,pver)
real(r8) :: tmp_array(pcols,pverp)
real(r8) :: tmp_array(state%ncol,pverp)
real(r8) :: bfact, orgparam, delpavg
character(len=6) :: choice_radf

Expand Down
2 changes: 1 addition & 1 deletion components/cam/src/physics/cam/hetfrz_classnuc_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ subroutine hetfrz_classnuc_cam_calc( &
real(r8) :: numice10s(pcols,pver)
real(r8) :: numice10s_imm_dst(pcols,pver)
real(r8) :: numice10s_imm_bc(pcols,pver)
real(r8) :: tmp_array(pcols,pver)
real(r8) :: tmp_array(state%ncol,pver)

real(r8) :: na500(pcols,pver)
real(r8) :: tot_na500(pcols,pver)
Expand Down

0 comments on commit cee0ac4

Please sign in to comment.