Skip to content

Commit

Permalink
Cleaned up comments
Browse files Browse the repository at this point in the history
*********1*********2*********3*********4*********5*********6*********7**
Correction to last commit where cleaned up comments were not added.

[BFB] - Bit-For-Bit
  • Loading branch information
AaronDonahue committed Apr 12, 2017
1 parent 8b9a339 commit 0aeca85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
7 changes: 2 additions & 5 deletions components/cam/src/dynamics/se/dyn_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Module dyn_comp
! !REVISION HISTORY:
!
! JPE 06.05.31: created
! Aaron Donahue 17.04.11: Fixed bug in write_grid_mapping which caused
! a segmentation fault when dyn_npes<npes
!
!----------------------------------------------------------------------

Expand Down Expand Up @@ -444,14 +446,9 @@ subroutine write_grid_mapping(par, elem)
ierr = pio_def_var(nc, 'element_corners', PIO_INT, (/dim1,dim2/),vid)

ierr = pio_enddef(nc)
!=============================================================
! Aaron Donahue (2017-04-11): Bugfix for segmentation fault
! which occurs when the number of dynamics processors (dyn_npes)
! is less than the total number of processors (npes)
if (iam<par%nprocs) then
call createmetadata(par, elem, subelement_corners)
end if
!=============================================================

jj=0
do cc=0,3
Expand Down
12 changes: 5 additions & 7 deletions components/cam/src/dynamics/se/gravity_waves_sources.F90
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,18 @@ subroutine compute_frontogenesis(frontgf,frontga,tl,elem,ederiv,hybrid,nets,nete
! Change by Santos, 10 Aug 2011:
! Integrated into gravity_waves_sources module, several arguments made global
! to prevent repeated allocation/initialization
! Change by Aaron Donahue, April 2017:
! Fixed bug where boundary information was called for processors not associated
! with dynamics when dyn_npes<npes
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use physical_constants, only : kappa
use derivative_mod, only : gradient_sphere, ugradv_sphere
use edge_mod, only : edgevpack, edgevunpack
use bndry_mod, only : bndry_exchangev
use dyn_comp, only : hvcoord
use spmd_utils, only : iam ! Aaron Donahue (2017-04-11): Added for compatibility with dyn_npes<npes
use parallel_mod, only: par ! Aaron Donahue (2017-04-11): Added for compatibility with dyn_npes<npes
use spmd_utils, only : iam
use parallel_mod, only : par
implicit none
type (hybrid_t) , intent(in) :: hybrid
type (element_t) , intent(inout), target :: elem(:)
Expand Down Expand Up @@ -152,14 +155,9 @@ subroutine compute_frontogenesis(frontgf,frontga,tl,elem,ederiv,hybrid,nets,nete
call edgeVpack(edge3, frontgf(:,:,:,ie),nlev,0,ie)
call edgeVpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,ie)
enddo
!=============================================================
! Aaron Donahue (2017-04-11): Added to ensure that boundary exchange is
! only called for processors associated with dynamics solution, i.e.
! when iam < dyn_npes where dyn_npes <= npes
if (iam<par%nprocs) then
call bndry_exchangeV(hybrid,edge3)
end if
!=============================================================
do ie=nets,nete
call edgeVunpack(edge3, frontgf(:,:,:,ie),nlev,0,ie)
call edgeVunpack(edge3, gradth(:,:,:,:,ie),2*nlev,nlev,ie)
Expand Down

0 comments on commit 0aeca85

Please sign in to comment.