1 | include(dom.inc)
2 |
3 | SUBROUTINE pmm_sendpartition(i_buffer, i_buffersize, iproc, &
4 | & part_type)
5 |
6 | ! ================================================================!
7 | ! !
8 | ! pmm_sendpartition.F : Do MPI calls to send partition data from !
9 | ! master to slaves !
10 | ! !
11 | ! out : !
12 | ! !
13 | ! author : J. AMAYA & D. Poitou (october 2007) !
14 | ! !
15 | ! ================================================================!
16 |
17 | USE mod_pmm
18 | #ifdef USEPALM
19 | USE palmlib
20 | #endif
21 |
22 | IMPLICIT NONE
23 |
24 | include 'pmm_constants.h'
25 |
26 | ! IN
27 | DOM_INT :: i_buffersize, iproc
28 | DOM_INT :: part_type
29 |
30 | DOM_INT, DIMENSION(i_buffersize) :: i_buffer
31 |
32 | ! LOCAL
33 | DOM_INT :: ierr
34 |
35 | ! -----------------------!
36 | ! Send buffers to slaves !
37 | ! -----------------------!
38 |
39 | ! WRITE(*,*) " (",pmm_rank,") Sending partition to slave ",iproc-1
40 | ! print*, " (",pmm_rank,") ", i_buffer
41 |
42 | IF ((iproc-1).eq.PMM_HOST) THEN
43 | ! print*, " (",pmm_rank,") partition with copy for master"
44 |
45 | IF(part_type.eq.1) THEN
46 | CALL slave_partition(i_buffer, i_buffersize)
47 | ELSEIF(part_type.eq.2) THEN
48 | CALL slave_meshpartition(i_buffer, i_buffersize)
49 | ENDIF
50 | ELSE
51 | ! print*, " (",pmm_rank,") partition with send for slaves"
52 |
53 | CALL MPI_SEND(i_buffer, i_buffersize, MPI_INTEGER, iproc-1, &
54 | & PMM_PARTITION, COMM_PARA , ierr)
55 |
56 | ENDIF
57 |
58 | END SUBROUTINE pmm_sendpartition
pmm_sendpartition.F could be called by: