55 TYPE(t_region
),
POINTER :: regions(:)
58 INTEGER :: iproc, ireg
61 INTEGER :: iregbeg, iregend, local, iprat, ipmod
67 global => regions(1)%global
70 'RFLO_MapRegionsProcessors.F90' )
74 IF (global%nRegionsProc < 0) CALL
errorstop( global,err_no_procmap,__line__ )
78 IF (global%nRegionsProc == 0)
THEN
80 iprat =
max(1,global%nRegions/global%nProcAlloc)
81 ipmod = mod(global%nRegions,global%nProcAlloc)
89 DO iproc=0,global%nProcAlloc-1
91 DO ireg=iregbeg,iregend
93 IF (global%nProcAlloc>1 .AND. local>=mpi_patchoff) &
94 CALL
errorstop( global,err_patch_offset,__line__ )
95 IF (global%nProcAlloc > 1)
THEN
96 regions(ireg)%procid = iproc
98 regions(ireg)%procid = masterproc
100 regions(ireg)%localNumber = local
102 iregbeg = iregend + 1
103 iregend = iregbeg + iprat - 1
105 iregend = iregend + 1
114 IF (global%nRegionsProc > 0)
THEN
116 IF (global%nProcAlloc*global%nRegionsProc /= global%nRegions) &
117 CALL
errorstop( global,err_no_procmatch,__line__ )
120 iregend = global%nRegionsProc
122 DO iproc=0,global%nProcAlloc-1
124 DO ireg=iregbeg,iregend
126 IF (global%nProcAlloc>1 .AND. local>=mpi_patchoff) &
127 CALL
errorstop( global,err_patch_offset,__line__ )
128 IF (global%nProcAlloc > 1)
THEN
129 regions(ireg)%procid = iproc
131 regions(ireg)%procid = masterproc
133 regions(ireg)%localNumber = local
135 iregbeg = iregend + 1
136 iregend = iregbeg + global%nRegionsProc - 1
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_mapregionsprocessors(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)