2 !***********************************************************************
3 !* GNU Lesser General Public License
5 !* This file
is part of the GFDL Flexible Modeling System (FMS).
7 !* FMS
is free software: you can redistribute it and/or modify it under
8 !* the terms of the GNU Lesser General Public License as published by
9 !* the Free Software Foundation, either
version 3 of the License, or (at
10 !* your option) any later
version.
12 !* FMS
is distributed in the hope that it
will be useful, but WITHOUT
13 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 !* You should have
received a copy of the GNU Lesser General Public
18 !* License along with FMS. If
not, see <http:
19 !***********************************************************************
21 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23 ! MPP_DOMAINS: initialization and termination !
25 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 ! <SUBROUTINE NAME=
"mpp_domains_init">
29 ! Initialize domain decomp package.
34 ! <TT>flags</TT> can be
set to <TT>MPP_VERBOSE</TT> to have
36 ! to. <TT>MPP_DEBUG</TT> returns even more information for debugging. 38 ! <TT>mpp_domains_init</TT> will call <TT>mpp_init</TT>, to make sure 39 ! <LINK SRC="mpp.html"><TT>mpp_mod</TT></LINK> is initialized. (Repeated 40 ! calls to <TT>mpp_init</TT> do no harm, so don't worry
if you already
44 ! call mpp_domains_init(flags)
46 ! <IN NAME=
"flags" TYPE=
"integer"></IN>
48 subroutine mpp_domains_init(flags)
49 integer, intent(in), optional :: flags
58 pointer( ptr_info, ptr_info_var )
62 call mpp_init(flags) !this
is a no-op
if already initialized
67 if( mpp_pe() .EQ.mpp_root_pe() ) write(
unit,
'(/a)' )
'MPP_DOMAINS module ' 69 if( PRESENT(flags) )then
70 debug = flags.EQ.MPP_DEBUG
76 #ifdef INTERNAL_FILE_NML
82 inquire( unit_nml,OPENED=opened )
86 open(unit_nml,file=
'input.nml', iostat=io_status)
87 read(unit_nml,mpp_domains_nml,iostat=io_status)
91 if (io_status > 0) then
92 call
mpp_error(FATAL,
'=>mpp_domains_init: Error reading input.nml')
106 call
mpp_error(FATAL,
"mpp_domains_init: debug_update_level should be 'none', 'fatal', 'warning', or 'note'")
111 do
n = 1, MAX_NONBLOCK_UPDATE
115 call mpp_domains_set_stack_size(32768) !default, pretty arbitrary
117 call mpp_malloc( ptr_info, 16, l )
121 call mpp_define_null_domain(NULL_DOMAIN1d);
122 call mpp_define_null_domain(NULL_DOMAIN2d);
123 call mpp_define_null_UG_domain(NULL_DOMAINUG)
152 end subroutine mpp_domains_init
154 !
##################################################################### 155 subroutine init_nonblock_type( nonblock_obj )
156 type(nonblock_type), intent(inout) :: nonblock_obj
159 nonblock_obj%recv_pos = 0
160 nonblock_obj%send_pos = 0
161 nonblock_obj%recv_msgsize = 0
162 nonblock_obj%send_msgsize = 0
164 nonblock_obj%update_position = 0
165 nonblock_obj%update_gridtype = 0
166 nonblock_obj%update_whalo = 0
167 nonblock_obj%update_ehalo = 0
168 nonblock_obj%update_shalo = 0
169 nonblock_obj%update_nhalo = 0
170 nonblock_obj%request_send_count = 0
171 nonblock_obj%request_recv_count = 0
181 nonblock_obj%buffer_pos_send(:) = 0
182 nonblock_obj%buffer_pos_recv(:) = 0
183 nonblock_obj%nfields = 0
184 nonblock_obj%field_addrs(:) = 0
185 nonblock_obj%field_addrs2(:) = 0
189 end subroutine init_nonblock_type
191 !#####################################################################
192 ! <SUBROUTINE NAME=
"mpp_domains_exit">
197 ! Serves
no particular purpose, but
is provided should you require to
201 ! call mpp_domains_exit()
204 subroutine mpp_domains_exit()
212 end subroutine mpp_domains_exit
214 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
216 ! MPP_CHECK_FIELD: Check parallel !
218 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
219 ! <SUBROUTINE NAME=
"mpp_check_field_3D" INTERFACE=
"mpp_check_field">
220 ! <IN NAME=
"field_in" TYPE=
"real, dimension(:,:,:)" > </IN>
221 ! <IN NAME=
"pelist1, pelist2" TYPE=
"integer, dimension(:)" > </IN>
222 ! <IN NAME=
"domain" TYPE=
"type(domain2d)" > </IN>
223 ! <IN NAME=
"mesg" TYPE=
"character(len=*)" > </IN>
224 ! <IN NAME=
"w_halo, s_halo, e_halo, n_halo" TYPE=
"integer, optional" > </IN>
225 ! <IN NAME=
"force_abort" TYPE=
"logical,optional" > </IN>
228 subroutine mpp_check_field_3D(field_in, pelist1, pelist2, domain, mesg, &
229 w_halo, s_halo, e_halo, n_halo, force_abort, position )
230 ! This routine
is used to do parallel checking for 3
d data between
n and
m pe. The comparison
is 231 !
is done on pelist2. When
size of pelist2
is 1, we can
check the halo; otherwise,
232 ! halo can
not be checked.
234 real,
dimension(:,:,:), intent(in) :: field_in !
field to be checked
236 type(domain2d), intent(in) :: domain ! domain for each
pe 237 character(
len=*), intent(in) :: mesg ! message to be printed
out 238 !
if differences found
239 integer, intent(in), optional :: w_halo, s_halo, e_halo, n_halo
241 logical, intent(in), optional :: force_abort ! when
true, call
mpp_error if any difference
242 ! found. default value
is false.
243 integer, intent(in), optional :: position ! when domain
is symmetry, only value = CENTER
is 247 character(
len=256) :: temp_mesg
250 do
k = 1,
size(field_in,3)
251 write(temp_mesg,
'(a, i3)') trim(mesg)
252 call mpp_check_field_2d(field_in(:,:,
k), pelist1, pelist2, domain, temp_mesg, &
253 w_halo, s_halo, e_halo, n_halo, force_abort, position )
256 end subroutine mpp_check_field_3D
259 !#####################################################################################
260 ! <SUBROUTINE NAME=
"mpp_check_field_2D" INTERFACE=
"mpp_check_field">
261 ! <IN NAME=
"field_in" TYPE=
"real, dimension(:,:)" > </IN>
263 subroutine mpp_check_field_2d(field_in, pelist1, pelist2, domain, mesg, &
264 w_halo, s_halo, e_halo, n_halo,force_abort, position )
265 ! This routine
is used to do parallel checking for 2
d data between
n and
m pe. The comparison
is 266 !
is done on pelist2. When
size of pelist2
is 1, we can
check the halo; otherwise,
267 ! halo can
not be checked.
269 real,
dimension(:,:), intent(in) :: field_in !
field to be checked
271 type(domain2d), intent(in) :: domain ! domain for each
pe 272 character(
len=*), intent(in) :: mesg ! message to be printed
out 273 !
if differences found
274 integer, intent(in), optional :: w_halo, s_halo, e_halo, n_halo
276 logical, intent(in), optional :: force_abort ! when, call
mpp_error if any difference
277 ! found. default value
is false.
278 integer, intent(in), optional :: position ! when domain
is symmetry, only value = CENTER
is 281 if(present(position)) then
282 if(position .NE. CENTER .AND. domain%symmetry) call
mpp_error(FATAL, &
283 'mpp_check_field: when domain is symmetry, only value CENTER is implemented, contact author')
286 if(
size(pelist2(:)) == 1) then
287 call mpp_check_field_2d_type1(field_in, pelist1, pelist2, domain, mesg, &
288 w_halo, s_halo, e_halo, n_halo, force_abort )
289 else
if(
size(pelist1(:)) == 1) then
290 call mpp_check_field_2d_type1(field_in, pelist2, pelist1, domain, mesg, &
291 w_halo, s_halo, e_halo, n_halo, force_abort )
292 else
if(
size(pelist1(:)) .gt. 1 .and.
size(pelist2(:)) .gt. 1) then
293 call mpp_check_field_2d_type2(field_in, pelist1, pelist2, domain, mesg, force_abort )
295 call
mpp_error(FATAL,
'mpp_check_field: size of both pelists should be greater than 0')
298 end subroutine mpp_check_field_2D
301 !####################################################################################
303 subroutine mpp_check_field_2d_type1(field_in, pelist1, pelist2, domain, mesg, &
304 w_halo, s_halo, e_halo, n_halo,force_abort )
305 ! This routine
is used to
check field between running on 1
pe (pelist2) and
306 !
n pe(pelist1). The need_to_be_checked data
is sent to the pelist2 and All the
307 ! comparison
is done on pelist2.
309 real,
dimension(:,:), intent(in) :: field_in !
field to be checked
311 type(domain2d), intent(in) :: domain ! domain for each
pe 312 character(
len=*), intent(in) :: mesg ! message to be printed
out 313 !
if differences found
314 integer, intent(in), optional :: w_halo, s_halo, e_halo, n_halo
316 logical, intent(in), optional :: force_abort ! when, call
mpp_error if any difference
317 ! found. default value
is false.
322 integer ::
i,
j,
im,
jm,l,
is,
ie,
js,
je,
isc,
iec,
jsc,
jec,
isd,
ied,
jsd,
jed 326 logical :: check_success, error_exit
328 check_success = .TRUE.
330 if(present(force_abort)) error_exit = force_abort
331 hwest = 0;
if(present(w_halo)) hwest = w_halo
332 heast = 0;
if(present(e_halo)) heast = e_halo
333 hsouth = 0;
if(present(s_halo)) hsouth = s_halo
334 hnorth = 0;
if(present(n_halo)) hnorth = n_halo
344 !--- need to checked halo
size should
not be bigger than x_halo or y_halo
345 if(hwest .gt. xhalo .or. heast .gt. xhalo .or. hsouth .gt. yhalo .or. hnorth .gt. yhalo) &
351 !
check if the field_in
is on compute domain or data domain
353 !
if field_in on compute domain, you can
not check halo points
354 if( hwest .ne. 0 .or. heast .ne. 0 .or. hsouth .ne. 0 .or. hnorth .ne. 0 ) &
356 field2(:,:) = field_in(:,:)
360 if( hwest .ne. 0 .or. heast .ne. 0 .or. hsouth .ne. 0 .or. hnorth .ne. 0 ) &
366 print*, 'on
pe ',
pe, 'domain: ',
isc,
iec,
jsc,
jec,
isd,
ied,
jsd,
jed, '
size of
field: ',
size(field_in,1),
size(field_in,2)
375 allocate(send_buffer(
im*
jm))
377 ibounds(1) =
is; ibounds(2) =
ie; ibounds(3) =
js; ibounds(4) =
je 382 send_buffer(l) = field2(
i,
j)
386 ! Force use of "scalar",
integer pointer mpp interface
387 call mpp_send(ibounds(1), plen=4,
to_pe=pelist2(1), tag=COMM_TAG_1)
388 call mpp_send(send_buffer(1),plen=
im*
jm,
to_pe=pelist2(1), tag=COMM_TAG_2)
389 deallocate(send_buffer)
391 else
if(pelist2(1) ==
pe) then ! receive data and compare
392 do
p = pelist1(1), pelist1(
size(pelist1(:)))
393 ! Force use of "scalar",
integer pointer mpp interface
394 call mpp_recv(ibounds(1), glen=4,
from_pe=
p, tag=COMM_TAG_1)
395 is = ibounds(1);
ie = ibounds(2);
js=ibounds(3);
je=ibounds(4)
397 if(allocated(field1)) deallocate(field1)
398 if(allocated(send_buffer)) deallocate(send_buffer)
400 ! Force use of "scalar",
integer pointer mpp interface
401 call mpp_recv(send_buffer(1),glen=
im*
jm,
from_pe=
p, tag=COMM_TAG_2)
404 ! compare here, the comparison criteria can be changed according to need
408 field1(
i,
j) = send_buffer(l)
409 if(field1(
i,
j) .ne. field2(
i,
j)) then
410 ! write to standard
output 412 ! write(stdout(),'(
a,2
i,2
f)') trim(mesg),
i,
j, pass_field(
i,
j), field_check(
i,
j)
413 check_success = .FALSE.
414 if(error_exit) call
mpp_error(FATAL,"mpp_check_field: can
not reproduce at this point")
420 if(check_success) then
424 deallocate(field1, send_buffer)
431 end subroutine mpp_check_field_2d_type1
433 !
#################################################################### 435 subroutine mpp_check_field_2d_type2(field_in, pelist1, pelist2, domain, mesg,force_abort)
439 real,
dimension(:,:), intent(in) :: field_in
440 type(domain2d), intent(in) :: domain
443 character(
len=*), intent(in) :: mesg
444 logical, intent(in), optional :: force_abort ! when, call
mpp_error if any difference
445 ! found. default value
is false.
446 !
some local variables
447 logical :: check_success, error_exit
449 integer ::
i,
j,
pe,
npes,
isd,
ied,
jsd,
jed,
is,
ie,
js,
je 450 type(domain2d) :: domain1, domain2
452 check_success = .TRUE.
454 if(present(force_abort)) error_exit = force_abort
458 if(any(pelist1 ==
pe)) domain1 = domain
459 if(any(pelist2 ==
pe)) domain2 = domain
461 ! Comparison
is made on pelist2.
462 if(any(pelist2 ==
pe)) then
464 call mpp_get_compute_domain(domain2,
is,
ie,
js,
je)
467 call
mpp_error(FATAL,
'mpp_check_field: input field is not on the data domain')
472 call mpp_broadcast_domain(domain1)
473 call mpp_broadcast_domain(domain2)
475 call mpp_redistribute(domain1,field_in,domain2,field1)
477 if(any(pelist2 ==
pe)) then
480 if(field1(
i,
j) .ne. field2(
i,
j)) then
482 ! write(stdout(),
'(a,2i,2f)') trim(mesg),
i,
j, field_check(
i,
j), field_out(
i,
j)
483 check_success = .FALSE.
484 if(error_exit) call
mpp_error(FATAL,
"mpp_check_field: can not reproduce at this point")
490 size(pelist2(:)),
' pe on',
pe,
' pes is ok' 493 if(any(pelist2 ==
pe)) deallocate(field1, field2)
499 end subroutine mpp_check_field_2d_type2
502 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
504 ! MPP_BROADCAST_DOMAIN !
506 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
508 subroutine mpp_broadcast_domain_1( domain )
509 !broadcast domain (useful only outside the context of its own
pelist)
510 type(domain2D), intent(inout) :: domain
512 logical :: native !
true if I
'm on the pelist of this domain 513 integer :: listsize, listpos 515 integer, dimension(11) :: msg, info !pe and compute domain of each item in list 519 if( .NOT.module_is_initialized ) & 520 call mpp_error( FATAL, 'MPP_BROADCAST_DOMAIN_1: You must first call mpp_domains_init.
' ) 522 !get the current pelist 523 allocate( pes(0:mpp_npes()-1) ) 524 call mpp_get_current_pelist(pes) 526 !am I part of this domain? 527 native = ASSOCIATED(domain%list) 531 listsize = size(domain%list(:)) 535 call mpp_max(listsize) 537 if( .NOT.native )then 538 !initialize domain%list and set null values in message 539 allocate( domain%list(0:listsize-1) ) 542 allocate(domain%x(1), domain%y(1), domain%tile_id(1)) 544 allocate(domain%list(n)%x(1), domain%list(n)%y(1), domain%list(n)%tile_id(1) ) 546 domain%x%compute%begin = 1 547 domain%x%compute%end = -1 548 domain%y%compute%begin = 1 549 domain%y%compute%end = -1 550 domain%x%global %begin = -1 551 domain%x%global %end = -1 552 domain%y%global %begin = -1 553 domain%y%global %end = -1 559 domain%symmetry = .false. 561 !initialize values in info 563 call mpp_get_compute_domain( domain, info(2), info(3), info(4), info(5) ) 564 info(6) = domain%tile_id(1) 565 info(7) = domain%whalo 566 info(8) = domain%ehalo 567 info(9) = domain%shalo 568 info(10)= domain%nhalo 569 if(domain%symmetry) then 574 !broadcast your info across current pelist and unpack if needed 576 do n = 0,mpp_npes()-1 578 if( mpp_pe().EQ.pes(n) .AND. debug )write( errunit,* )'PE ', mpp_pe(), 'broadcasting msg
', msg 579 call mpp_broadcast( msg, 11, pes(n) ) 580 !no need to unpack message if native 581 !no need to unpack message from non-native PE 582 if( .NOT.native .AND. msg(1).NE.NULL_PE )then 583 domain%list(listpos)%pe = msg(1) 584 domain%list(listpos)%x%compute%begin = msg(2) 585 domain%list(listpos)%x%compute%end = msg(3) 586 domain%list(listpos)%y%compute%begin = msg(4) 587 domain%list(listpos)%y%compute%end = msg(5) 588 domain%list(listpos)%tile_id(1) = msg(6) 589 if(domain%x(1)%global%begin < 0) then 590 domain%x(1)%global%begin = msg(2) 591 domain%x(1)%global%end = msg(3) 592 domain%y(1)%global%begin = msg(4) 593 domain%y(1)%global%end = msg(5) 594 domain%whalo = msg(7) 595 domain%ehalo = msg(8) 596 domain%shalo = msg(9) 597 domain%nhalo = msg(10) 598 if(msg(11) == 1) then 599 domain%symmetry = .true. 601 domain%symmetry = .false. 604 domain%x(1)%global%begin = min(domain%x(1)%global%begin, msg(2)) 605 domain%x(1)%global%end = max(domain%x(1)%global%end, msg(3)) 606 domain%y(1)%global%begin = min(domain%y(1)%global%begin, msg(4)) 607 domain%y(1)%global%end = max(domain%y(1)%global%end, msg(5)) 609 listpos = listpos + 1 610 if( debug )write( errunit,* )'PE ', mpp_pe(), 'received domain from
PE ', msg(1), 'is,
ie,
js,
je=
', msg(2:5) 614 end subroutine mpp_broadcast_domain_1 617 !############################################################################## 618 subroutine mpp_broadcast_domain_2( domain_in, domain_out ) 619 !broadcast domain (useful only outside the context of its own pelist) 620 type(domain2D), intent(in) :: domain_in 621 type(domain2D), intent(inout) :: domain_out 622 integer, allocatable :: pes(:) 623 logical :: native !true if I'm on the
pelist of this domain
627 integer :: errunit, npes_in, npes_out, pstart, pend
631 call
mpp_error( FATAL,
'MPP_BROADCAST_DOMAIN_2: You must first call mpp_domains_init.' )
634 allocate( pes(0:mpp_npes()-1) )
635 call mpp_get_current_pelist(pes)
639 call
mpp_error( FATAL,
'MPP_BROADCAST_DOMAIN_2: domain_in is not initialized')
642 call
mpp_error( FATAL,
'MPP_BROADCAST_DOMAIN_2: domain_out is already initialized')
646 if( npes_in == mpp_npes() ) then
647 call
mpp_error( FATAL,
'MPP_BROADCAST_DOMAIN_2: size(domain_in%list(:)) == mpp_npes()')
649 npes_out = mpp_npes() - npes_in
688 !broadcast your
info across current
pelist and unpack
if needed
696 do
n = 0,mpp_npes()-1
698 if( mpp_pe().EQ.pes(
n) .AND.
debug )write( errunit,* )
'PE ', mpp_pe(),
'broadcasting msg ', msg
699 call mpp_broadcast( msg, 12, pes(
n) )
700 !--- pack
if from other domain
701 if(
n .GE. pstart .AND.
n .LE. pend )then
718 if(msg(11) == 1) then
730 if(
debug )write( errunit,* )
'PE ', mpp_pe(),
'received domain from PE ', msg(1),
'is,ie,js,je=', msg(2:5)
734 end subroutine mpp_broadcast_domain_2
738 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
740 ! MPP_UPDATE_DOMAINS:
fill halos for 2D decomposition !
742 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
745 #define VECTOR_FIELD_
748 #
undef MPP_UPDATE_DOMAINS_2D_
749 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_r8_2D
750 #
undef MPP_UPDATE_DOMAINS_3D_
751 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_r8_3D
752 #
undef MPP_UPDATE_DOMAINS_4D_
753 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_r8_4D
754 #
undef MPP_UPDATE_DOMAINS_5D_
755 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_r8_5D
757 #
undef MPP_UPDATE_DOMAINS_2D_V_
758 #define MPP_UPDATE_DOMAINS_2D_V_ mpp_update_domain2D_r8_2Dv
759 #
undef MPP_UPDATE_DOMAINS_3D_V_
760 #define MPP_UPDATE_DOMAINS_3D_V_ mpp_update_domain2D_r8_3Dv
761 #
undef MPP_UPDATE_DOMAINS_4D_V_
762 #define MPP_UPDATE_DOMAINS_4D_V_ mpp_update_domain2D_r8_4Dv
763 #
undef MPP_UPDATE_DOMAINS_5D_V_
764 #define MPP_UPDATE_DOMAINS_5D_V_ mpp_update_domain2D_r8_5Dv
766 #
undef MPP_REDISTRIBUTE_2D_
767 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_r8_2D
768 #
undef MPP_REDISTRIBUTE_3D_
769 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_r8_3D
770 #
undef MPP_REDISTRIBUTE_4D_
771 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_r8_4D
772 #
undef MPP_REDISTRIBUTE_5D_
773 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_r8_5D
774 #include <mpp_update_domains2D.h>
780 #
undef MPP_UPDATE_DOMAINS_2D_
781 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_c8_2D
782 #
undef MPP_UPDATE_DOMAINS_3D_
783 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_c8_3D
784 #
undef MPP_UPDATE_DOMAINS_4D_
785 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_c8_4D
786 #
undef MPP_UPDATE_DOMAINS_5D_
787 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_c8_5D
788 #
undef MPP_REDISTRIBUTE_2D_
789 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_c8_2D
790 #
undef MPP_REDISTRIBUTE_3D_
791 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_c8_3D
792 #
undef MPP_REDISTRIBUTE_4D_
793 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_c8_4D
794 #
undef MPP_REDISTRIBUTE_5D_
795 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_c8_5D
796 #include <mpp_update_domains2D.h>
799 #ifndef no_8byte_integers
802 #
undef MPP_UPDATE_DOMAINS_2D_
803 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_i8_2D
804 #
undef MPP_UPDATE_DOMAINS_3D_
805 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_i8_3D
806 #
undef MPP_UPDATE_DOMAINS_4D_
807 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_i8_4D
808 #
undef MPP_UPDATE_DOMAINS_5D_
809 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_i8_5D
810 #
undef MPP_REDISTRIBUTE_2D_
811 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_i8_2D
812 #
undef MPP_REDISTRIBUTE_3D_
813 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_i8_3D
814 #
undef MPP_REDISTRIBUTE_4D_
815 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_i8_4D
816 #
undef MPP_REDISTRIBUTE_5D_
817 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_i8_5D
818 #include <mpp_update_domains2D.h>
823 #define VECTOR_FIELD_
826 #
undef MPP_UPDATE_DOMAINS_2D_
827 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_r4_2D
828 #
undef MPP_UPDATE_DOMAINS_3D_
829 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_r4_3D
830 #
undef MPP_UPDATE_DOMAINS_4D_
831 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_r4_4D
832 #
undef MPP_UPDATE_DOMAINS_5D_
833 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_r4_5D
835 #
undef MPP_UPDATE_DOMAINS_2D_V_
836 #define MPP_UPDATE_DOMAINS_2D_V_ mpp_update_domain2D_r4_2Dv
837 #
undef MPP_UPDATE_DOMAINS_3D_V_
838 #define MPP_UPDATE_DOMAINS_3D_V_ mpp_update_domain2D_r4_3Dv
839 #
undef MPP_UPDATE_DOMAINS_4D_V_
840 #define MPP_UPDATE_DOMAINS_4D_V_ mpp_update_domain2D_r4_4Dv
841 #
undef MPP_UPDATE_DOMAINS_5D_V_
842 #define MPP_UPDATE_DOMAINS_5D_V_ mpp_update_domain2D_r4_5Dv
844 #
undef MPP_REDISTRIBUTE_2D_
845 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_r4_2D
846 #
undef MPP_REDISTRIBUTE_3D_
847 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_r4_3D
848 #
undef MPP_REDISTRIBUTE_4D_
849 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_r4_4D
850 #
undef MPP_REDISTRIBUTE_5D_
851 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_r4_5D
852 #include <mpp_update_domains2D.h>
859 #
undef MPP_UPDATE_DOMAINS_2D_
860 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_c4_2D
861 #
undef MPP_UPDATE_DOMAINS_3D_
862 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_c4_3D
863 #
undef MPP_UPDATE_DOMAINS_4D_
864 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_c4_4D
865 #
undef MPP_UPDATE_DOMAINS_5D_
866 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_c4_5D
867 #
undef MPP_REDISTRIBUTE_2D_
868 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_c4_2D
869 #
undef MPP_REDISTRIBUTE_3D_
870 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_c4_3D
871 #
undef MPP_REDISTRIBUTE_4D_
872 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_c4_4D
873 #
undef MPP_REDISTRIBUTE_5D_
874 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_c4_5D
875 #include <mpp_update_domains2D.h>
880 #
undef MPP_UPDATE_DOMAINS_2D_
881 #define MPP_UPDATE_DOMAINS_2D_ mpp_update_domain2D_i4_2D
882 #
undef MPP_UPDATE_DOMAINS_3D_
883 #define MPP_UPDATE_DOMAINS_3D_ mpp_update_domain2D_i4_3D
884 #
undef MPP_UPDATE_DOMAINS_4D_
885 #define MPP_UPDATE_DOMAINS_4D_ mpp_update_domain2D_i4_4D
886 #
undef MPP_UPDATE_DOMAINS_5D_
887 #define MPP_UPDATE_DOMAINS_5D_ mpp_update_domain2D_i4_5D
888 #
undef MPP_REDISTRIBUTE_2D_
889 #define MPP_REDISTRIBUTE_2D_ mpp_redistribute_i4_2D
890 #
undef MPP_REDISTRIBUTE_3D_
891 #define MPP_REDISTRIBUTE_3D_ mpp_redistribute_i4_3D
892 #
undef MPP_REDISTRIBUTE_4D_
893 #define MPP_REDISTRIBUTE_4D_ mpp_redistribute_i4_4D
894 #
undef MPP_REDISTRIBUTE_5D_
895 #define MPP_REDISTRIBUTE_5D_ mpp_redistribute_i4_5D
896 #include <mpp_update_domains2D.h>
899 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
901 ! MPP_START_UPDATE_DOMAINS and MPP_COMPLETE_UPDATE_DOMAINS: !
902 !
fill halos for 2D decomposition --- non-blocking !
904 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
907 #define VECTOR_FIELD_
910 #
undef MPP_START_UPDATE_DOMAINS_2D_
911 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_r8_2D
912 #
undef MPP_START_UPDATE_DOMAINS_3D_
913 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_r8_3D
914 #
undef MPP_START_UPDATE_DOMAINS_4D_
915 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_r8_4D
916 #
undef MPP_START_UPDATE_DOMAINS_5D_
917 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_r8_5D
918 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
919 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_r8_2D
920 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
921 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_r8_3D
922 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
923 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_r8_4D
924 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
925 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_r8_5D
927 #
undef MPP_START_UPDATE_DOMAINS_2D_V_
928 #define MPP_START_UPDATE_DOMAINS_2D_V_ mpp_start_update_domain2D_r8_2Dv
929 #
undef MPP_START_UPDATE_DOMAINS_3D_V_
930 #define MPP_START_UPDATE_DOMAINS_3D_V_ mpp_start_update_domain2D_r8_3Dv
931 #
undef MPP_START_UPDATE_DOMAINS_4D_V_
932 #define MPP_START_UPDATE_DOMAINS_4D_V_ mpp_start_update_domain2D_r8_4Dv
933 #
undef MPP_START_UPDATE_DOMAINS_5D_V_
934 #define MPP_START_UPDATE_DOMAINS_5D_V_ mpp_start_update_domain2D_r8_5Dv
935 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_V_
936 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_V_ mpp_complete_update_domain2D_r8_2Dv
937 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_V_
938 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_V_ mpp_complete_update_domain2D_r8_3Dv
939 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_V_
940 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_V_ mpp_complete_update_domain2D_r8_4Dv
941 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_V_
942 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_V_ mpp_complete_update_domain2D_r8_5Dv
944 #include <mpp_update_domains2D_nonblock.h>
950 #
undef MPP_START_UPDATE_DOMAINS_2D_
951 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_c8_2D
952 #
undef MPP_START_UPDATE_DOMAINS_3D_
953 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_c8_3D
954 #
undef MPP_START_UPDATE_DOMAINS_4D_
955 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_c8_4D
956 #
undef MPP_START_UPDATE_DOMAINS_5D_
957 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_c8_5D
958 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
959 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_c8_2D
960 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
961 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_c8_3D
962 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
963 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_c8_4D
964 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
965 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_c8_5D
966 #include <mpp_update_domains2D_nonblock.h>
969 #ifndef no_8byte_integers
973 #
undef MPP_START_UPDATE_DOMAINS_2D_
974 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_i8_2D
975 #
undef MPP_START_UPDATE_DOMAINS_3D_
976 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_i8_3D
977 #
undef MPP_START_UPDATE_DOMAINS_4D_
978 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_i8_4D
979 #
undef MPP_START_UPDATE_DOMAINS_5D_
980 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_i8_5D
981 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
982 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_i8_2D
983 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
984 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_i8_3D
985 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
986 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_i8_4D
987 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
988 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_i8_5D
989 #include <mpp_update_domains2D_nonblock.h>
994 #define VECTOR_FIELD_
997 #
undef MPP_START_UPDATE_DOMAINS_2D_
998 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_r4_2D
999 #
undef MPP_START_UPDATE_DOMAINS_3D_
1000 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_r4_3D
1001 #
undef MPP_START_UPDATE_DOMAINS_4D_
1002 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_r4_4D
1003 #
undef MPP_START_UPDATE_DOMAINS_5D_
1004 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_r4_5D
1005 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
1006 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_r4_2D
1007 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
1008 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_r4_3D
1009 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
1010 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_r4_4D
1011 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
1012 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_r4_5D
1013 #ifdef VECTOR_FIELD_
1014 #
undef MPP_START_UPDATE_DOMAINS_2D_V_
1015 #define MPP_START_UPDATE_DOMAINS_2D_V_ mpp_start_update_domain2D_r4_2Dv
1016 #
undef MPP_START_UPDATE_DOMAINS_3D_V_
1017 #define MPP_START_UPDATE_DOMAINS_3D_V_ mpp_start_update_domain2D_r4_3Dv
1018 #
undef MPP_START_UPDATE_DOMAINS_4D_V_
1019 #define MPP_START_UPDATE_DOMAINS_4D_V_ mpp_start_update_domain2D_r4_4Dv
1020 #
undef MPP_START_UPDATE_DOMAINS_5D_V_
1021 #define MPP_START_UPDATE_DOMAINS_5D_V_ mpp_start_update_domain2D_r4_5Dv
1022 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_V_
1023 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_V_ mpp_complete_update_domain2D_r4_2Dv
1024 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_V_
1025 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_V_ mpp_complete_update_domain2D_r4_3Dv
1026 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_V_
1027 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_V_ mpp_complete_update_domain2D_r4_4Dv
1028 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_V_
1029 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_V_ mpp_complete_update_domain2D_r4_5Dv
1031 #include <mpp_update_domains2D_nonblock.h>
1035 #
undef VECTOR_FIELD_
1038 #
undef MPP_START_UPDATE_DOMAINS_2D_
1039 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_c4_2D
1040 #
undef MPP_START_UPDATE_DOMAINS_3D_
1041 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_c4_3D
1042 #
undef MPP_START_UPDATE_DOMAINS_4D_
1043 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_c4_4D
1044 #
undef MPP_START_UPDATE_DOMAINS_5D_
1045 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_c4_5D
1046 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
1047 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_c4_2D
1048 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
1049 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_c4_3D
1050 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
1051 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_c4_4D
1052 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
1053 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_c4_5D
1054 #include <mpp_update_domains2D_nonblock.h>
1057 #
undef VECTOR_FIELD_
1060 #
undef MPP_START_UPDATE_DOMAINS_2D_
1061 #define MPP_START_UPDATE_DOMAINS_2D_ mpp_start_update_domain2D_i4_2D
1062 #
undef MPP_START_UPDATE_DOMAINS_3D_
1063 #define MPP_START_UPDATE_DOMAINS_3D_ mpp_start_update_domain2D_i4_3D
1064 #
undef MPP_START_UPDATE_DOMAINS_4D_
1065 #define MPP_START_UPDATE_DOMAINS_4D_ mpp_start_update_domain2D_i4_4D
1066 #
undef MPP_START_UPDATE_DOMAINS_5D_
1067 #define MPP_START_UPDATE_DOMAINS_5D_ mpp_start_update_domain2D_i4_5D
1068 #
undef MPP_COMPLETE_UPDATE_DOMAINS_2D_
1069 #define MPP_COMPLETE_UPDATE_DOMAINS_2D_ mpp_complete_update_domain2D_i4_2D
1070 #
undef MPP_COMPLETE_UPDATE_DOMAINS_3D_
1071 #define MPP_COMPLETE_UPDATE_DOMAINS_3D_ mpp_complete_update_domain2D_i4_3D
1072 #
undef MPP_COMPLETE_UPDATE_DOMAINS_4D_
1073 #define MPP_COMPLETE_UPDATE_DOMAINS_4D_ mpp_complete_update_domain2D_i4_4D
1074 #
undef MPP_COMPLETE_UPDATE_DOMAINS_5D_
1075 #define MPP_COMPLETE_UPDATE_DOMAINS_5D_ mpp_complete_update_domain2D_i4_5D
1076 #include <mpp_update_domains2D_nonblock.h>
1078 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1080 ! mpp_start_do_update and mpp_complete_do_update !
1081 ! private routine. To be called in mpp_start_update_domains !
1082 ! and mpp_complete_update_domains !
1084 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1089 #
undef MPP_START_DO_UPDATE_3D_
1090 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_r8_3D
1091 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1092 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_r8_3D
1093 #
undef MPP_START_DO_UPDATE_3D_V_
1094 #define MPP_START_DO_UPDATE_3D_V_ mpp_start_do_update_r8_3Dv
1095 #
undef MPP_COMPLETE_DO_UPDATE_3D_V_
1096 #define MPP_COMPLETE_DO_UPDATE_3D_V_ mpp_complete_do_update_r8_3Dv
1097 #include <mpp_do_update_nonblock.h>
1098 #include <mpp_do_updateV_nonblock.h>
1105 #
undef MPP_START_DO_UPDATE_3D_
1106 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_c8_3D
1107 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1108 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_c8_3D
1109 #include <mpp_do_update_nonblock.h>
1112 #ifndef no_8byte_integers
1117 #
undef MPP_START_DO_UPDATE_3D_
1118 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_i8_3D
1119 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1120 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_i8_3D
1121 #include <mpp_do_update_nonblock.h>
1129 #
undef MPP_START_DO_UPDATE_3D_
1130 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_r4_3D
1131 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1132 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_r4_3D
1133 #
undef MPP_START_DO_UPDATE_3D_V_
1134 #define MPP_START_DO_UPDATE_3D_V_ mpp_start_do_update_r4_3Dv
1135 #
undef MPP_COMPLETE_DO_UPDATE_3D_V_
1136 #define MPP_COMPLETE_DO_UPDATE_3D_V_ mpp_complete_do_update_r4_3Dv
1137 #include <mpp_do_update_nonblock.h>
1138 #include <mpp_do_updateV_nonblock.h>
1146 #
undef MPP_START_DO_UPDATE_3D_
1147 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_c4_3D
1148 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1149 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_c4_3D
1150 #include <mpp_do_update_nonblock.h>
1157 #
undef MPP_START_DO_UPDATE_3D_
1158 #define MPP_START_DO_UPDATE_3D_ mpp_start_do_update_i4_3D
1159 #
undef MPP_COMPLETE_DO_UPDATE_3D_
1160 #define MPP_COMPLETE_DO_UPDATE_3D_ mpp_complete_do_update_i4_3D
1161 #include <mpp_do_update_nonblock.h>
1163 !*******************************************************
1164 #
undef VECTOR_FIELD_
1165 #define VECTOR_FIELD_
1168 #
undef MPP_DO_UPDATE_3D_
1169 #define MPP_DO_UPDATE_3D_ mpp_do_update_r8_3d
1170 #ifdef VECTOR_FIELD_
1171 #
undef MPP_DO_UPDATE_3D_V_
1172 #define MPP_DO_UPDATE_3D_V_ mpp_do_update_r8_3dv
1174 #include <mpp_do_update.h>
1175 #include <mpp_do_updateV.h>
1178 #
undef VECTOR_FIELD_
1181 #
undef MPP_DO_UPDATE_3D_
1182 #define MPP_DO_UPDATE_3D_ mpp_do_update_c8_3d
1183 #include <mpp_do_update.h>
1184 #define VECTOR_FIELD_
1187 #ifndef no_8byte_integers
1190 #
undef MPP_DO_UPDATE_3D_
1191 #define MPP_DO_UPDATE_3D_ mpp_do_update_i8_3d
1192 #include <mpp_do_update.h>
1196 #
undef VECTOR_FIELD_
1197 #define VECTOR_FIELD_
1200 #
undef MPP_DO_UPDATE_3D_
1201 #define MPP_DO_UPDATE_3D_ mpp_do_update_r4_3d
1202 #ifdef VECTOR_FIELD_
1203 #
undef MPP_DO_UPDATE_3D_V_
1204 #define MPP_DO_UPDATE_3D_V_ mpp_do_update_r4_3dv
1206 #include <mpp_do_update.h>
1207 #include <mpp_do_updateV.h>
1211 #
undef VECTOR_FIELD_
1214 #
undef MPP_DO_UPDATE_3D_
1215 #define MPP_DO_UPDATE_3D_ mpp_do_update_c4_3d
1216 #include <mpp_do_update.h>
1217 #define VECTOR_FIELD_
1222 #
undef MPP_DO_UPDATE_3D_
1223 #define MPP_DO_UPDATE_3D_ mpp_do_update_i4_3d
1224 #include <mpp_do_update.h>
1229 #
undef MPP_DO_CHECK_3D_
1230 #define MPP_DO_CHECK_3D_ mpp_do_check_r8_3d
1231 #ifdef VECTOR_FIELD_
1232 #
undef MPP_DO_CHECK_3D_V_
1233 #define MPP_DO_CHECK_3D_V_ mpp_do_check_r8_3dv
1235 #include <mpp_do_check.h>
1236 #include <mpp_do_checkV.h>
1239 #
undef VECTOR_FIELD_
1242 #
undef MPP_DO_CHECK_3D_
1243 #define MPP_DO_CHECK_3D_ mpp_do_check_c8_3d
1244 #include <mpp_do_check.h>
1245 #define VECTOR_FIELD_
1248 #ifndef no_8byte_integers
1251 #
undef MPP_DO_CHECK_3D_
1252 #define MPP_DO_CHECK_3D_ mpp_do_check_i8_3d
1253 #include <mpp_do_check.h>
1257 #
undef VECTOR_FIELD_
1258 #define VECTOR_FIELD_
1261 #
undef MPP_DO_CHECK_3D_
1262 #define MPP_DO_CHECK_3D_ mpp_do_check_r4_3d
1263 #ifdef VECTOR_FIELD_
1264 #
undef MPP_DO_CHECK_3D_V_
1265 #define MPP_DO_CHECK_3D_V_ mpp_do_check_r4_3dv
1267 #include <mpp_do_check.h>
1268 #include <mpp_do_checkV.h>
1272 #
undef VECTOR_FIELD_
1275 #
undef MPP_DO_CHECK_3D_
1276 #define MPP_DO_CHECK_3D_ mpp_do_check_c4_3d
1277 #include <mpp_do_check.h>
1282 #
undef MPP_DO_CHECK_3D_
1283 #define MPP_DO_CHECK_3D_ mpp_do_check_i4_3d
1284 #include <mpp_do_check.h>
1286 #
undef VECTOR_FIELD_
1287 #define VECTOR_FIELD_
1290 #
undef MPP_UPDATE_NEST_FINE_2D_
1291 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_r8_2D
1292 #
undef MPP_UPDATE_NEST_FINE_3D_
1293 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_r8_3D
1294 #
undef MPP_UPDATE_NEST_FINE_4D_
1295 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_r8_4D
1296 #
undef MPP_UPDATE_NEST_COARSE_2D_
1297 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_r8_2D
1298 #
undef MPP_UPDATE_NEST_COARSE_3D_
1299 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_r8_3D
1300 #
undef MPP_UPDATE_NEST_COARSE_4D_
1301 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_r8_4D
1302 #include <mpp_update_nest_domains.h>
1305 #
undef VECTOR_FIELD_
1306 #define VECTOR_FIELD_
1309 #
undef MPP_UPDATE_NEST_FINE_2D_
1310 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_c8_2D
1311 #
undef MPP_UPDATE_NEST_FINE_3D_
1312 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_c8_3D
1313 #
undef MPP_UPDATE_NEST_FINE_4D_
1314 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_c8_4D
1315 #
undef MPP_UPDATE_NEST_COARSE_2D_
1316 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_c8_2D
1317 #
undef MPP_UPDATE_NEST_COARSE_3D_
1318 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_c8_3D
1319 #
undef MPP_UPDATE_NEST_COARSE_4D_
1320 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_c8_4D
1321 #include <mpp_update_nest_domains.h>
1324 #ifndef no_8byte_integers
1325 #
undef VECTOR_FIELD_
1326 #define VECTOR_FIELD_
1329 #
undef MPP_UPDATE_NEST_FINE_2D_
1330 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_i8_2D
1331 #
undef MPP_UPDATE_NEST_FINE_3D_
1332 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_i8_3D
1333 #
undef MPP_UPDATE_NEST_FINE_4D_
1334 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_i8_4D
1335 #
undef MPP_UPDATE_NEST_COARSE_2D_
1336 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_i8_2D
1337 #
undef MPP_UPDATE_NEST_COARSE_3D_
1338 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_i8_3D
1339 #
undef MPP_UPDATE_NEST_COARSE_4D_
1340 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_i8_4D
1341 #include <mpp_update_nest_domains.h>
1345 #
undef VECTOR_FIELD_
1346 #define VECTOR_FIELD_
1349 #
undef MPP_UPDATE_NEST_FINE_2D_
1350 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_r4_2D
1351 #
undef MPP_UPDATE_NEST_FINE_3D_
1352 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_r4_3D
1353 #
undef MPP_UPDATE_NEST_FINE_4D_
1354 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_r4_4D
1355 #
undef MPP_UPDATE_NEST_COARSE_2D_
1356 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_r4_2D
1357 #
undef MPP_UPDATE_NEST_COARSE_3D_
1358 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_r4_3D
1359 #
undef MPP_UPDATE_NEST_COARSE_4D_
1360 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_r4_4D
1361 #include <mpp_update_nest_domains.h>
1365 #
undef VECTOR_FIELD_
1366 #define VECTOR_FIELD_
1369 #
undef MPP_UPDATE_NEST_FINE_2D_
1370 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_c4_2D
1371 #
undef MPP_UPDATE_NEST_FINE_3D_
1372 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_c4_3D
1373 #
undef MPP_UPDATE_NEST_FINE_4D_
1374 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_c4_4D
1375 #
undef MPP_UPDATE_NEST_COARSE_2D_
1376 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_c4_2D
1377 #
undef MPP_UPDATE_NEST_COARSE_3D_
1378 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_c4_3D
1379 #
undef MPP_UPDATE_NEST_COARSE_4D_
1380 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_c4_4D
1381 #include <mpp_update_nest_domains.h>
1384 #
undef VECTOR_FIELD_
1385 #define VECTOR_FIELD_
1388 #
undef MPP_UPDATE_NEST_FINE_2D_
1389 #define MPP_UPDATE_NEST_FINE_2D_ mpp_update_nest_fine_i4_2D
1390 #
undef MPP_UPDATE_NEST_FINE_3D_
1391 #define MPP_UPDATE_NEST_FINE_3D_ mpp_update_nest_fine_i4_3D
1392 #
undef MPP_UPDATE_NEST_FINE_4D_
1393 #define MPP_UPDATE_NEST_FINE_4D_ mpp_update_nest_fine_i4_4D
1394 #
undef MPP_UPDATE_NEST_COARSE_2D_
1395 #define MPP_UPDATE_NEST_COARSE_2D_ mpp_update_nest_coarse_i4_2D
1396 #
undef MPP_UPDATE_NEST_COARSE_3D_
1397 #define MPP_UPDATE_NEST_COARSE_3D_ mpp_update_nest_coarse_i4_3D
1398 #
undef MPP_UPDATE_NEST_COARSE_4D_
1399 #define MPP_UPDATE_NEST_COARSE_4D_ mpp_update_nest_coarse_i4_4D
1400 #include <mpp_update_nest_domains.h>
1402 #
undef VECTOR_FIELD_
1403 #define VECTOR_FIELD_
1406 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1407 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_r8_3D
1408 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1409 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_r8_3D
1410 #include <mpp_do_update_nest.h>
1413 #
undef VECTOR_FIELD_
1414 #define VECTOR_FIELD_
1417 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1418 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_c8_3D
1419 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1420 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_c8_3D
1421 #include <mpp_do_update_nest.h>
1424 #ifndef no_8byte_integers
1425 #
undef VECTOR_FIELD_
1426 #define VECTOR_FIELD_
1429 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1430 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_i8_3D
1431 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1432 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_i8_3D
1433 #include <mpp_do_update_nest.h>
1437 #
undef VECTOR_FIELD_
1438 #define VECTOR_FIELD_
1441 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1442 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_r4_3D
1443 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1444 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_r4_3D
1445 #include <mpp_do_update_nest.h>
1449 #
undef VECTOR_FIELD_
1450 #define VECTOR_FIELD_
1453 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1454 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_c4_3D
1455 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1456 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_c4_3D
1457 #include <mpp_do_update_nest.h>
1460 #
undef VECTOR_FIELD_
1461 #define VECTOR_FIELD_
1464 #
undef MPP_DO_UPDATE_NEST_FINE_3D_
1465 #define MPP_DO_UPDATE_NEST_FINE_3D_ mpp_do_update_nest_fine_i4_3D
1466 #
undef MPP_DO_UPDATE_NEST_COARSE_3D_
1467 #define MPP_DO_UPDATE_NEST_COARSE_3D_ mpp_do_update_nest_coarse_i4_3D
1468 #include <mpp_do_update_nest.h>
1471 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1473 ! MPP_UPDATE_DOMAINS_AD: adjoint
fill halos for 2D decomposition !
1475 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1476 #
undef VECTOR_FIELD_
1477 #define VECTOR_FIELD_
1480 #
undef MPP_UPDATE_DOMAINS_AD_2D_
1481 #define MPP_UPDATE_DOMAINS_AD_2D_ mpp_update_domains_ad_2D_r8_2D
1482 #
undef MPP_UPDATE_DOMAINS_AD_3D_
1483 #define MPP_UPDATE_DOMAINS_AD_3D_ mpp_update_domains_ad_2D_r8_3D
1484 #
undef MPP_UPDATE_DOMAINS_AD_4D_
1485 #define MPP_UPDATE_DOMAINS_AD_4D_ mpp_update_domains_ad_2D_r8_4D
1486 #
undef MPP_UPDATE_DOMAINS_AD_5D_
1487 #define MPP_UPDATE_DOMAINS_AD_5D_ mpp_update_domains_ad_2D_r8_5D
1488 #ifdef VECTOR_FIELD_
1489 #
undef MPP_UPDATE_DOMAINS_AD_2D_V_
1490 #define MPP_UPDATE_DOMAINS_AD_2D_V_ mpp_update_domains_ad_2D_r8_2Dv
1491 #
undef MPP_UPDATE_DOMAINS_AD_3D_V_
1492 #define MPP_UPDATE_DOMAINS_AD_3D_V_ mpp_update_domains_ad_2D_r8_3Dv
1493 #
undef MPP_UPDATE_DOMAINS_AD_4D_V_
1494 #define MPP_UPDATE_DOMAINS_AD_4D_V_ mpp_update_domains_ad_2D_r8_4Dv
1495 #
undef MPP_UPDATE_DOMAINS_AD_5D_V_
1496 #define MPP_UPDATE_DOMAINS_AD_5D_V_ mpp_update_domains_ad_2D_r8_5Dv
1498 #include <mpp_update_domains2D_ad.h>
1501 #
undef VECTOR_FIELD_
1502 #define VECTOR_FIELD_
1505 #
undef MPP_UPDATE_DOMAINS_AD_2D_
1506 #define MPP_UPDATE_DOMAINS_AD_2D_ mpp_update_domains_ad_2D_r4_2D
1507 #
undef MPP_UPDATE_DOMAINS_AD_3D_
1508 #define MPP_UPDATE_DOMAINS_AD_3D_ mpp_update_domains_ad_2D_r4_3D
1509 #
undef MPP_UPDATE_DOMAINS_AD_4D_
1510 #define MPP_UPDATE_DOMAINS_AD_4D_ mpp_update_domains_ad_2D_r4_4D
1511 #
undef MPP_UPDATE_DOMAINS_AD_5D_
1512 #define MPP_UPDATE_DOMAINS_AD_5D_ mpp_update_domains_ad_2D_r4_5D
1513 #ifdef VECTOR_FIELD_
1514 #
undef MPP_UPDATE_DOMAINS_AD_2D_V_
1515 #define MPP_UPDATE_DOMAINS_AD_2D_V_ mpp_update_domains_ad_2D_r4_2Dv
1516 #
undef MPP_UPDATE_DOMAINS_AD_3D_V_
1517 #define MPP_UPDATE_DOMAINS_AD_3D_V_ mpp_update_domains_ad_2D_r4_3Dv
1518 #
undef MPP_UPDATE_DOMAINS_AD_4D_V_
1519 #define MPP_UPDATE_DOMAINS_AD_4D_V_ mpp_update_domains_ad_2D_r4_4Dv
1520 #
undef MPP_UPDATE_DOMAINS_AD_5D_V_
1521 #define MPP_UPDATE_DOMAINS_AD_5D_V_ mpp_update_domains_ad_2D_r4_5Dv
1523 #include <mpp_update_domains2D_ad.h>
1528 !!$!*******************************************************
1529 #
undef VECTOR_FIELD_
1530 #define VECTOR_FIELD_
1533 #
undef MPP_DO_UPDATE_AD_3D_
1534 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_r8_3d
1535 #ifdef VECTOR_FIELD_
1536 #
undef MPP_DO_UPDATE_AD_3D_V_
1537 #define MPP_DO_UPDATE_AD_3D_V_ mpp_do_update_ad_r8_3dv
1539 #include <mpp_do_update_ad.h>
1540 #include <mpp_do_updateV_ad.h>
1543 #
undef VECTOR_FIELD_
1546 #
undef MPP_DO_UPDATE_AD_3D_
1547 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_c8_3d
1548 #include <mpp_do_update_ad.h>
1549 #define VECTOR_FIELD_
1552 #ifndef no_8byte_integers
1555 #
undef MPP_DO_UPDATE_AD_3D_
1556 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_i8_3d
1557 #include <mpp_do_update_ad.h>
1561 #
undef VECTOR_FIELD_
1562 #define VECTOR_FIELD_
1565 #
undef MPP_DO_UPDATE_AD_3D_
1566 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_r4_3d
1567 #ifdef VECTOR_FIELD_
1568 #
undef MPP_DO_UPDATE_AD_3D_V_
1569 #define MPP_DO_UPDATE_AD_3D_V_ mpp_do_update_ad_r4_3dv
1571 #include <mpp_do_update_ad.h>
1572 #include <mpp_do_updateV_ad.h>
1576 #
undef VECTOR_FIELD_
1579 #
undef MPP_DO_UPDATE_AD_3D_
1580 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_c4_3d
1581 #include <mpp_do_update_ad.h>
1582 #define VECTOR_FIELD_
1587 #
undef MPP_DO_UPDATE_AD_3D_
1588 #define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_i4_3d
1589 #include <mpp_do_update_ad.h>
1590 !!$#
undef VECTOR_FIELD_
1591 !!$#define VECTOR_FIELD_
1594 !!$#
undef MPP_DO_UPDATE_AD_3D_
1595 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_r8_3d
1596 !!$#ifdef VECTOR_FIELD_
1597 !!$#
undef MPP_DO_UPDATE_AD_3D_V_
1598 !!$#define MPP_DO_UPDATE_AD_3D_V_ mpp_do_update_ad_r8_3dv
1600 !!$#include <mpp_do_update_ad.h>
1601 !!$#include <mpp_do_updateV_ad.h>
1602 !!$#
undef VECTOR_FIELD_
1604 !!$#ifdef OVERLOAD_C8
1607 !!$#
undef MPP_DO_UPDATE_AD_3D_
1608 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_c8_3d
1609 !!$#include <mpp_do_update_ad.h>
1612 !!$#ifndef no_8byte_integers
1615 !!$#
undef MPP_DO_UPDATE_AD_3D_
1616 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_i8_3d
1617 !!$#include <mpp_do_update_ad.h>
1620 !!$#ifdef OVERLOAD_R4
1621 !!$#
undef VECTOR_FIELD_
1622 !!$#define VECTOR_FIELD_
1625 !!$#
undef MPP_DO_UPDATE_AD_3D_
1626 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_r4_3d
1627 !!$#ifdef VECTOR_FIELD_
1628 !!$#
undef MPP_DO_UPDATE_AD_3D_V_
1629 !!$#define MPP_DO_UPDATE_AD_3D_V_ mpp_do_update_ad_r4_3dv
1631 !!$#include <mpp_do_update_ad.h>
1632 !!$#include <mpp_do_updateV_ad.h>
1635 !!$#ifdef OVERLOAD_C4
1636 !!$#
undef VECTOR_FIELD_
1639 !!$#
undef MPP_DO_UPDATE_AD_3D_
1640 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_c4_3d
1641 !!$#include <mpp_do_update_ad.h>
1646 !!$#
undef MPP_DO_UPDATE_AD_3D_
1647 !!$#define MPP_DO_UPDATE_AD_3D_ mpp_do_update_ad_i4_3d
1648 !!$#include <mpp_do_update_ad.h>
1653 !********************************************************
1656 #
undef MPP_DO_REDISTRIBUTE_3D_
1657 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_r8_3D
1658 #include <mpp_do_redistribute.h>
1659 #
undef VECTOR_FIELD_
1664 #
undef MPP_DO_REDISTRIBUTE_3D_
1665 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_c8_3D
1666 #include <mpp_do_redistribute.h>
1669 #ifndef no_8byte_integers
1672 #
undef MPP_DO_REDISTRIBUTE_3D_
1673 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_i8_3D
1674 #include <mpp_do_redistribute.h>
1678 #
undef MPP_DO_REDISTRIBUTE_3D_
1679 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_l8_3D
1680 #include <mpp_do_redistribute.h>
1686 #
undef MPP_DO_REDISTRIBUTE_3D_
1687 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_r4_3D
1688 #include <mpp_do_redistribute.h>
1689 #
undef VECTOR_FIELD_
1695 #
undef MPP_DO_REDISTRIBUTE_3D_
1696 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_c4_3D
1697 #include <mpp_do_redistribute.h>
1702 #
undef MPP_DO_REDISTRIBUTE_3D_
1703 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_i4_3D
1704 #include <mpp_do_redistribute.h>
1708 #
undef MPP_DO_REDISTRIBUTE_3D_
1709 #define MPP_DO_REDISTRIBUTE_3D_ mpp_do_redistribute_l4_3D
1710 #include <mpp_do_redistribute.h>
1714 #
undef MPP_GET_BOUNDARY_2D_
1715 #define MPP_GET_BOUNDARY_2D_ mpp_get_boundary_r8_2d
1716 #
undef MPP_GET_BOUNDARY_3D_
1717 #define MPP_GET_BOUNDARY_3D_ mpp_get_boundary_r8_3d
1718 !#
undef MPP_GET_BOUNDARY_4D_
1719 !#define MPP_GET_BOUNDARY_4D_ mpp_get_boundary_r8_4d
1720 !#
undef MPP_GET_BOUNDARY_5D_
1721 !#define MPP_GET_BOUNDARY_5D_ mpp_get_boundary_r8_5d
1722 #
undef MPP_GET_BOUNDARY_2D_V_
1723 #define MPP_GET_BOUNDARY_2D_V_ mpp_get_boundary_r8_2dv
1724 #
undef MPP_GET_BOUNDARY_3D_V_
1725 #define MPP_GET_BOUNDARY_3D_V_ mpp_get_boundary_r8_3dv
1726 !#
undef MPP_GET_BOUNDARY_4D_V_
1727 !#define MPP_GET_BOUNDARY_4D_V_ mpp_get_boundary_r8_4dv
1728 !#
undef MPP_GET_BOUNDARY_5D_V_
1729 !#define MPP_GET_BOUNDARY_5D_V_ mpp_get_boundary_r8_5dv
1730 #include <mpp_get_boundary.h>
1734 #
undef MPP_GET_BOUNDARY_AD_2D_
1735 #define MPP_GET_BOUNDARY_AD_2D_ mpp_get_boundary_ad_r8_2d
1736 #
undef MPP_GET_BOUNDARY_AD_3D_
1737 #define MPP_GET_BOUNDARY_AD_3D_ mpp_get_boundary_ad_r8_3d
1738 #
undef MPP_GET_BOUNDARY_AD_2D_V_
1739 #define MPP_GET_BOUNDARY_AD_2D_V_ mpp_get_boundary_ad_r8_2dv
1740 #
undef MPP_GET_BOUNDARY_AD_3D_V_
1741 #define MPP_GET_BOUNDARY_AD_3D_V_ mpp_get_boundary_ad_r8_3dv
1742 #include <mpp_get_boundary_ad.h>
1747 #
undef MPP_GET_BOUNDARY_2D_
1748 #define MPP_GET_BOUNDARY_2D_ mpp_get_boundary_r4_2d
1749 #
undef MPP_GET_BOUNDARY_3D_
1750 #define MPP_GET_BOUNDARY_3D_ mpp_get_boundary_r4_3d
1751 !#
undef MPP_GET_BOUNDARY_4D_
1752 !#define MPP_GET_BOUNDARY_4D_ mpp_get_boundary_r4_4d
1753 !#
undef MPP_GET_BOUNDARY_5D_
1754 !#define MPP_GET_BOUNDARY_5D_ mpp_get_boundary_r4_5d
1755 #
undef MPP_GET_BOUNDARY_2D_V_
1756 #define MPP_GET_BOUNDARY_2D_V_ mpp_get_boundary_r4_2dv
1757 #
undef MPP_GET_BOUNDARY_3D_V_
1758 #define MPP_GET_BOUNDARY_3D_V_ mpp_get_boundary_r4_3dv
1759 !#
undef MPP_GET_BOUNDARY_4D_V_
1760 !#define MPP_GET_BOUNDARY_4D_V_ mpp_get_boundary_r4_4dv
1761 !#
undef MPP_GET_BOUNDARY_5D_V_
1762 !#define MPP_GET_BOUNDARY_5D_V_ mpp_get_boundary_r4_5dv
1763 #include <mpp_get_boundary.h>
1769 #
undef MPP_GET_BOUNDARY_AD_2D_
1770 #define MPP_GET_BOUNDARY_AD_2D_ mpp_get_boundary_ad_r4_2d
1771 #
undef MPP_GET_BOUNDARY_AD_3D_
1772 #define MPP_GET_BOUNDARY_AD_3D_ mpp_get_boundary_ad_r4_3d
1773 #
undef MPP_GET_BOUNDARY_AD_2D_V_
1774 #define MPP_GET_BOUNDARY_AD_2D_V_ mpp_get_boundary_ad_r4_2dv
1775 #
undef MPP_GET_BOUNDARY_AD_3D_V_
1776 #define MPP_GET_BOUNDARY_AD_3D_V_ mpp_get_boundary_ad_r4_3dv
1777 #include <mpp_get_boundary_ad.h>
1782 #
undef MPP_DO_GET_BOUNDARY_3D_
1783 #define MPP_DO_GET_BOUNDARY_3D_ mpp_do_get_boundary_r8_3d
1784 #
undef MPP_DO_GET_BOUNDARY_3DV_
1785 #define MPP_DO_GET_BOUNDARY_3D_V_ mpp_do_get_boundary_r8_3dv
1786 #include <mpp_do_get_boundary.h>
1790 #
undef MPP_DO_GET_BOUNDARY_AD_3D_
1791 #define MPP_DO_GET_BOUNDARY_AD_3D_ mpp_do_get_boundary_ad_r8_3d
1792 #
undef MPP_DO_GET_BOUNDARY_AD_3DV_
1793 #define MPP_DO_GET_BOUNDARY_AD_3D_V_ mpp_do_get_boundary_ad_r8_3dv
1794 #include <mpp_do_get_boundary_ad.h>
1799 #
undef MPP_DO_GET_BOUNDARY_3D_
1800 #define MPP_DO_GET_BOUNDARY_3D_ mpp_do_get_boundary_r4_3d
1801 #
undef MPP_DO_GET_BOUNDARY_3D_V_
1802 #define MPP_DO_GET_BOUNDARY_3D_V_ mpp_do_get_boundary_r4_3dv
1803 #include <mpp_do_get_boundary.h>
1809 #
undef MPP_DO_GET_BOUNDARY_AD_3D_
1810 #define MPP_DO_GET_BOUNDARY_AD_3D_ mpp_do_get_boundary_ad_r4_3d
1811 #
undef MPP_DO_GET_BOUNDARY_AD_3D_V_
1812 #define MPP_DO_GET_BOUNDARY_AD_3D_V_ mpp_do_get_boundary_ad_r4_3dv
1813 #include <mpp_do_get_boundary_ad.h>
1820 #
undef MPP_CREATE_GROUP_UPDATE_2D_
1821 #define MPP_CREATE_GROUP_UPDATE_2D_ mpp_create_group_update_r8_2d
1822 #
undef MPP_CREATE_GROUP_UPDATE_3D_
1823 #define MPP_CREATE_GROUP_UPDATE_3D_ mpp_create_group_update_r8_3d
1824 #
undef MPP_CREATE_GROUP_UPDATE_4D_
1825 #define MPP_CREATE_GROUP_UPDATE_4D_ mpp_create_group_update_r8_4d
1826 #
undef MPP_CREATE_GROUP_UPDATE_2D_V_
1827 #define MPP_CREATE_GROUP_UPDATE_2D_V_ mpp_create_group_update_r8_2dv
1828 #
undef MPP_CREATE_GROUP_UPDATE_3D_V_
1829 #define MPP_CREATE_GROUP_UPDATE_3D_V_ mpp_create_group_update_r8_3dv
1830 #
undef MPP_CREATE_GROUP_UPDATE_4D_V_
1831 #define MPP_CREATE_GROUP_UPDATE_4D_V_ mpp_create_group_update_r8_4dv
1832 #
undef MPP_DO_GROUP_UPDATE_
1833 #define MPP_DO_GROUP_UPDATE_ mpp_do_group_update_r8
1834 #
undef MPP_START_GROUP_UPDATE_
1835 #define MPP_START_GROUP_UPDATE_ mpp_start_group_update_r8
1836 #
undef MPP_COMPLETE_GROUP_UPDATE_
1837 #define MPP_COMPLETE_GROUP_UPDATE_ mpp_complete_group_update_r8
1838 #
undef MPP_RESET_GROUP_UPDATE_FIELD_2D_
1839 #define MPP_RESET_GROUP_UPDATE_FIELD_2D_ mpp_reset_group_update_field_r8_2d
1840 #
undef MPP_RESET_GROUP_UPDATE_FIELD_3D_
1841 #define MPP_RESET_GROUP_UPDATE_FIELD_3D_ mpp_reset_group_update_field_r8_3d
1842 #
undef MPP_RESET_GROUP_UPDATE_FIELD_4D_
1843 #define MPP_RESET_GROUP_UPDATE_FIELD_4D_ mpp_reset_group_update_field_r8_4d
1844 #
undef MPP_RESET_GROUP_UPDATE_FIELD_2D_V_
1845 #define MPP_RESET_GROUP_UPDATE_FIELD_2D_V_ mpp_reset_group_update_field_r8_2dv
1846 #
undef MPP_RESET_GROUP_UPDATE_FIELD_3D_V_
1847 #define MPP_RESET_GROUP_UPDATE_FIELD_3D_V_ mpp_reset_group_update_field_r8_3dv
1848 #
undef MPP_RESET_GROUP_UPDATE_FIELD_4D_V_
1849 #define MPP_RESET_GROUP_UPDATE_FIELD_4D_V_ mpp_reset_group_update_field_r8_4dv
1850 #include <mpp_group_update.h>
1856 #
undef MPP_CREATE_GROUP_UPDATE_2D_
1857 #define MPP_CREATE_GROUP_UPDATE_2D_ mpp_create_group_update_r4_2d
1858 #
undef MPP_CREATE_GROUP_UPDATE_3D_
1859 #define MPP_CREATE_GROUP_UPDATE_3D_ mpp_create_group_update_r4_3d
1860 #
undef MPP_CREATE_GROUP_UPDATE_4D_
1861 #define MPP_CREATE_GROUP_UPDATE_4D_ mpp_create_group_update_r4_4d
1862 #
undef MPP_CREATE_GROUP_UPDATE_2D_V_
1863 #define MPP_CREATE_GROUP_UPDATE_2D_V_ mpp_create_group_update_r4_2dv
1864 #
undef MPP_CREATE_GROUP_UPDATE_3D_V_
1865 #define MPP_CREATE_GROUP_UPDATE_3D_V_ mpp_create_group_update_r4_3dv
1866 #
undef MPP_CREATE_GROUP_UPDATE_4D_V_
1867 #define MPP_CREATE_GROUP_UPDATE_4D_V_ mpp_create_group_update_r4_4dv
1868 #
undef MPP_DO_GROUP_UPDATE_
1869 #define MPP_DO_GROUP_UPDATE_ mpp_do_group_update_r4
1870 #
undef MPP_START_GROUP_UPDATE_
1871 #define MPP_START_GROUP_UPDATE_ mpp_start_group_update_r4
1872 #
undef MPP_COMPLETE_GROUP_UPDATE_
1873 #define MPP_COMPLETE_GROUP_UPDATE_ mpp_complete_group_update_r4
1874 #
undef MPP_RESET_GROUP_UPDATE_FIELD_2D_
1875 #define MPP_RESET_GROUP_UPDATE_FIELD_2D_ mpp_reset_group_update_field_r4_2d
1876 #
undef MPP_RESET_GROUP_UPDATE_FIELD_3D_
1877 #define MPP_RESET_GROUP_UPDATE_FIELD_3D_ mpp_reset_group_update_field_r4_3d
1878 #
undef MPP_RESET_GROUP_UPDATE_FIELD_4D_
1879 #define MPP_RESET_GROUP_UPDATE_FIELD_4D_ mpp_reset_group_update_field_r4_4d
1880 #
undef MPP_RESET_GROUP_UPDATE_FIELD_2D_V_
1881 #define MPP_RESET_GROUP_UPDATE_FIELD_2D_V_ mpp_reset_group_update_field_r4_2dv
1882 #
undef MPP_RESET_GROUP_UPDATE_FIELD_3D_V_
1883 #define MPP_RESET_GROUP_UPDATE_FIELD_3D_V_ mpp_reset_group_update_field_r4_3dv
1884 #
undef MPP_RESET_GROUP_UPDATE_FIELD_4D_V_
1885 #define MPP_RESET_GROUP_UPDATE_FIELD_4D_V_ mpp_reset_group_update_field_r4_4dv
1886 #include <mpp_group_update.h>
integer mpp_domains_stack_hwm
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version will
type(ext_fieldtype), dimension(:), pointer, save, private field
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_UPDATE_NEST_FINE_2D_(field, nest_domain, wbuffer, ebuffer, sbuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_ ::wbuffer3D(size(wbuffer, 1), size(wbuffer, 2), 1) MPP_TYPE_ ::ebuffer3D(size(ebuffer, 1), size(ebuffer, 2), 1) MPP_TYPE_ ::sbuffer3D(size(sbuffer, 1), size(sbuffer, 2), 1) MPP_TYPE_ ::nbuffer3D(size(nbuffer, 1), size(nbuffer, 2), 1) pointer(ptr, field3D) pointer(ptr_w, wbuffer3D) pointer(ptr_e, ebuffer3D) pointer(ptr_s, sbuffer3D) pointer(ptr_n, nbuffer3D) ptr=LOC(field) ptr_w=LOC(wbuffer) ptr_e=LOC(ebuffer) ptr_s=LOC(sbuffer) ptr_n=LOC(nbuffer) call mpp_update_nest_fine(field3D, nest_domain, wbuffer3D, ebuffer3D, sbuffer3D, nbuffer3D, &flags, complete, position, extra_halo, name, tile_count) returnend subroutine MPP_UPDATE_NEST_FINE_2D_subroutine MPP_UPDATE_NEST_FINE_3D_(field, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::d_type type(nestSpec), pointer ::update=> set_mismatch integer ::tile update_position nbuffersz l_size integer
l_size ! loop over number of fields ke do je do i
l_size ! loop over number of fields ke do je do ie to PE
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> unit
integer nonblock_group_unpk_clock
integer, save, private iec
integer, parameter, public no
integer nonblock_group_send_clock
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_WRITE_UNLIMITED_AXIS_1D_(unit, field, domain, data, nelems_io) integer, intent(in) ::unit type(fieldtype), intent(inout) ::field type(domain2D), intent(inout) ::domain MPP_TYPE_, intent(inout) ::data(:) integer, intent(in) ::nelems_io(:) ! number of compressed elements from each ! member of the io_domain. It MUST have the ! same order as the io_domain pelist. integer, allocatable ::pelist(:) integer ::i, j, nelems, npes type(domain2d), pointer ::io_domain=> allocatable
subroutine, public copy(self, rhs)
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT end
integer nonblock_group_pack_clock
integer(long), parameter true
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_DO_REDISTRIBUTE_3D_(f_in, f_out, d_comm, d_type) integer(LONG_KIND), intent(in) ::f_in(:), f_out(:) type(DomainCommunicator2D), intent(in) ::d_comm MPP_TYPE_, intent(in) ::d_type MPP_TYPE_ ::field_in(d_comm%domain_in%x(1)%data%begin:d_comm%domain_in%x(1)%data%end, &d_comm%domain_in%y(1)%data%begin:d_comm%domain_in%y(1)%data%end, d_comm%ke) pointer(ptr_field_in, field_in) MPP_TYPE_ ::field_out(d_comm%domain_out%x(1)%data%begin:d_comm%domain_out%x(1)%data%end, &d_comm%domain_out%y(1)%data%begin:d_comm%domain_out%y(1)%data%end, d_comm%ke) pointer(ptr_field_out, field_out) type(domain2D), pointer ::domain_in, domain_out integer ::i, j, k, l, n, l_size integer ::is, ie, js, je integer ::ke integer ::list, pos, msgsize integer ::to_pe, from_pe MPP_TYPE_ ::buffer(size(mpp_domains_stack(:))) pointer(ptr, buffer) integer ::buffer_pos, wordlen, errunit!fix ke errunit=stderr() l_size=size(f_out(:)) ! equal to size(f_in(:)) ke=d_comm%ke domain_in=> d_comm domain_in
real(r8), dimension(cast_m, cast_n) p
integer(long), parameter false
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version and mpp_transmit will remain !backward compatible MPP_TYPE_
l_size ! loop over number of fields ke do j
integer, parameter, public west
l_size ! loop over number of fields ke do je do ie to je n if(.NOT. d_comm%R_do_buf(list)) cycle from_pe
logical module_is_initialized
l_size ! loop over number of fields ke do je do ie to to_pe
subroutine, public mpp_pset_init
character(len=input_str_length), dimension(:), allocatable, target, public input_nml_file
character(len=128) version
integer recv_clock_nonblock
integer send_pack_clock_nonblock
l_size ! loop over number of fields ke do je do ie to is
integer, parameter, public global
subroutine, private initialize
integer nonblock_group_wait_clock
subroutine, public info(self)
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call mpp_error(FATAL, 'MPP_TRANSMIT:you cannot transmit to ANY_PE using MPI.') else if(to_pe.NE.NULL_PE) then !no other valid cases except NULL_PE call mpp_error(FATAL
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this case
integer, parameter, public east
logical function received(this, seqno)
integer, save, private isc
type(field_def), target, save root
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_UPDATE_NEST_FINE_2D_(field, nest_domain, wbuffer, ebuffer, sbuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_ ::wbuffer3D(size(wbuffer, 1), size(wbuffer, 2), 1) MPP_TYPE_ ::ebuffer3D(size(ebuffer, 1), size(ebuffer, 2), 1) MPP_TYPE_ ::sbuffer3D(size(sbuffer, 1), size(sbuffer, 2), 1) MPP_TYPE_ ::nbuffer3D(size(nbuffer, 1), size(nbuffer, 2), 1) pointer(ptr, field3D) pointer(ptr_w, wbuffer3D) pointer(ptr_e, ebuffer3D) pointer(ptr_s, sbuffer3D) pointer(ptr_n, nbuffer3D) ptr=LOC(field) ptr_w=LOC(wbuffer) ptr_e=LOC(ebuffer) ptr_s=LOC(sbuffer) ptr_n=LOC(nbuffer) call mpp_update_nest_fine(field3D, nest_domain, wbuffer3D, ebuffer3D, sbuffer3D, nbuffer3D, &flags, complete, position, extra_halo, name, tile_count) returnend subroutine MPP_UPDATE_NEST_FINE_2D_subroutine MPP_UPDATE_NEST_FINE_3D_(field, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::d_type type(nestSpec), pointer ::update=> set_mismatch integer ::tile update_flags
integer, dimension(:), allocatable request_recv
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this ! since that attempts to gather all data on PE size(field%axes(:)) axsiz(i)
character(len=32) debug_update_domain
integer wait_clock_nonblock
integer, parameter, public north
integer, save, private jsc
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version and mpp_transmit will remain !backward compatible intent(inout) a
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_UPDATE_NEST_FINE_2D_(field, nest_domain, wbuffer, ebuffer, sbuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_ ::wbuffer3D(size(wbuffer, 1), size(wbuffer, 2), 1) MPP_TYPE_ ::ebuffer3D(size(ebuffer, 1), size(ebuffer, 2), 1) MPP_TYPE_ ::sbuffer3D(size(sbuffer, 1), size(sbuffer, 2), 1) MPP_TYPE_ ::nbuffer3D(size(nbuffer, 1), size(nbuffer, 2), 1) pointer(ptr, field3D) pointer(ptr_w, wbuffer3D) pointer(ptr_e, ebuffer3D) pointer(ptr_s, sbuffer3D) pointer(ptr_n, nbuffer3D) ptr=LOC(field) ptr_w=LOC(wbuffer) ptr_e=LOC(ebuffer) ptr_s=LOC(sbuffer) ptr_n=LOC(nbuffer) call mpp_update_nest_fine(field3D, nest_domain, wbuffer3D, ebuffer3D, sbuffer3D, nbuffer3D, &flags, complete, position, extra_halo, name, tile_count) returnend subroutine MPP_UPDATE_NEST_FINE_2D_subroutine MPP_UPDATE_NEST_FINE_3D_(field, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::d_type type(nestSpec), pointer ::update=> dimension(MAX_DOMAIN_FIELDS)
type(nonblock_type), dimension(:), allocatable nonblock_data
integer, dimension(:), allocatable size_recv
real(r8), dimension(cast_m, cast_n) t
integer, dimension(:), allocatable pelist
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If not
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call MPI_TYPE_
integer, save, private jec
l_size ! loop over number of fields ke do je do ie pos
integer, dimension(:), allocatable request_send
integer, parameter, public south
integer nonblock_group_recv_clock
subroutine, public some(xmap, some_arr, grid_id)
l_size ! loop over number of fields ke do je do ie to js
character(len=len(cs)) function lowercase(cs)
integer unpk_clock_nonblock
integer debug_update_level
integer, dimension(:), allocatable type_recv
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version and mpp_transmit will remain !backward compatible intent(inout) MPP_BROADCAST begin