| 5 |
|
!! |
| 6 |
|
!! @author Charles F. Vardeman II |
| 7 |
|
!! @author Matthew Meineke |
| 8 |
< |
!! @version $Id: mpiSimulation.F90,v 1.2 2002-12-13 18:06:58 chuckv Exp $, $Date: 2002-12-13 18:06:58 $, $Name: not supported by cvs2svn $, $Revision: 1.2 $ |
| 8 |
> |
!! @version $Id: mpiSimulation.F90,v 1.3 2002-12-13 19:15:57 chuckv Exp $, $Date: 2002-12-13 19:15:57 $, $Name: not supported by cvs2svn $, $Revision: 1.3 $ |
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 22 |
|
!! to gather and scatter routines |
| 23 |
|
public :: gather, scatter |
| 24 |
|
public :: setupSimParallel |
| 25 |
+ |
public :: replanSimParallel |
| 26 |
|
!! PUBLIC Subroutines contained in MPI module |
| 27 |
|
public :: mpi_bcast |
| 28 |
|
public :: mpi_allreduce |
| 128 |
|
endif |
| 129 |
|
|
| 130 |
|
!! initialize gather and scatter plans used in this simulation |
| 131 |
< |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsRow,& |
| 131 |
> |
call plan_gather_scatter(1,thisComponentPlan%nComponentsRow,& |
| 132 |
|
thisComponentPlan,row_comm,plan_row) |
| 133 |
|
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsRow,& |
| 134 |
|
thisComponentPlan,row_comm,plan_row3d) |
| 135 |
< |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsColumn,& |
| 135 |
> |
call plan_gather_scatter(1,thisComponentPlan%nComponentsColumn,& |
| 136 |
|
thisComponentPlan,col_comm,plan_col) |
| 137 |
|
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsColumn,& |
| 138 |
|
thisComponentPlan,col_comm,plan_col3d) |
| 141 |
|
|
| 142 |
|
end subroutine setupSimParallel |
| 143 |
|
|
| 144 |
+ |
subroutine replanSimParallel(thisComponentPlan,status) |
| 145 |
+ |
! Passed Arguments |
| 146 |
+ |
!! mpiComponentPlan struct from C |
| 147 |
+ |
type (mpiComponentPlan), intent(inout) :: thisComponentPlan |
| 148 |
+ |
integer, intent(out) :: status |
| 149 |
+ |
integer, intnet(out) :: localStatus |
| 150 |
+ |
|
| 151 |
+ |
status = 0 |
| 152 |
+ |
|
| 153 |
+ |
call updateGridComponents(thisComponentPlan,localStatus) |
| 154 |
+ |
if (localStatus /= 0) then |
| 155 |
+ |
status = -1 |
| 156 |
+ |
return |
| 157 |
+ |
endif |
| 158 |
+ |
|
| 159 |
+ |
!! Unplan Gather Scatter plans |
| 160 |
+ |
call unplan_gather_scatter(plan_row) |
| 161 |
+ |
call unplan_gather_scatter(plan_row3d) |
| 162 |
+ |
call unplan_gather_scatter(plan_col) |
| 163 |
+ |
call unplan_gather_scatter(plan_col3d) |
| 164 |
+ |
|
| 165 |
+ |
|
| 166 |
+ |
!! initialize gather and scatter plans used in this simulation |
| 167 |
+ |
call plan_gather_scatter(1,thisComponentPlan%nComponentsRow,& |
| 168 |
+ |
thisComponentPlan,row_comm,plan_row) |
| 169 |
+ |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsRow,& |
| 170 |
+ |
thisComponentPlan,row_comm,plan_row3d) |
| 171 |
+ |
call plan_gather_scatter(1,thisComponentPlan%nComponentsColumn,& |
| 172 |
+ |
thisComponentPlan,col_comm,plan_col) |
| 173 |
+ |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsColumn,& |
| 174 |
+ |
thisComponentPlan,col_comm,plan_col3d) |
| 175 |
+ |
|
| 176 |
+ |
|
| 177 |
+ |
|
| 178 |
+ |
end subroutine replanSimParallel |
| 179 |
+ |
|
| 180 |
|
!! Updates number of row and column components for long range forces. |
| 181 |
|
subroutine updateGridComponents(thisComponentPlan,status) |
| 182 |
|
type (mpiComponentPlan) :: thisComponentPlan !! mpiComponentPlan |