master_control.F [SRC] [CPP] [JOB] [SCAN]
SOURCES / MAIN / MASTER



   1 | include(dom.inc)
   2 | 
   3 |       SUBROUTINE master_control(itask)
   4 | 
   5 | !       ================================================================!
   6 | !                                                                       !
   7 | !       master_control.F : Main control of the MASTER side of the code. !
   8 | !                                                                       !
   9 | !       out              :                                              !
  10 | !                                                                       !
  11 | !       author           : J. AMAYA (september 2007)                    !
  12 | !                                                                       !
  13 | !       ================================================================!
  14 | 
  15 |         USE mod_pmm
  16 |         USE mod_prissma
  17 | 
  18 |         IMPLICIT NONE
  19 | 
  20 |         DOM_INT :: itask
  21 | 
  22 |         INCLUDE 'pmm_constants.h'
  23 | 
  24 |         IF (itask.eq.MASTER_INIT) THEN
  25 | 
  26 | !         ----------------!
  27 | !         Read input files!
  28 | !         ----------------!
  29 | 
  30 |           CALL read_data
  31 | #ifdef USEPALM
  32 |           IF (.not.ALLOCATED(Srtot))   ALLOCATE(Srtot(i_dom_nnodes))
  33 |           IF (.not.ALLOCATED(Gtot))    ALLOCATE(Gtot(i_dom_nnodes))
  34 |           IF (.not.ALLOCATED(Q_rtot))  ALLOCATE(Q_rtot(3,i_dom_nnodes))
  35 | 
  36 |           CALL read_domcoor
  37 | 
  38 | !         -------------------------------------------------------!
  39 | !         PALM: send node coordinates and dummy radiative fields !
  40 | !         -------------------------------------------------------!
  41 | 
  42 |           CALL interf_nodescoor
  43 |           CALL interf_bfacecoor
  44 |           CALL interf_sendfields
  45 | #endif
  46 | 
  47 | !         -----------------------------------------------!
  48 | !         Calculate partitioning in bands and directions !
  49 | !         -----------------------------------------------!
  50 | 
  51 |           WRITE(*,*) " PRISSMA: calculation over -> ", pmm_n_p, "proc" 
  52 |           WRITE(*,*) 
  53 |           WRITE(*,*) " >> MASTER: Creating partition"
  54 |           CALL partition
  55 | 
  56 |         ELSEIF (itask.eq.MASTER_OUTPROC) THEN
  57 |           WRITE(*,*) " >> MASTER: Outprocessing results"
  58 |           CALL outprocessing
  59 | 
  60 | #ifdef USEPALM
  61 |           CALL interf_sendfields
  62 | 
  63 |         ELSEIF (itask.eq.MASTER_COUPLING) THEN
  64 | 
  65 | !         -------------------------------------------------!
  66 | !         PALM: Receiving data from slaves to send to palm !
  67 | !         -------------------------------------------------!
  68 | 
  69 |           WRITE(*,*) " >> MASTER: Preparing result vectors for coupling"
  70 | !         CALL outprocessing_coupling
  71 |           CALL interf_sendfields
  72 | 
  73 | #endif
  74 | 
  75 |         ENDIF
  76 | 
  77 |       END SUBROUTINE master_control


master_control.F could be called by:
Makefile [SOURCES] - 123
master.F [SOURCES/MAIN/MASTER] - 17
slave.F [SOURCES/MAIN/SLAVE] - 562