1 | include(dom.inc)
2 | SUBROUTINE slave_receive
3 |
4 | ! ================================================================!
5 | ! !
6 | ! slave_receive.F : Receives information sent by master processor !
7 | ! like input parameters and vectors. !
8 | ! !
9 | ! author : J. AMAYA & D. Poitou (september 2007) !
10 | ! !
11 | ! ================================================================!
12 |
13 | USE mod_pmm
14 | #ifdef USEPALM
15 | USE palmlib
16 | #endif
17 | USE mod_slave
18 | ! USE mod_inout
19 |
20 | IMPLICIT NONE
21 |
22 | INCLUDE 'pmm_constants.h'
23 | INCLUDE 'dom_constants.h'
24 |
25 | DOM_INT :: ierr
26 | DOM_INT, PARAMETER :: buffersize = 28
27 | DOM_INT :: buffer(buffersize)
28 | DOM_INT, allocatable, dimension(:) :: buffer2
29 | DOM_INT :: status(MPI_STATUS_SIZE)
30 |
31 | ! --------------------!
32 | ! Recive partitioning !
33 | ! --------------------!
34 |
35 | ! print*, " (",pmm_rank,") MPI RECV partition for ", pmm_rank
36 |
37 | CALL MPI_RECV(buffer, buffersize, MPI_INTEGER, PMM_HOST, &
38 | & PMM_PARTITION, COMM_PARA , status, ierr)
39 |
40 | ! print*, " (",pmm_rank,") MPI RECV: buffer: ", buffer
41 |
42 | CALL slave_partition(buffer, buffersize)
43 |
44 | ! --------------------!
45 | ! Recive partitioning !
46 | ! --------------------!
47 |
48 | ! print*, " (",pmm_rank,") MPI RECV mesh partition for ", pmm_rank
49 |
50 | ALLOCATE(buffer2(is_buffersize))
51 |
52 | CALL MPI_RECV(buffer2, is_buffersize, MPI_INTEGER, PMM_HOST, &
53 | & PMM_PARTITION, COMM_PARA , status, ierr)
54 |
55 | ! print*, " (",pmm_rank,") MPI RECV: buffer2: ", buffer2
56 |
57 | CALL slave_meshpartition(buffer2, is_buffersize)
58 | DEALLOCATE(buffer2)
59 |
60 | END SUBROUTINE slave_receive
slave_receive.F could be called by: