Parameters and commons blocks for MPI parallelization internal to ice model
REVISION HISTORY:
authors: Tony Craig, NCAR Elizabeth C. Hunke, LANLINTERFACE:
module ice_mpi_internalUSES:
use ice_kinds_mod use ice_domain
INTERFACE:
subroutine ice_global_real_minmax(nc,work,string)DESCRIPTION:
Determines and writes both minimum and maximum over global grid
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: nc real (kind=dbl_kind), intent(in) :: work(nc) character (len=8), intent(in) :: string
INTERFACE:
real function ice_global_real_minval(nc,work)DESCRIPTION:
Computes minimum over the global grid
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: nc real (kind=dbl_kind), intent(in) :: work(nc)
INTERFACE:
real function ice_global_real_maxval(nc,work)DESCRIPTION:
Computes maximum over the global grid
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: nc real (kind=dbl_kind), intent(in) :: work(nc)
INTERFACE:
real function ice_global_real_sum(nc,work)DESCRIPTION:
Sums given array over the global grid
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: nc real (kind=dbl_kind), intent(in) :: work(nc)
INTERFACE:
subroutine ice_bcast_logical(logval)DESCRIPTION:
Broadcasts a scalar logical value to all processors
REVISION HISTORY:
author: Julie Schramm, NCAR Added 22 Oct 2001USES:
INPUT/OUTPUT PARAMETERS:
implicit none logical (kind=log_kind), intent(inout) :: logval
INTERFACE:
subroutine ice_bcast_char(charval)DESCRIPTION:
Broadcasts a scalar character value to all processors
REVISION HISTORY:
author: Julie Schramm, NCAR Added 22 Oct 2001USES:
INPUT/OUTPUT PARAMETERS:
implicit none character (*), intent(inout) :: charval
INTERFACE:
subroutine ice_bcast_rscalar(val)DESCRIPTION:
Broadcasts a real scalar character value to all processors
REVISION HISTORY:
author: Julie Schramm, NCAR Added 22 Oct 2001USES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind), intent(inout) :: val
INTERFACE:
subroutine ice_bcast_iscalar(ival)DESCRIPTION:
Broadcasts an integer scalar character value to all processors
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(inout) :: ival
INTERFACE:
subroutine global_scatter(workg,work)DESCRIPTION:
Scatters a global array and adds ghost cells to create a distributed array
REVISION HISTORY:
author: Tony Craig, NCARUSES:
use ice_model_size use ice_constantsINPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: workg(imt_global,jmt_global) &, work(ilo:ihi,jlo:jhi)
INTERFACE:
subroutine global_gather(workg,work)DESCRIPTION:
Gathers a distributed array and strips off ghost cells to create a local array with global dimensions
REVISION HISTORY:
author: Tony Craig, NCARUSES:
use ice_model_size use ice_constantsINPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: workg(imt_global,jmt_global) &, work(ilo:ihi,jlo:jhi)
INTERFACE:
subroutine get_sum(flag,work1,work2,work3,gsum)DESCRIPTION:
Computes a (weighted) sum over the global grid; if flag = 1 then work1 is weighted by work2 before being added to work3
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: flag real (kind=dbl_kind), intent(in) :: & work1(ilo:ihi,jlo:jhi) &, work2(ilo:ihi,jlo:jhi) real (kind=dbl_kind), intent(in) :: & work3(imt_local,jmt_local) real (kind=dbl_kind), intent(out) :: & gsum
INTERFACE:
subroutine end_runDESCRIPTION:
Ends run by calling MPI_FINALIZE.
REVISION HISTORY:
author: ?USES:
INPUT/OUTPUT PARAMETERS:
#ifdef _MPI call MPI_FINALIZE(ierr) #endif