FMS icon indicating copy to clipboard operation
FMS copied to clipboard

Problem with mpp_define_domains1D

Open edwardhartnett opened this issue 4 years ago • 0 comments

While writing tests I seem to find that the pelist is not really optional. There is code that tries to fill in the pelist but it ends up being (0), instead of (0, 1, 2, 3).

subroutine mpp_define_domains1D( global_indices, ndivs, domain, pelist, flags, halo, extent, maskmap, &
                                   memory_size, begin_halo, end_halo )
    integer,           intent(in) :: global_indices(:) !(/ isg, ieg /)
    integer,           intent(in) :: ndivs
    type(domain1D), intent(inout) :: domain !declared inout so that existing links, if any, can be nullified
    integer, intent(in), optional :: pelist(0:)
    integer, intent(in), optional :: flags, halo
    integer, intent(in), optional :: extent(0:)
    logical, intent(in), optional :: maskmap(0:)
    integer, intent(in), optional :: memory_size
    integer, intent(in), optional :: begin_halo, end_halo

So in the test test_fms/mpp/test_domains_simple.F90 I have to comment out the first call to mpp_define_domains() or I get error: FATAL: MPP_DEFINE_DOMAINS1D: number of TRUEs in maskmap array must match PE count.

The test code is:

! Define a 1D domain.
 !call mpp_define_domains((/1, nx/), 4, domain_1D)
 call mpp_define_domains((/1, nx/), 4, domain_1D, pelist=(/0, 1, 2, 3/))


This will be in my test_domains_simple PR, which I'm going to take down for a bit while I add to it.

edwardhartnett avatar Jun 24 '20 17:06 edwardhartnett