Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/prerelease/xanadu'
Browse files Browse the repository at this point in the history
  • Loading branch information
menzel-gfdl committed Oct 1, 2018
2 parents e8940fe + 5ae89b0 commit 3cde6bb
Show file tree
Hide file tree
Showing 77 changed files with 17,550 additions and 7,470 deletions.
575 changes: 116 additions & 459 deletions .gitlab-ci.yml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions .gitlab/issue_templates/Bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- Tell us what should happen -->

## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
16 changes: 16 additions & 0 deletions .gitlab/merge_request_templates/Default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Description
<!-- Describe your changes in detail -->

## Related Issue(s)
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
128 changes: 102 additions & 26 deletions block_control/block_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
!***********************************************************************

!> \file
!! \brief Contains the \ref block_control_mod module

module block_control_mod
#include <fms_platform.h>

Expand All @@ -35,41 +38,79 @@ module block_control_mod
end type pk_type

type block_control_type
integer :: nx_block, ny_block ! blocking factor using mpp-style decomposition
integer :: nblks ! number of blocks cover MPI domain
integer :: isc, iec, jsc, jec ! MPI domain global extents
integer :: npz ! vertical extent
integer, dimension(:), _ALLOCATABLE :: ibs _NULL, & ! block extents for mpp-style
ibe _NULL, & ! decompositions
integer :: nx_block, ny_block !< blocking factor using mpp-style decomposition
integer :: nblks !< number of blocks cover MPI domain
integer :: isc, iec, jsc, jec !< MPI domain global extents
integer :: npz !< vertical extent
integer, dimension(:), _ALLOCATABLE :: ibs _NULL, & !< block extents for mpp-style
ibe _NULL, & !! decompositions
jbs _NULL, &
jbe _NULL
type(ix_type), dimension(:), _ALLOCATABLE :: ix _NULL ! dereference packed index from global index
type(ix_type), dimension(:), _ALLOCATABLE :: ix _NULL !< dereference packed index from global index
!--- packed blocking fields
integer, dimension(:), _ALLOCATABLE :: blksz _NULL ! number of points in each individual block
! blocks are not required to be uniforom in size
integer, dimension(:,:), _ALLOCATABLE :: blkno _NULL ! dereference block number using global indices
integer, dimension(:,:), _ALLOCATABLE :: ixp _NULL ! dereference packed index from global indices
! must be used in conjuction with blkno
type(pk_type), dimension(:), _ALLOCATABLE :: index _NULL ! dereference global indices from
! block/ixp combo
integer, dimension(:), _ALLOCATABLE :: blksz _NULL !< number of points in each individual block
!! blocks are not required to be uniforom in size
integer, dimension(:,:), _ALLOCATABLE :: blkno _NULL !< dereference block number using global indices
integer, dimension(:,:), _ALLOCATABLE :: ixp _NULL !< dereference packed index from global indices
!! must be used in conjuction with blkno
type(pk_type), dimension(:), _ALLOCATABLE :: index _NULL !< dereference global indices from
!! block/ixp combo
end type block_control_type

public :: define_blocks, define_blocks_packed

contains

!----------------------------------------------------------------------
! set up "blocks" used for OpenMP threading of column-based
! calculations using rad_n[x/y]xblock from coupler_nml
!----------------------------------------------------------------------
!###############################################################################
!> \fn define_blocks
!!
!! \brief Sets up "blocks" used for OpenMP threading of column-based
!! calculations using rad_n[x/y]xblock from coupler_nml
!!
!! <b> Parameters: </b>
!!
!! \code{.f90}
!! character(len=*), intent(in) :: component
!! type(block_control_type), intent(inout) :: Block
!! integer, intent(in) :: isc, iec, jsc, jec, kpts
!! integer, intent(in) :: nx_block, ny_block
!! logical, intent(inout) :: message
!! \endcode
!!
!! \param [in] <component>
!! \param [inout] <Block>
!! \param [in] <isc>
!! \param [in] <iec>
!! \param [in] <jsc>
!! \param [in] <jec>
!! \param [in] <kpts>
!! \param [in] <nx_block>
!! \param [in] <ny_block>
!! \param [inout] <message>
!!
subroutine define_blocks (component, Block, isc, iec, jsc, jec, kpts, &
nx_block, ny_block, message)
character(len=*), intent(in) :: component
type(block_control_type), intent(inout) :: Block
integer, intent(in) :: isc, iec, jsc, jec, kpts
integer, intent(in) :: nx_block, ny_block
logical, intent(inout) :: message
!--- local variables

!-------------------------------------------------------------------------------
! Local variables:
! blocks
! i1
! i2
! j1
! j2
! text
! i
! j
! nblks
! ii
! jj
!-------------------------------------------------------------------------------

integer :: blocks
integer, dimension(nx_block) :: i1, i2
integer, dimension(ny_block) :: j1, j2
Expand Down Expand Up @@ -134,20 +175,55 @@ subroutine define_blocks (component, Block, isc, iec, jsc, jec, kpts, &

end subroutine define_blocks

!----------------------------------------------------------------------
! creates and populates a data type which is used for defining the
! sub-blocks of the MPI-domain to enhance OpenMP and memory performance
!
! uses a packed concept
!----------------------------------------------------------------------


!###############################################################################
!> \fn define_blocks_packed
!!
!! \brief Creates and populates a data type which is used for defining the
!! sub-blocks of the MPI-domain to enhance OpenMP and memory performance.
!! Uses a packed concept
!!
!! <b> Parameters: </b>
!!
!! \code{.f90}
!! character(len=*), intent(in) :: component
!! type(block_control_type), intent(inout) :: Block
!! integer, intent(in) :: isc, iec, jsc, jec, kpts
!! integer, intent(inout) :: blksz
!! logical, intent(inout) :: message
!! \endcode
!!
!! \param [in] <component>
!! \param [inout] <Block>
!! \param [in] <isc>
!! \param [in] <iec>
!! \param [in] <jsc>
!! \param [in] <jec>
!! \param [in] <kpts>
!! \param [inout] <blksz>
!! \param [inout] <message>
!!
subroutine define_blocks_packed (component, Block, isc, iec, jsc, jec, &
kpts, blksz, message)
character(len=*), intent(in) :: component
type(block_control_type), intent(inout) :: Block
integer, intent(in) :: isc, iec, jsc, jec, kpts
integer, intent(inout) :: blksz
logical, intent(inout) :: message
!--- local variables

!-------------------------------------------------------------------------------
! Local variables:
! nblks
! lblksz
! tot_pts
! ii
! jj
! nb
! ix
! text
!-------------------------------------------------------------------------------

integer :: nblks, lblksz, tot_pts, ii, jj, nb, ix
character(len=256) :: text

Expand Down
Loading

0 comments on commit 3cde6bb

Please sign in to comment.