32 subroutine mpp_init_f08( flags, localcomm, test_level, alt_input_nml_path )
34 integer,
optional,
intent(in) :: flags
35 type(mpi_comm),
optional,
intent(in) :: localcomm
37 integer,
optional,
intent(in) :: test_level
39 character(len=*),
optional,
intent(in) :: alt_input_nml_path
41 logical :: opened, existed
45 if( module_is_initialized )
return
48 call mpi_initialized( opened, error )
51 if (
present(localcomm))
then
52 mpp_comm_private = localcomm
54 call mpp_error(fatal,
'mpp_init: A communicator handle is required')
58 mpp_comm_private = mpi_comm_world
61 call mpi_comm_rank( mpp_comm_private, pe, error )
62 call mpi_comm_size( mpp_comm_private, npes, error )
72 module_is_initialized = .true.
73 if (
present(test_level))
then
78 if (t_level == 0)
return
81 allocate(peset(0:current_peset_max))
83 peset(:)%comm = mpi_comm_null
84 peset(:)%group = mpi_group_null
86 peset(:)%log2stride = -1
90 allocate( peset(0)%list(1) )
93 peset(0)%comm = mpp_comm_private
94 call mpi_comm_group( mpp_comm_private, peset(0)%group, error )
95 world_peset_num = get_peset( (/(i,i=0,npes-1)/) )
96 current_peset_num = world_peset_num
97 if (t_level == 1)
return
100 call system_clock( count=tick0, count_rate=ticks_per_sec, count_max=max_ticks )
101 tick_rate = 1./ticks_per_sec
102 clock0 =
mpp_clock_id(
'Total runtime', flags=mpp_clock_sync )
103 if (t_level == 2)
return
108 allocate(mpp_byte%sizes(0))
109 allocate(mpp_byte%subsizes(0))
110 allocate(mpp_byte%starts(0))
111 mpp_byte%etype = mpi_byte
112 mpp_byte%id = mpi_byte
114 mpp_byte%prev => null()
115 mpp_byte%next => null()
118 datatypes%head => mpp_byte
119 datatypes%tail => mpp_byte
122 if(
PRESENT(flags) )
then
123 debug = flags.EQ.mpp_debug
124 verbose = flags.EQ.mpp_verbose .OR. debug
126 if (t_level == 3)
return
128 call mpp_init_logfile()
130 if (
present(alt_input_nml_path))
then
135 if (t_level == 4)
return
138 read (input_nml_file, mpp_nml, iostat=io_status)
139 if (io_status > 0)
then
140 call mpp_error(fatal,
'=>mpp_init: Error reading mpp_nml')
142 if (t_level == 5)
return
144 if(sync_all_clocks .AND.
mpp_pe()==mpp_root_pe() )
call mpp_error(note, &
145 "mpp_mod: mpp_nml variable sync_all_clocks is set to .true., all clocks are synchronized in mpp_clock_begin.")
149 if(etc_unit_is_stderr)
then
152 if (trim(etcfile) /=
'/dev/null')
then
153 write( etcfile,
'(a,i6.6)' )trim(etcfile)//
'.', pe
155 inquire(file=etcfile, exist=existed)
157 open( newunit=etc_unit, file=trim(etcfile), status=
'REPLACE' )
159 open( newunit=etc_unit, file=trim(etcfile) )
163 if (t_level == 6)
return
166 max_request = max(max_request_min,
mpp_npes()*request_multiply)
168 allocate( request_send(max_request) )
169 allocate( request_recv(max_request) )
170 allocate( size_recv(max_request) )
171 allocate( type_recv(max_request) )
172 request_send(:) = mpi_request_null
173 request_recv(:) = mpi_request_null
175 type_recv(:) = mpi_datatype_null
177 if (t_level == 7)
return
181 if( verbose )
call mpp_error( note,
'MPP_INIT: initializing MPP module...' )
182 if( pe.EQ.root_pe )
then
183 write( iunit,
'(/a)' )
'MPP module '//trim(version)
184 write( iunit,
'(a,i6)' )
'MPP started with NPES=', npes
185 write( iunit,
'(a)' )
'Using MPI library for message passing...'
186 write( iunit,
'(a,es12.4,a,i10,a)' ) &
187 'Realtime clock resolution=', tick_rate,
' sec (', ticks_per_sec,
' ticks/sec)'
188 write( iunit,
'(a,es12.4,a,i20,a)' ) &
189 'Clock rolls over after ', max_ticks*tick_rate,
' sec (', max_ticks,
' ticks)'
190 write( iunit,
'(/a)' )
'MPP Parameter module '//trim(mpp_parameter_version)
191 write( iunit,
'(/a)' )
'MPP Data module '//trim(mpp_data_version)
196 call mpp_clock_begin(clock0)
205 integer :: i, j, n, nmax, out_unit, log_unit
206 real :: t, tmin, tmax, tavg, tstd
207 real :: m, mmin, mmax, mavg, mstd, t_total
209 type(mpp_type),
pointer :: dtype, next_dtype
211 if( .NOT.module_is_initialized )
return
213 call mpp_clock_end(clock0)
214 t_total = clocks(clock0)%total_ticks*tick_rate
217 if( clock_num.GT.0 )
then
218 if( any(clocks(1:clock_num)%detailed) )
then
219 call sum_clock_data;
call dump_clock_summary
223 call flush( out_unit )
226 if( pe.EQ.root_pe )
then
227 write( out_unit,
'(/a,i6,a)' )
'Tabulating mpp_clock statistics across ', npes,
' PEs...'
228 if( any(clocks(1:clock_num)%detailed) ) &
229 write( out_unit,
'(a)' )
' ... see mpp_clock.out.#### for details on individual PEs.'
230 write( out_unit,
'(/32x,a)' ) &
231 &
' hits tmin tmax tavg tstd tfrac grain pemin pemax'
233 write( log_unit,
'(/37x,a)' )
'time'
235 call flush( out_unit )
238 if( .NOT.any(peset(clocks(i)%peset_num)%list(:).EQ.pe) )cycle
243 t = clocks(i)%total_ticks*tick_rate
244 tmin = t;
call mpp_min(tmin)
245 tmax = t;
call mpp_max(tmax)
246 tavg = t;
call mpp_sum(tavg); tavg = tavg/
mpp_npes()
247 tstd = (t-tavg)**2;
call mpp_sum(tstd); tstd = sqrt( tstd/
mpp_npes() )
248 if( pe.EQ.root_pe )
write( out_unit,
'(a32,i10,4f14.6,f7.3,3i6)' ) &
249 clocks(i)%name, clocks(i)%hits, tmin, tmax, tavg, tstd, tavg/t_total, &
250 clocks(i)%grain, minval(peset(clocks(i)%peset_num)%list), &
251 maxval(peset(clocks(i)%peset_num)%list)
252 write(log_unit,
'(a32,f14.6)') clocks(i)%name, clocks(i)%total_ticks*tick_rate
255 if( any(clocks(1:clock_num)%detailed) .AND. pe.EQ.root_pe )
write( out_unit,
'(/32x,a)' ) &
256 ' tmin tmax tavg tstd mmin mmax mavg mstd mavg/tavg'
260 if( .NOT.clocks(i)%detailed )cycle
261 if( .NOT.any(peset(clocks(i)%peset_num)%list(:).EQ.pe) )cycle
264 do j = 1,max_event_types
265 n = clocks(i)%events(j)%calls; nmax = n
270 if( n.GT.0 )m = sum(clocks(i)%events(j)%bytes(1:n))
271 mmin = m;
call mpp_min(mmin)
272 mmax = m;
call mpp_max(mmax)
273 mavg = m;
call mpp_sum(mavg); mavg = mavg/
mpp_npes()
274 mstd = (m-mavg)**2;
call mpp_sum(mstd); mstd = sqrt( mstd/
mpp_npes() )
276 if( n.GT.0 )t = sum(clocks(i)%events(j)%ticks(1:n))*tick_rate
277 tmin = t;
call mpp_min(tmin)
278 tmax = t;
call mpp_max(tmax)
279 tavg = t;
call mpp_sum(tavg); tavg = tavg/
mpp_npes()
280 tstd = (t-tavg)**2;
call mpp_sum(tstd); tstd = sqrt( tstd/
mpp_npes() )
281 if( pe.EQ.root_pe )
write( out_unit,
'(a32,4f11.3,5es11.3)' ) &
282 trim(clocks(i)%name)//
' '//trim(clocks(i)%events(j)%name), &
283 tmin, tmax, tavg, tstd, mmin, mmax, mavg, mstd, mavg/tavg
290 call flush( out_unit )
292 inquire(unit=etc_unit, opened=opened)
294 call flush (etc_unit)
299 dtype => datatypes%head
300 do while (
associated(dtype))
301 next_dtype => dtype%next
308 call mpp_max(mpp_stack_hwm)
309 if( pe.EQ.root_pe )
write( out_unit,* )
'MPP_STACK high water mark=', mpp_stack_hwm
310 if(mpp_comm_private == mpi_comm_world )
call mpi_finalize(error)
318 integer,
intent(in) :: n
319 character(len=8) :: text
321 if( n.GT.mpp_stack_size .AND.
allocated(mpp_stack) )
deallocate(mpp_stack)
322 if( .NOT.
allocated(mpp_stack) )
then
323 allocate( mpp_stack(n) )
327 write( text,
'(i8)' )n
328 if( pe.EQ.root_pe )
call mpp_error( note,
'MPP_SET_STACK_SIZE: stack size set to '//text//
'.' )
340 character(len=*),
intent(inout) :: char_data(:)
341 integer,
intent(in) :: length
342 integer,
intent(in) :: from_pe
343 integer,
intent(in),
optional :: pelist(:)
344 integer :: n, i, from_rank
345 character :: str1D(length*size(char_data(:)))
348 if( .NOT.module_is_initialized )
call mpp_error( fatal,
'mpp_broadcast_text: You must first call mpp_init.' )
349 n = get_peset(pelist);
if( peset(n)%count.EQ.1 )
return
353 call system_clock(tick)
354 if(
mpp_pe() == mpp_root_pe())
then
355 write( stdout_unit,
'(a,i18,a,i5,a,2i5,2i8)' )&
356 'T=',tick,
' PE=',pe,
'mpp_broadcast_text begin: from_pe, length=', from_pe, length
360 if( .NOT.any(from_pe.EQ.peset(current_peset_num)%list) ) &
361 call mpp_error( fatal,
'mpp_broadcast_text: broadcasting from invalid PE.' )
363 if( debug .and. (current_clock.NE.0) )
call system_clock(start_tick)
366 if(peset(n)%list(i) == from_pe)
then
371 lptr = loc(char_data)
372 if(
mpp_npes().GT.1 )
call mpi_bcast( char_data, length*
size(char_data(:)), &
373 mpi_character, from_rank, peset(n)%comm, error )
374 if( debug .and. (current_clock.NE.0) )
call increment_current_clock( event_broadcast, length )
379 #define MPP_TYPE_INIT_VALUE 0.
382 #define MPP_TRANSMIT_ mpp_transmit_real8
383 #undef MPP_TRANSMIT_SCALAR_
384 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_real8_scalar
385 #undef MPP_TRANSMIT_2D_
386 #define MPP_TRANSMIT_2D_ mpp_transmit_real8_2d
387 #undef MPP_TRANSMIT_3D_
388 #define MPP_TRANSMIT_3D_ mpp_transmit_real8_3d
389 #undef MPP_TRANSMIT_4D_
390 #define MPP_TRANSMIT_4D_ mpp_transmit_real8_4d
391 #undef MPP_TRANSMIT_5D_
392 #define MPP_TRANSMIT_5D_ mpp_transmit_real8_5d
394 #define MPP_RECV_ mpp_recv_real8
395 #undef MPP_RECV_SCALAR_
396 #define MPP_RECV_SCALAR_ mpp_recv_real8_scalar
398 #define MPP_RECV_2D_ mpp_recv_real8_2d
400 #define MPP_RECV_3D_ mpp_recv_real8_3d
402 #define MPP_RECV_4D_ mpp_recv_real8_4d
404 #define MPP_RECV_5D_ mpp_recv_real8_5d
406 #define MPP_SEND_ mpp_send_real8
407 #undef MPP_SEND_SCALAR_
408 #define MPP_SEND_SCALAR_ mpp_send_real8_scalar
410 #define MPP_SEND_2D_ mpp_send_real8_2d
412 #define MPP_SEND_3D_ mpp_send_real8_3d
414 #define MPP_SEND_4D_ mpp_send_real8_4d
416 #define MPP_SEND_5D_ mpp_send_real8_5d
417 #undef MPP_BROADCAST_
418 #define MPP_BROADCAST_ mpp_broadcast_real8
419 #undef MPP_BROADCAST_SCALAR_
420 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_real8_scalar
421 #undef MPP_BROADCAST_2D_
422 #define MPP_BROADCAST_2D_ mpp_broadcast_real8_2d
423 #undef MPP_BROADCAST_3D_
424 #define MPP_BROADCAST_3D_ mpp_broadcast_real8_3d
425 #undef MPP_BROADCAST_4D_
426 #define MPP_BROADCAST_4D_ mpp_broadcast_real8_4d
427 #undef MPP_BROADCAST_5D_
428 #define MPP_BROADCAST_5D_ mpp_broadcast_real8_5d
430 #define MPP_SCATTERV_ mpp_scatterv_real8
432 #define MPP_GATHER_ mpp_gather_real8
434 #define MPP_GATHERV_ mpp_gatherv_real8
436 #define MPP_TYPE_ real(r8_kind)
437 #undef MPP_TYPE_BYTELEN_
438 #define MPP_TYPE_BYTELEN_ 8
440 #define MPI_TYPE_ MPI_REAL8
444 #include <mpp_transmit_mpi.fh>
448 #define MPP_TRANSMIT_ mpp_transmit_cmplx8
449 #undef MPP_TRANSMIT_SCALAR_
450 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_cmplx8_scalar
451 #undef MPP_TRANSMIT_2D_
452 #define MPP_TRANSMIT_2D_ mpp_transmit_cmplx8_2d
453 #undef MPP_TRANSMIT_3D_
454 #define MPP_TRANSMIT_3D_ mpp_transmit_cmplx8_3d
455 #undef MPP_TRANSMIT_4D_
456 #define MPP_TRANSMIT_4D_ mpp_transmit_cmplx8_4d
457 #undef MPP_TRANSMIT_5D_
458 #define MPP_TRANSMIT_5D_ mpp_transmit_cmplx8_5d
460 #define MPP_RECV_ mpp_recv_cmplx8
461 #undef MPP_RECV_SCALAR_
462 #define MPP_RECV_SCALAR_ mpp_recv_cmplx8_scalar
464 #define MPP_RECV_2D_ mpp_recv_cmplx8_2d
466 #define MPP_RECV_3D_ mpp_recv_cmplx8_3d
468 #define MPP_RECV_4D_ mpp_recv_cmplx8_4d
470 #define MPP_RECV_5D_ mpp_recv_cmplx8_5d
472 #define MPP_SEND_ mpp_send_cmplx8
473 #undef MPP_SEND_SCALAR_
474 #define MPP_SEND_SCALAR_ mpp_send_cmplx8_scalar
476 #define MPP_SEND_2D_ mpp_send_cmplx8_2d
478 #define MPP_SEND_3D_ mpp_send_cmplx8_3d
480 #define MPP_SEND_4D_ mpp_send_cmplx8_4d
482 #define MPP_SEND_5D_ mpp_send_cmplx8_5d
483 #undef MPP_BROADCAST_
484 #define MPP_BROADCAST_ mpp_broadcast_cmplx8
485 #undef MPP_BROADCAST_SCALAR_
486 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_cmplx8_scalar
487 #undef MPP_BROADCAST_2D_
488 #define MPP_BROADCAST_2D_ mpp_broadcast_cmplx8_2d
489 #undef MPP_BROADCAST_3D_
490 #define MPP_BROADCAST_3D_ mpp_broadcast_cmplx8_3d
491 #undef MPP_BROADCAST_4D_
492 #define MPP_BROADCAST_4D_ mpp_broadcast_cmplx8_4d
493 #undef MPP_BROADCAST_5D_
494 #define MPP_BROADCAST_5D_ mpp_broadcast_cmplx8_5d
496 #define MPP_SCATTERV_ mpp_scatterv_complx8
498 #define MPP_GATHER_ mpp_gather_complx8
500 #define MPP_GATHERV_ mpp_gatherv_complx8
502 #define MPP_TYPE_ complex(c8_kind)
503 #undef MPP_TYPE_BYTELEN_
504 #define MPP_TYPE_BYTELEN_ 16
506 #define MPI_TYPE_ MPI_DOUBLE_COMPLEX
507 #include <mpp_transmit_mpi.fh>
511 #define MPP_TRANSMIT_ mpp_transmit_real4
512 #undef MPP_TRANSMIT_SCALAR_
513 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_real4_scalar
514 #undef MPP_TRANSMIT_2D_
515 #define MPP_TRANSMIT_2D_ mpp_transmit_real4_2d
516 #undef MPP_TRANSMIT_3D_
517 #define MPP_TRANSMIT_3D_ mpp_transmit_real4_3d
518 #undef MPP_TRANSMIT_4D_
519 #define MPP_TRANSMIT_4D_ mpp_transmit_real4_4d
520 #undef MPP_TRANSMIT_5D_
521 #define MPP_TRANSMIT_5D_ mpp_transmit_real4_5d
523 #define MPP_RECV_ mpp_recv_real4
524 #undef MPP_RECV_SCALAR_
525 #define MPP_RECV_SCALAR_ mpp_recv_real4_scalar
527 #define MPP_RECV_2D_ mpp_recv_real4_2d
529 #define MPP_RECV_3D_ mpp_recv_real4_3d
531 #define MPP_RECV_4D_ mpp_recv_real4_4d
533 #define MPP_RECV_5D_ mpp_recv_real4_5d
535 #define MPP_SEND_ mpp_send_real4
536 #undef MPP_SEND_SCALAR_
537 #define MPP_SEND_SCALAR_ mpp_send_real4_scalar
539 #define MPP_SEND_2D_ mpp_send_real4_2d
541 #define MPP_SEND_3D_ mpp_send_real4_3d
543 #define MPP_SEND_4D_ mpp_send_real4_4d
545 #define MPP_SEND_5D_ mpp_send_real4_5d
546 #undef MPP_BROADCAST_
547 #define MPP_BROADCAST_ mpp_broadcast_real4
548 #undef MPP_BROADCAST_SCALAR_
549 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_real4_scalar
550 #undef MPP_BROADCAST_2D_
551 #define MPP_BROADCAST_2D_ mpp_broadcast_real4_2d
552 #undef MPP_BROADCAST_3D_
553 #define MPP_BROADCAST_3D_ mpp_broadcast_real4_3d
554 #undef MPP_BROADCAST_4D_
555 #define MPP_BROADCAST_4D_ mpp_broadcast_real4_4d
556 #undef MPP_BROADCAST_5D_
557 #define MPP_BROADCAST_5D_ mpp_broadcast_real4_5d
559 #define MPP_SCATTERV_ mpp_scatterv_real4
561 #define MPP_GATHER_ mpp_gather_real4
563 #define MPP_GATHERV_ mpp_gatherv_real4
565 #define MPP_TYPE_ real(r4_kind)
566 #undef MPP_TYPE_BYTELEN_
567 #define MPP_TYPE_BYTELEN_ 4
569 #define MPI_TYPE_ MPI_REAL4
570 #include <mpp_transmit_mpi.fh>
574 #define MPP_TRANSMIT_ mpp_transmit_cmplx4
575 #undef MPP_TRANSMIT_SCALAR_
576 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_cmplx4_scalar
577 #undef MPP_TRANSMIT_2D_
578 #define MPP_TRANSMIT_2D_ mpp_transmit_cmplx4_2d
579 #undef MPP_TRANSMIT_3D_
580 #define MPP_TRANSMIT_3D_ mpp_transmit_cmplx4_3d
581 #undef MPP_TRANSMIT_4D_
582 #define MPP_TRANSMIT_4D_ mpp_transmit_cmplx4_4d
583 #undef MPP_TRANSMIT_5D_
584 #define MPP_TRANSMIT_5D_ mpp_transmit_cmplx4_5d
586 #define MPP_RECV_ mpp_recv_cmplx4
587 #undef MPP_RECV_SCALAR_
588 #define MPP_RECV_SCALAR_ mpp_recv_cmplx4_scalar
590 #define MPP_RECV_2D_ mpp_recv_cmplx4_2d
592 #define MPP_RECV_3D_ mpp_recv_cmplx4_3d
594 #define MPP_RECV_4D_ mpp_recv_cmplx4_4d
596 #define MPP_RECV_5D_ mpp_recv_cmplx4_5d
598 #define MPP_SEND_ mpp_send_cmplx4
599 #undef MPP_SEND_SCALAR_
600 #define MPP_SEND_SCALAR_ mpp_send_cmplx4_scalar
602 #define MPP_SEND_2D_ mpp_send_cmplx4_2d
604 #define MPP_SEND_3D_ mpp_send_cmplx4_3d
606 #define MPP_SEND_4D_ mpp_send_cmplx4_4d
608 #define MPP_SEND_5D_ mpp_send_cmplx4_5d
609 #undef MPP_BROADCAST_
610 #define MPP_BROADCAST_ mpp_broadcast_cmplx4
611 #undef MPP_BROADCAST_SCALAR_
612 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_cmplx4_scalar
613 #undef MPP_BROADCAST_2D_
614 #define MPP_BROADCAST_2D_ mpp_broadcast_cmplx4_2d
615 #undef MPP_BROADCAST_3D_
616 #define MPP_BROADCAST_3D_ mpp_broadcast_cmplx4_3d
617 #undef MPP_BROADCAST_4D_
618 #define MPP_BROADCAST_4D_ mpp_broadcast_cmplx4_4d
619 #undef MPP_BROADCAST_5D_
620 #define MPP_BROADCAST_5D_ mpp_broadcast_cmplx4_5d
622 #define MPP_SCATTERV_ mpp_scatterv_cmplx4
624 #define MPP_GATHER_ mpp_gather_cmplx4
626 #define MPP_GATHERV_ mpp_gatherv_cmplx4
628 #define MPP_TYPE_ complex(c4_kind)
629 #undef MPP_TYPE_BYTELEN_
630 #define MPP_TYPE_BYTELEN_ 8
632 #define MPI_TYPE_ MPI_COMPLEX
633 #include <mpp_transmit_mpi.fh>
636 #undef MPP_TYPE_INIT_VALUE
637 #define MPP_TYPE_INIT_VALUE 0
639 #define MPP_TRANSMIT_ mpp_transmit_int8
640 #undef MPP_TRANSMIT_SCALAR_
641 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_int8_scalar
642 #undef MPP_TRANSMIT_2D_
643 #define MPP_TRANSMIT_2D_ mpp_transmit_int8_2d
644 #undef MPP_TRANSMIT_3D_
645 #define MPP_TRANSMIT_3D_ mpp_transmit_int8_3d
646 #undef MPP_TRANSMIT_4D_
647 #define MPP_TRANSMIT_4D_ mpp_transmit_int8_4d
648 #undef MPP_TRANSMIT_5D_
649 #define MPP_TRANSMIT_5D_ mpp_transmit_int8_5d
651 #define MPP_RECV_ mpp_recv_int8
652 #undef MPP_RECV_SCALAR_
653 #define MPP_RECV_SCALAR_ mpp_recv_int8_scalar
655 #define MPP_RECV_2D_ mpp_recv_int8_2d
657 #define MPP_RECV_3D_ mpp_recv_int8_3d
659 #define MPP_RECV_4D_ mpp_recv_int8_4d
661 #define MPP_RECV_5D_ mpp_recv_int8_5d
663 #define MPP_SEND_ mpp_send_int8
664 #undef MPP_SEND_SCALAR_
665 #define MPP_SEND_SCALAR_ mpp_send_int8_scalar
667 #define MPP_SEND_2D_ mpp_send_int8_2d
669 #define MPP_SEND_3D_ mpp_send_int8_3d
671 #define MPP_SEND_4D_ mpp_send_int8_4d
673 #define MPP_SEND_5D_ mpp_send_int8_5d
674 #undef MPP_BROADCAST_
675 #define MPP_BROADCAST_ mpp_broadcast_int8
676 #undef MPP_BROADCAST_SCALAR_
677 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_int8_scalar
678 #undef MPP_BROADCAST_2D_
679 #define MPP_BROADCAST_2D_ mpp_broadcast_int8_2d
680 #undef MPP_BROADCAST_3D_
681 #define MPP_BROADCAST_3D_ mpp_broadcast_int8_3d
682 #undef MPP_BROADCAST_4D_
683 #define MPP_BROADCAST_4D_ mpp_broadcast_int8_4d
684 #undef MPP_BROADCAST_5D_
685 #define MPP_BROADCAST_5D_ mpp_broadcast_int8_5d
687 #define MPP_SCATTERV_ mpp_scatterv_int8
689 #define MPP_GATHER_ mpp_gather_int8
691 #define MPP_GATHERV_ mpp_gatherv_int8
693 #define MPP_TYPE_ integer(i8_kind)
694 #undef MPP_TYPE_BYTELEN_
695 #define MPP_TYPE_BYTELEN_ 8
697 #define MPI_TYPE_ MPI_INTEGER8
698 #include <mpp_transmit_mpi.fh>
701 #define MPP_TRANSMIT_ mpp_transmit_int4
702 #undef MPP_TRANSMIT_SCALAR_
703 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_int4_scalar
704 #undef MPP_TRANSMIT_2D_
705 #define MPP_TRANSMIT_2D_ mpp_transmit_int4_2d
706 #undef MPP_TRANSMIT_3D_
707 #define MPP_TRANSMIT_3D_ mpp_transmit_int4_3d
708 #undef MPP_TRANSMIT_4D_
709 #define MPP_TRANSMIT_4D_ mpp_transmit_int4_4d
710 #undef MPP_TRANSMIT_5D_
711 #define MPP_TRANSMIT_5D_ mpp_transmit_int4_5d
713 #define MPP_RECV_ mpp_recv_int4
714 #undef MPP_RECV_SCALAR_
715 #define MPP_RECV_SCALAR_ mpp_recv_int4_scalar
717 #define MPP_RECV_2D_ mpp_recv_int4_2d
719 #define MPP_RECV_3D_ mpp_recv_int4_3d
721 #define MPP_RECV_4D_ mpp_recv_int4_4d
723 #define MPP_RECV_5D_ mpp_recv_int4_5d
725 #define MPP_SEND_ mpp_send_int4
726 #undef MPP_SEND_SCALAR_
727 #define MPP_SEND_SCALAR_ mpp_send_int4_scalar
729 #define MPP_SEND_2D_ mpp_send_int4_2d
731 #define MPP_SEND_3D_ mpp_send_int4_3d
733 #define MPP_SEND_4D_ mpp_send_int4_4d
735 #define MPP_SEND_5D_ mpp_send_int4_5d
736 #undef MPP_BROADCAST_
737 #define MPP_BROADCAST_ mpp_broadcast_int4
738 #undef MPP_BROADCAST_SCALAR_
739 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_int4_scalar
740 #undef MPP_BROADCAST_2D_
741 #define MPP_BROADCAST_2D_ mpp_broadcast_int4_2d
742 #undef MPP_BROADCAST_3D_
743 #define MPP_BROADCAST_3D_ mpp_broadcast_int4_3d
744 #undef MPP_BROADCAST_4D_
745 #define MPP_BROADCAST_4D_ mpp_broadcast_int4_4d
746 #undef MPP_BROADCAST_5D_
747 #define MPP_BROADCAST_5D_ mpp_broadcast_int4_5d
749 #define MPP_SCATTERV_ mpp_scatterv_int4
751 #define MPP_GATHER_ mpp_gather_int4
753 #define MPP_GATHERV_ mpp_gatherv_int4
755 #define MPP_TYPE_ integer(i4_kind)
756 #undef MPP_TYPE_BYTELEN_
757 #define MPP_TYPE_BYTELEN_ 4
759 #define MPI_TYPE_ MPI_INTEGER4
760 #include <mpp_transmit_mpi.fh>
762 #undef MPP_TYPE_INIT_VALUE
763 #define MPP_TYPE_INIT_VALUE .false.
765 #define MPP_TRANSMIT_ mpp_transmit_logical8
766 #undef MPP_TRANSMIT_SCALAR_
767 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_logical8_scalar
768 #undef MPP_TRANSMIT_2D_
769 #define MPP_TRANSMIT_2D_ mpp_transmit_logical8_2d
770 #undef MPP_TRANSMIT_3D_
771 #define MPP_TRANSMIT_3D_ mpp_transmit_logical8_3d
772 #undef MPP_TRANSMIT_4D_
773 #define MPP_TRANSMIT_4D_ mpp_transmit_logical8_4d
774 #undef MPP_TRANSMIT_5D_
775 #define MPP_TRANSMIT_5D_ mpp_transmit_logical8_5d
777 #define MPP_RECV_ mpp_recv_logical8
778 #undef MPP_RECV_SCALAR_
779 #define MPP_RECV_SCALAR_ mpp_recv_logical8_scalar
781 #define MPP_RECV_2D_ mpp_recv_logical8_2d
783 #define MPP_RECV_3D_ mpp_recv_logical8_3d
785 #define MPP_RECV_4D_ mpp_recv_logical8_4d
787 #define MPP_RECV_5D_ mpp_recv_logical8_5d
789 #define MPP_SEND_ mpp_send_logical8
790 #undef MPP_SEND_SCALAR_
791 #define MPP_SEND_SCALAR_ mpp_send_logical8_scalar
793 #define MPP_SEND_2D_ mpp_send_logical8_2d
795 #define MPP_SEND_3D_ mpp_send_logical8_3d
797 #define MPP_SEND_4D_ mpp_send_logical8_4d
799 #define MPP_SEND_5D_ mpp_send_logical8_5d
800 #undef MPP_BROADCAST_
801 #define MPP_BROADCAST_ mpp_broadcast_logical8
802 #undef MPP_BROADCAST_SCALAR_
803 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_logical8_scalar
804 #undef MPP_BROADCAST_2D_
805 #define MPP_BROADCAST_2D_ mpp_broadcast_logical8_2d
806 #undef MPP_BROADCAST_3D_
807 #define MPP_BROADCAST_3D_ mpp_broadcast_logical8_3d
808 #undef MPP_BROADCAST_4D_
809 #define MPP_BROADCAST_4D_ mpp_broadcast_logical8_4d
810 #undef MPP_BROADCAST_5D_
811 #define MPP_BROADCAST_5D_ mpp_broadcast_logical8_5d
813 #define MPP_SCATTERV_ mpp_scatterv_logical8
815 #define MPP_GATHER_ mpp_gather_logical8
817 #define MPP_GATHERV_ mpp_gatherv_logical8
819 #define MPP_TYPE_ logical(l8_kind)
820 #undef MPP_TYPE_BYTELEN_
821 #define MPP_TYPE_BYTELEN_ 8
823 #define MPI_TYPE_ MPI_INTEGER8
824 #include <mpp_transmit_mpi.fh>
827 #define MPP_TRANSMIT_ mpp_transmit_logical4
828 #undef MPP_TRANSMIT_SCALAR_
829 #define MPP_TRANSMIT_SCALAR_ mpp_transmit_logical4_scalar
830 #undef MPP_TRANSMIT_2D_
831 #define MPP_TRANSMIT_2D_ mpp_transmit_logical4_2d
832 #undef MPP_TRANSMIT_3D_
833 #define MPP_TRANSMIT_3D_ mpp_transmit_logical4_3d
834 #undef MPP_TRANSMIT_4D_
835 #define MPP_TRANSMIT_4D_ mpp_transmit_logical4_4d
836 #undef MPP_TRANSMIT_5D_
837 #define MPP_TRANSMIT_5D_ mpp_transmit_logical4_5d
839 #define MPP_RECV_ mpp_recv_logical4
840 #undef MPP_RECV_SCALAR_
841 #define MPP_RECV_SCALAR_ mpp_recv_logical4_scalar
843 #define MPP_RECV_2D_ mpp_recv_logical4_2d
845 #define MPP_RECV_3D_ mpp_recv_logical4_3d
847 #define MPP_RECV_4D_ mpp_recv_logical4_4d
849 #define MPP_RECV_5D_ mpp_recv_logical4_5d
851 #define MPP_SEND_ mpp_send_logical4
852 #undef MPP_SEND_SCALAR_
853 #define MPP_SEND_SCALAR_ mpp_send_logical4_scalar
855 #define MPP_SEND_2D_ mpp_send_logical4_2d
857 #define MPP_SEND_3D_ mpp_send_logical4_3d
859 #define MPP_SEND_4D_ mpp_send_logical4_4d
861 #define MPP_SEND_5D_ mpp_send_logical4_5d
862 #undef MPP_BROADCAST_
863 #define MPP_BROADCAST_ mpp_broadcast_logical4
864 #undef MPP_BROADCAST_SCALAR_
865 #define MPP_BROADCAST_SCALAR_ mpp_broadcast_logical4_scalar
866 #undef MPP_BROADCAST_2D_
867 #define MPP_BROADCAST_2D_ mpp_broadcast_logical4_2d
868 #undef MPP_BROADCAST_3D_
869 #define MPP_BROADCAST_3D_ mpp_broadcast_logical4_3d
870 #undef MPP_BROADCAST_4D_
871 #define MPP_BROADCAST_4D_ mpp_broadcast_logical4_4d
872 #undef MPP_BROADCAST_5D_
873 #define MPP_BROADCAST_5D_ mpp_broadcast_logical4_5d
875 #define MPP_SCATTERV_ mpp_scatterv_logical4
877 #define MPP_GATHER_ mpp_gather_logical4
879 #define MPP_GATHERV_ mpp_gatherv_logical4
881 #define MPP_TYPE_ logical(l4_kind)
882 #undef MPP_TYPE_BYTELEN_
883 #define MPP_TYPE_BYTELEN_ 4
885 #define MPI_TYPE_ MPI_INTEGER4
886 #include <mpp_transmit_mpi.fh>
887 #undef MPP_TYPE_INIT_VALUE
894 #undef MPP_REDUCE_0D_
895 #define MPP_REDUCE_0D_ mpp_max_real8_0d
896 #undef MPP_REDUCE_1D_
897 #define MPP_REDUCE_1D_ mpp_max_real8_1d
899 #define MPP_TYPE_ real(r8_kind)
900 #undef MPP_TYPE_BYTELEN_
901 #define MPP_TYPE_BYTELEN_ 8
903 #define MPI_TYPE_ MPI_REAL8
905 #define MPI_REDUCE_ MPI_MAX
906 #include <mpp_reduce_mpi.fh>
908 #undef MPP_REDUCE_0D_
909 #define MPP_REDUCE_0D_ mpp_max_real4_0d
910 #undef MPP_REDUCE_1D_
911 #define MPP_REDUCE_1D_ mpp_max_real4_1d
913 #define MPP_TYPE_ real(r4_kind)
914 #undef MPP_TYPE_BYTELEN_
915 #define MPP_TYPE_BYTELEN_ 4
917 #define MPI_TYPE_ MPI_REAL4
919 #define MPI_REDUCE_ MPI_MAX
920 #include <mpp_reduce_mpi.fh>
922 #undef MPP_REDUCE_0D_
923 #define MPP_REDUCE_0D_ mpp_max_int8_0d
924 #undef MPP_REDUCE_1D_
925 #define MPP_REDUCE_1D_ mpp_max_int8_1d
927 #define MPP_TYPE_ integer(i8_kind)
928 #undef MPP_TYPE_BYTELEN_
929 #define MPP_TYPE_BYTELEN_ 8
931 #define MPI_TYPE_ MPI_INTEGER8
933 #define MPI_REDUCE_ MPI_MAX
934 #include <mpp_reduce_mpi.fh>
936 #undef MPP_REDUCE_0D_
937 #define MPP_REDUCE_0D_ mpp_max_int4_0d
938 #undef MPP_REDUCE_1D_
939 #define MPP_REDUCE_1D_ mpp_max_int4_1d
941 #define MPP_TYPE_ integer(i4_kind)
942 #undef MPP_TYPE_BYTELEN_
943 #define MPP_TYPE_BYTELEN_ 4
945 #define MPI_TYPE_ MPI_INTEGER4
947 #define MPI_REDUCE_ MPI_MAX
948 #include <mpp_reduce_mpi.fh>
950 #undef MPP_REDUCE_0D_
951 #define MPP_REDUCE_0D_ mpp_min_real8_0d
952 #undef MPP_REDUCE_1D_
953 #define MPP_REDUCE_1D_ mpp_min_real8_1d
955 #define MPP_TYPE_ real(r8_kind)
956 #undef MPP_TYPE_BYTELEN_
957 #define MPP_TYPE_BYTELEN_ 8
959 #define MPI_TYPE_ MPI_REAL8
961 #define MPI_REDUCE_ MPI_MIN
962 #include <mpp_reduce_mpi.fh>
964 #undef MPP_REDUCE_0D_
965 #define MPP_REDUCE_0D_ mpp_min_real4_0d
966 #undef MPP_REDUCE_1D_
967 #define MPP_REDUCE_1D_ mpp_min_real4_1d
969 #define MPP_TYPE_ real(r4_kind)
970 #undef MPP_TYPE_BYTELEN_
971 #define MPP_TYPE_BYTELEN_ 4
973 #define MPI_TYPE_ MPI_REAL4
975 #define MPI_REDUCE_ MPI_MIN
976 #include <mpp_reduce_mpi.fh>
978 #undef MPP_REDUCE_0D_
979 #define MPP_REDUCE_0D_ mpp_min_int8_0d
980 #undef MPP_REDUCE_1D_
981 #define MPP_REDUCE_1D_ mpp_min_int8_1d
983 #define MPP_TYPE_ integer(i8_kind)
984 #undef MPP_TYPE_BYTELEN_
985 #define MPP_TYPE_BYTELEN_ 8
987 #define MPI_TYPE_ MPI_INTEGER8
989 #define MPI_REDUCE_ MPI_MIN
990 #include <mpp_reduce_mpi.fh>
992 #undef MPP_REDUCE_0D_
993 #define MPP_REDUCE_0D_ mpp_min_int4_0d
994 #undef MPP_REDUCE_1D_
995 #define MPP_REDUCE_1D_ mpp_min_int4_1d
997 #define MPP_TYPE_ integer(i4_kind)
998 #undef MPP_TYPE_BYTELEN_
999 #define MPP_TYPE_BYTELEN_ 4
1001 #define MPI_TYPE_ MPI_INTEGER4
1003 #define MPI_REDUCE_ MPI_MIN
1004 #include <mpp_reduce_mpi.fh>
1007 #define MPP_SUM_ mpp_sum_real8
1008 #undef MPP_SUM_SCALAR_
1009 #define MPP_SUM_SCALAR_ mpp_sum_real8_scalar
1011 #define MPP_SUM_2D_ mpp_sum_real8_2d
1013 #define MPP_SUM_3D_ mpp_sum_real8_3d
1015 #define MPP_SUM_4D_ mpp_sum_real8_4d
1017 #define MPP_SUM_5D_ mpp_sum_real8_5d
1019 #define MPP_TYPE_ real(r8_kind)
1021 #define MPI_TYPE_ MPI_REAL8
1022 #undef MPP_TYPE_BYTELEN_
1023 #define MPP_TYPE_BYTELEN_ 8
1024 #include <mpp_sum_mpi.fh>
1028 #define MPP_SUM_ mpp_sum_cmplx8
1029 #undef MPP_SUM_SCALAR_
1030 #define MPP_SUM_SCALAR_ mpp_sum_cmplx8_scalar
1032 #define MPP_SUM_2D_ mpp_sum_cmplx8_2d
1034 #define MPP_SUM_3D_ mpp_sum_cmplx8_3d
1036 #define MPP_SUM_4D_ mpp_sum_cmplx8_4d
1038 #define MPP_SUM_5D_ mpp_sum_cmplx8_5d
1040 #define MPP_TYPE_ complex(c8_kind)
1042 #define MPI_TYPE_ MPI_DOUBLE_COMPLEX
1043 #undef MPP_TYPE_BYTELEN_
1044 #define MPP_TYPE_BYTELEN_ 16
1045 #include <mpp_sum_mpi.fh>
1049 #define MPP_SUM_ mpp_sum_real4
1050 #undef MPP_SUM_SCALAR_
1051 #define MPP_SUM_SCALAR_ mpp_sum_real4_scalar
1053 #define MPP_SUM_2D_ mpp_sum_real4_2d
1055 #define MPP_SUM_3D_ mpp_sum_real4_3d
1057 #define MPP_SUM_4D_ mpp_sum_real4_4d
1059 #define MPP_SUM_5D_ mpp_sum_real4_5d
1061 #define MPP_TYPE_ real(r4_kind)
1063 #define MPI_TYPE_ MPI_REAL4
1064 #undef MPP_TYPE_BYTELEN_
1065 #define MPP_TYPE_BYTELEN_ 4
1066 #include <mpp_sum_mpi.fh>
1070 #define MPP_SUM_ mpp_sum_cmplx4
1071 #undef MPP_SUM_SCALAR_
1072 #define MPP_SUM_SCALAR_ mpp_sum_cmplx4_scalar
1074 #define MPP_SUM_2D_ mpp_sum_cmplx4_2d
1076 #define MPP_SUM_3D_ mpp_sum_cmplx4_3d
1078 #define MPP_SUM_4D_ mpp_sum_cmplx4_4d
1080 #define MPP_SUM_5D_ mpp_sum_cmplx4_5d
1082 #define MPP_TYPE_ complex(c4_kind)
1084 #define MPI_TYPE_ MPI_COMPLEX
1085 #undef MPP_TYPE_BYTELEN_
1086 #define MPP_TYPE_BYTELEN_ 8
1087 #include <mpp_sum_mpi.fh>
1091 #define MPP_SUM_ mpp_sum_int8
1092 #undef MPP_SUM_SCALAR_
1093 #define MPP_SUM_SCALAR_ mpp_sum_int8_scalar
1095 #define MPP_SUM_2D_ mpp_sum_int8_2d
1097 #define MPP_SUM_3D_ mpp_sum_int8_3d
1099 #define MPP_SUM_4D_ mpp_sum_int8_4d
1101 #define MPP_SUM_5D_ mpp_sum_int8_5d
1103 #define MPP_TYPE_ integer(i8_kind)
1105 #define MPI_TYPE_ MPI_INTEGER8
1106 #undef MPP_TYPE_BYTELEN_
1107 #define MPP_TYPE_BYTELEN_ 8
1108 #include <mpp_sum_mpi.fh>
1111 #define MPP_SUM_ mpp_sum_int4
1112 #undef MPP_SUM_SCALAR_
1113 #define MPP_SUM_SCALAR_ mpp_sum_int4_scalar
1115 #define MPP_SUM_2D_ mpp_sum_int4_2d
1117 #define MPP_SUM_3D_ mpp_sum_int4_3d
1119 #define MPP_SUM_4D_ mpp_sum_int4_4d
1121 #define MPP_SUM_5D_ mpp_sum_int4_5d
1123 #define MPP_TYPE_ integer(i4_kind)
1125 #define MPI_TYPE_ MPI_INTEGER4
1126 #undef MPP_TYPE_BYTELEN_
1127 #define MPP_TYPE_BYTELEN_ 4
1128 #include <mpp_sum_mpi.fh>
1131 #define MPP_SUM_AD_ mpp_sum_real8_ad
1132 #undef MPP_SUM_SCALAR_AD_
1133 #define MPP_SUM_SCALAR_AD_ mpp_sum_real8_scalar_ad
1134 #undef MPP_SUM_2D_AD_
1135 #define MPP_SUM_2D_AD_ mpp_sum_real8_2d_ad
1136 #undef MPP_SUM_3D_AD_
1137 #define MPP_SUM_3D_AD_ mpp_sum_real8_3d_ad
1138 #undef MPP_SUM_4D_AD_
1139 #define MPP_SUM_4D_AD_ mpp_sum_real8_4d_ad
1140 #undef MPP_SUM_5D_AD_
1141 #define MPP_SUM_5D_AD_ mpp_sum_real8_5d_ad
1143 #define MPP_TYPE_ real(r8_kind)
1145 #define MPI_TYPE_ MPI_REAL8
1146 #undef MPP_TYPE_BYTELEN_
1147 #define MPP_TYPE_BYTELEN_ 8
1148 #include <mpp_sum_mpi_ad.fh>
1152 #define MPP_SUM_AD_ mpp_sum_cmplx8_ad
1153 #undef MPP_SUM_SCALAR_AD_
1154 #define MPP_SUM_SCALAR_AD_ mpp_sum_cmplx8_scalar_ad
1155 #undef MPP_SUM_2D_AD_
1156 #define MPP_SUM_2D_AD_ mpp_sum_cmplx8_2d_ad
1157 #undef MPP_SUM_3D_AD_
1158 #define MPP_SUM_3D_AD_ mpp_sum_cmplx8_3d_ad
1159 #undef MPP_SUM_4D_AD_
1160 #define MPP_SUM_4D_AD_ mpp_sum_cmplx8_4d_ad
1161 #undef MPP_SUM_5D_AD_
1162 #define MPP_SUM_5D_AD_ mpp_sum_cmplx8_5d_ad
1164 #define MPP_TYPE_ complex(c8_kind)
1166 #define MPI_TYPE_ MPI_DOUBLE_COMPLEX
1167 #undef MPP_TYPE_BYTELEN_
1168 #define MPP_TYPE_BYTELEN_ 16
1169 #include <mpp_sum_mpi_ad.fh>
1173 #define MPP_SUM_AD_ mpp_sum_real4_ad
1174 #undef MPP_SUM_SCALAR_AD_
1175 #define MPP_SUM_SCALAR_AD_ mpp_sum_real4_scalar_ad
1176 #undef MPP_SUM_2D_AD_
1177 #define MPP_SUM_2D_AD_ mpp_sum_real4_2d_ad
1178 #undef MPP_SUM_3D_AD_
1179 #define MPP_SUM_3D_AD_ mpp_sum_real4_3d_ad
1180 #undef MPP_SUM_4D_AD_
1181 #define MPP_SUM_4D_AD_ mpp_sum_real4_4d_ad
1182 #undef MPP_SUM_5D_AD_
1183 #define MPP_SUM_5D_AD_ mpp_sum_real4_5d_ad
1185 #define MPP_TYPE_ real(r4_kind)
1187 #define MPI_TYPE_ MPI_REAL4
1188 #undef MPP_TYPE_BYTELEN_
1189 #define MPP_TYPE_BYTELEN_ 4
1190 #include <mpp_sum_mpi_ad.fh>
1194 #define MPP_SUM_AD_ mpp_sum_cmplx4_ad
1195 #undef MPP_SUM_SCALAR_AD_
1196 #define MPP_SUM_SCALAR_AD_ mpp_sum_cmplx4_scalar_ad
1197 #undef MPP_SUM_2D_AD_
1198 #define MPP_SUM_2D_AD_ mpp_sum_cmplx4_2d_ad
1199 #undef MPP_SUM_3D_AD_
1200 #define MPP_SUM_3D_AD_ mpp_sum_cmplx4_3d_ad
1201 #undef MPP_SUM_4D_AD_
1202 #define MPP_SUM_4D_AD_ mpp_sum_cmplx4_4d_ad
1203 #undef MPP_SUM_5D_AD_
1204 #define MPP_SUM_5D_AD_ mpp_sum_cmplx4_5d_ad
1206 #define MPP_TYPE_ complex(c4_kind)
1208 #define MPI_TYPE_ MPI_COMPLEX
1209 #undef MPP_TYPE_BYTELEN_
1210 #define MPP_TYPE_BYTELEN_ 8
1211 #include <mpp_sum_mpi_ad.fh>
1215 #define MPP_SUM_AD_ mpp_sum_int8_ad
1216 #undef MPP_SUM_SCALAR_AD_
1217 #define MPP_SUM_SCALAR_AD_ mpp_sum_int8_scalar_ad
1218 #undef MPP_SUM_2D_AD_
1219 #define MPP_SUM_2D_AD_ mpp_sum_int8_2d_ad
1220 #undef MPP_SUM_3D_AD_
1221 #define MPP_SUM_3D_AD_ mpp_sum_int8_3d_ad
1222 #undef MPP_SUM_4D_AD_
1223 #define MPP_SUM_4D_AD_ mpp_sum_int8_4d_ad
1224 #undef MPP_SUM_5D_AD_
1225 #define MPP_SUM_5D_AD_ mpp_sum_int8_5d_ad
1227 #define MPP_TYPE_ integer(i8_kind)
1229 #define MPI_TYPE_ MPI_INTEGER8
1230 #undef MPP_TYPE_BYTELEN_
1231 #define MPP_TYPE_BYTELEN_ 8
1232 #include <mpp_sum_mpi_ad.fh>
1235 #define MPP_SUM_AD_ mpp_sum_int4_ad
1236 #undef MPP_SUM_SCALAR_AD_
1237 #define MPP_SUM_SCALAR_AD_ mpp_sum_int4_scalar_ad
1238 #undef MPP_SUM_2D_AD_
1239 #define MPP_SUM_2D_AD_ mpp_sum_int4_2d_ad
1240 #undef MPP_SUM_3D_AD_
1241 #define MPP_SUM_3D_AD_ mpp_sum_int4_3d_ad
1242 #undef MPP_SUM_4D_AD_
1243 #define MPP_SUM_4D_AD_ mpp_sum_int4_4d_ad
1244 #undef MPP_SUM_5D_AD_
1245 #define MPP_SUM_5D_AD_ mpp_sum_int4_5d_ad
1247 #define MPP_TYPE_ integer(i4_kind)
1249 #define MPI_TYPE_ MPI_INTEGER4
1250 #undef MPP_TYPE_BYTELEN_
1251 #define MPP_TYPE_BYTELEN_ 4
1252 #include <mpp_sum_mpi_ad.fh>
1260 #undef MPP_ALLTOALL_
1261 #undef MPP_ALLTOALLV_
1262 #undef MPP_ALLTOALLW_
1264 #undef MPP_TYPE_BYTELEN_
1266 #define MPP_ALLTOALL_ mpp_alltoall_int4
1267 #define MPP_ALLTOALLV_ mpp_alltoall_int4_v
1268 #define MPP_ALLTOALLW_ mpp_alltoall_int4_w
1269 #define MPP_TYPE_ integer(i4_kind)
1270 #define MPP_TYPE_BYTELEN_ 4
1271 #define MPI_TYPE_ MPI_INTEGER4
1272 #include <mpp_alltoall_mpi.fh>
1274 #undef MPP_ALLTOALL_
1275 #undef MPP_ALLTOALLV_
1276 #undef MPP_ALLTOALLW_
1278 #undef MPP_TYPE_BYTELEN_
1280 #define MPP_ALLTOALL_ mpp_alltoall_int8
1281 #define MPP_ALLTOALLV_ mpp_alltoall_int8_v
1282 #define MPP_ALLTOALLW_ mpp_alltoall_int8_w
1283 #define MPP_TYPE_ integer(i8_kind)
1284 #define MPP_TYPE_BYTELEN_ 8
1285 #define MPI_TYPE_ MPI_INTEGER8
1286 #include <mpp_alltoall_mpi.fh>
1288 #undef MPP_ALLTOALL_
1289 #undef MPP_ALLTOALLV_
1290 #undef MPP_ALLTOALLW_
1292 #undef MPP_TYPE_BYTELEN_
1294 #define MPP_ALLTOALL_ mpp_alltoall_real4
1295 #define MPP_ALLTOALLV_ mpp_alltoall_real4_v
1296 #define MPP_ALLTOALLW_ mpp_alltoall_real4_w
1297 #define MPP_TYPE_ real(r4_kind)
1298 #define MPP_TYPE_BYTELEN_ 4
1299 #define MPI_TYPE_ MPI_REAL4
1300 #include <mpp_alltoall_mpi.fh>
1302 #undef MPP_ALLTOALL_
1303 #undef MPP_ALLTOALLV_
1304 #undef MPP_ALLTOALLW_
1306 #undef MPP_TYPE_BYTELEN_
1308 #define MPP_ALLTOALL_ mpp_alltoall_real8
1309 #define MPP_ALLTOALLV_ mpp_alltoall_real8_v
1310 #define MPP_ALLTOALLW_ mpp_alltoall_real8_w
1311 #define MPP_TYPE_ real(r8_kind)
1312 #define MPP_TYPE_BYTELEN_ 8
1313 #define MPI_TYPE_ MPI_REAL8
1314 #include <mpp_alltoall_mpi.fh>
1317 #undef MPP_ALLTOALL_
1318 #undef MPP_ALLTOALLV_
1319 #undef MPP_ALLTOALLW_
1321 #undef MPP_TYPE_BYTELEN_
1323 #define MPP_ALLTOALL_ mpp_alltoall_cmplx4
1324 #define MPP_ALLTOALLV_ mpp_alltoall_cmplx4_v
1325 #define MPP_ALLTOALLW_ mpp_alltoall_cmplx4_w
1326 #define MPP_TYPE_ complex(c4_kind)
1327 #define MPP_TYPE_BYTELEN_ 8
1328 #define MPI_TYPE_ MPI_COMPLEX8
1329 #include <mpp_alltoall_mpi.fh>
1333 #undef MPP_ALLTOALL_
1334 #undef MPP_ALLTOALLV_
1335 #undef MPP_ALLTOALLW_
1337 #undef MPP_TYPE_BYTELEN_
1339 #define MPP_ALLTOALL_ mpp_alltoall_cmplx8
1340 #define MPP_ALLTOALLV_ mpp_alltoall_cmplx8_v
1341 #define MPP_ALLTOALLW_ mpp_alltoall_cmplx8_w
1342 #define MPP_TYPE_ complex(c8_kind)
1343 #define MPP_TYPE_BYTELEN_ 16
1344 #define MPI_TYPE_ MPI_COMPLEX16
1345 #include <mpp_alltoall_mpi.fh>
1348 #undef MPP_ALLTOALL_
1349 #undef MPP_ALLTOALLV_
1350 #undef MPP_ALLTOALLW_
1352 #undef MPP_TYPE_BYTELEN_
1354 #define MPP_ALLTOALL_ mpp_alltoall_logical4
1355 #define MPP_ALLTOALLV_ mpp_alltoall_logical4_v
1356 #define MPP_ALLTOALLW_ mpp_alltoall_logical4_w
1357 #define MPP_TYPE_ logical(l4_kind)
1358 #define MPP_TYPE_BYTELEN_ 4
1359 #define MPI_TYPE_ MPI_INTEGER4
1360 #include <mpp_alltoall_mpi.fh>
1362 #undef MPP_ALLTOALL_
1363 #undef MPP_ALLTOALLV_
1364 #undef MPP_ALLTOALLW_
1366 #undef MPP_TYPE_BYTELEN_
1368 #define MPP_ALLTOALL_ mpp_alltoall_logical8
1369 #define MPP_ALLTOALLV_ mpp_alltoall_logical8_v
1370 #define MPP_ALLTOALLW_ mpp_alltoall_logical8_w
1371 #define MPP_TYPE_ logical(l8_kind)
1372 #define MPP_TYPE_BYTELEN_ 8
1373 #define MPI_TYPE_ MPI_INTEGER8
1374 #include <mpp_alltoall_mpi.fh>
1382 #undef MPP_TYPE_CREATE_
1385 #define MPP_TYPE_CREATE_ mpp_type_create_int4
1386 #define MPP_TYPE_ integer(i4_kind)
1387 #define MPI_TYPE_ MPI_INTEGER4
1388 #include <mpp_type_mpi.fh>
1390 #undef MPP_TYPE_CREATE_
1393 #define MPP_TYPE_CREATE_ mpp_type_create_int8
1394 #define MPP_TYPE_ integer(i8_kind)
1395 #define MPI_TYPE_ MPI_INTEGER8
1396 #include <mpp_type_mpi.fh>
1398 #undef MPP_TYPE_CREATE_
1401 #define MPP_TYPE_CREATE_ mpp_type_create_real4
1402 #define MPP_TYPE_ real(r4_kind)
1403 #define MPI_TYPE_ MPI_REAL4
1404 #include <mpp_type_mpi.fh>
1406 #undef MPP_TYPE_CREATE_
1409 #define MPP_TYPE_CREATE_ mpp_type_create_real8
1410 #define MPP_TYPE_ real(r8_kind)
1411 #define MPI_TYPE_ MPI_REAL8
1412 #include <mpp_type_mpi.fh>
1414 #undef MPP_TYPE_CREATE_
1417 #define MPP_TYPE_CREATE_ mpp_type_create_cmplx4
1418 #define MPP_TYPE_ complex(c4_kind)
1419 #define MPI_TYPE_ MPI_COMPLEX8
1420 #include <mpp_type_mpi.fh>
1422 #undef MPP_TYPE_CREATE_
1425 #define MPP_TYPE_CREATE_ mpp_type_create_cmplx8
1426 #define MPP_TYPE_ complex(c8_kind)
1427 #define MPI_TYPE_ MPI_COMPLEX16
1428 #include <mpp_type_mpi.fh>
1430 #undef MPP_TYPE_CREATE_
1433 #define MPP_TYPE_CREATE_ mpp_type_create_logical4
1434 #define MPP_TYPE_ logical(l4_kind)
1435 #define MPI_TYPE_ MPI_INTEGER4
1436 #include <mpp_type_mpi.fh>
1438 #undef MPP_TYPE_CREATE_
1441 #define MPP_TYPE_CREATE_ mpp_type_create_logical8
1442 #define MPP_TYPE_ logical(l8_kind)
1443 #define MPI_TYPE_ MPI_INTEGER8
1444 #include <mpp_type_mpi.fh>
1449 #undef MPP_TYPE_CREATE_
1454 type(mpp_type),
pointer,
intent(inout) :: dtype
1456 if (.NOT. module_is_initialized) &
1457 call mpp_error(fatal,
'MPP_TYPE_FREE: You must first call mpp_init.')
1459 if (current_clock .NE. 0) &
1460 call system_clock(start_tick)
1463 call mpp_error(note,
'MPP_TYPE_FREE: using MPI_Type_free...')
1466 dtype%counter = dtype%counter - 1
1468 if (dtype%counter < 1)
then
1470 dtype%prev => dtype%next
1471 datatypes%length = datatypes%length - 1
1474 deallocate(dtype%sizes)
1475 deallocate(dtype%subsizes)
1476 deallocate(dtype%starts)
1479 if (dtype%id /= mpi_byte)
then
1480 call mpi_type_free(dtype%id, error)
1485 if (current_clock .NE. 0) &
1486 call increment_current_clock(event_type_free, mpp_type_bytelen_)
integer function stdout()
This function returns the current standard fortran unit numbers for output.
subroutine mpp_init_warninglog()
Opens the warning log file, called during mpp_init.
subroutine mpp_set_current_pelist(pelist, no_sync)
Set context pelist.
integer function stderr()
This function returns the current standard fortran unit numbers for error messages.
subroutine read_input_nml(pelist_name_in, alt_input_nml_path)
Reads an existing input nml file into a character array and broadcasts it to the non-root mpi-tasks....
subroutine mpp_type_free(dtype)
Deallocates memory for mpp_type objects @TODO This should probably not take a pointer,...
subroutine mpp_exit()
Finalizes process termination. To be called at the end of a run. Certain mpi implementations(openmpi)...
integer function stdlog()
This function returns the current standard fortran unit numbers for log messages. Log messages,...
subroutine mpp_init_f08(flags, localcomm, test_level, alt_input_nml_path)
Initialize the mpp_mod module. Must be called before any usage.
integer function mpp_npes()
Returns processor count for current pelist.
subroutine mpp_set_stack_size(n)
Set the mpp_stack variable to be at least n LONG words long.
integer function mpp_pe()
Returns processor ID.
subroutine mpp_sync(pelist, do_self)
Synchronize PEs in list.
integer function mpp_clock_id(name, flags, grain)
Return an ID for a new or existing clock.
subroutine mpp_broadcast_char(char_data, length, from_pe, pelist)
Broadcasts a character string from the given pe to it's pelist.