5 |
|
!! |
6 |
|
!! @author Charles F. Vardeman II |
7 |
|
!! @author Matthew Meineke |
8 |
< |
!! @version $Id: mpiSimulation_module.F90,v 1.5 2003-01-30 20:03:37 chuckv Exp $, $Date: 2003-01-30 20:03:37 $, $Name: not supported by cvs2svn $, $Revision: 1.5 $ |
8 |
> |
!! @version $Id: mpiSimulation_module.F90,v 1.6 2003-01-30 22:29:58 chuckv Exp $, $Date: 2003-01-30 22:29:58 $, $Name: not supported by cvs2svn $, $Revision: 1.6 $ |
9 |
|
|
10 |
|
|
11 |
|
|
55 |
|
!! generic mpi error declaration. |
56 |
|
integer,public :: mpi_err |
57 |
|
|
58 |
+ |
|
59 |
|
|
59 |
– |
|
60 |
|
!! Include mpiComponentPlan type. mpiComponentPlan is a |
61 |
|
!! dual header file for both c and fortran. |
62 |
|
#define __FORTRAN90 |
72 |
|
!! Logical set true if mpiSimulation has been initialized |
73 |
|
logical :: isSimSet = .false. |
74 |
|
|
75 |
+ |
|
76 |
+ |
type (mpiComponentPlan) :: mpiSim |
77 |
+ |
|
78 |
|
!! gs_plan contains plans for gather and scatter routines |
79 |
|
type, public :: gs_plan |
80 |
|
private |
141 |
|
endif |
142 |
|
componentPlanSet = .true. |
143 |
|
|
144 |
< |
|
145 |
< |
call make_Force_Grid(thisComponentPlan,localStatus) |
144 |
> |
!! copy c component plan to fortran |
145 |
> |
mpiSim = thisComponentPlan |
146 |
> |
write(*,*) "Seting up simParallel" |
147 |
> |
if (mpiSim%myNode == 0) then |
148 |
> |
write(*,*) "SetupSimParallel: writing component plan" |
149 |
> |
|
150 |
> |
write(*,*) "nMolGlobal: ", mpiSim%nMolGlobal |
151 |
> |
write(*,*) "nAtomsGlobal: ", mpiSim%nAtomsGlobal |
152 |
> |
write(*,*) "nBondGlobal: ", mpiSim%nBondsGlobal |
153 |
> |
write(*,*) "nTorsionsGlobal: ", mpiSim%nTorsionsGlobal |
154 |
> |
write(*,*) "nSRIGlobal: ", mpiSim%nSRIGlobal |
155 |
> |
write(*,*) "myMolStart: ", mpiSim%myMolStart |
156 |
> |
write(*,*) "myMolEnd: ", mpiSim%myMolEnd |
157 |
> |
write(*,*) "myMol: ", mpiSim%myMol |
158 |
> |
write(*,*) "myNlocal: ", mpiSim%myNlocal |
159 |
> |
write(*,*) "myNode: ", mpiSim%myNode |
160 |
> |
write(*,*) "numberProcessors: ", mpiSim%numberProcessors |
161 |
> |
write(*,*) "rowComm: ", mpiSim%rowComm |
162 |
> |
write(*,*) "columnComm: ", mpiSim%columnComm |
163 |
> |
write(*,*) "numberRows: ", mpiSim%numberRows |
164 |
> |
write(*,*) "numberColumns: ", mpiSim%numberColumns |
165 |
> |
write(*,*) "nComponentsRow: ", mpiSim%nComponentsRow |
166 |
> |
write(*,*) "nComponentsColumn: ", mpiSim%nComponentsColumn |
167 |
> |
write(*,*) "rowIndex: ", mpiSim%rowIndex |
168 |
> |
write(*,*) "columnIndex: ", mpiSim%columnIndex |
169 |
> |
endif |
170 |
> |
|
171 |
> |
|
172 |
> |
call make_Force_Grid(mpiSim,localStatus) |
173 |
|
if (localStatus /= 0) then |
174 |
|
write(default_error,*) "Error creating force grid" |
175 |
|
status = -1 |
176 |
|
return |
177 |
|
endif |
178 |
|
|
179 |
< |
call updateGridComponents(thisComponentPlan,localStatus) |
179 |
> |
call updateGridComponents(mpiSim,localStatus) |
180 |
|
if (localStatus /= 0) then |
181 |
|
write(default_error,*) "Error updating grid components" |
182 |
|
status = -1 |
185 |
|
|
186 |
|
|
187 |
|
!! initialize gather and scatter plans used in this simulation |
188 |
< |
call plan_gather_scatter(1,thisComponentPlan%nComponentsRow,& |
189 |
< |
thisComponentPlan,thisComponentPlan%rowComm,plan_row) |
190 |
< |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsRow,& |
191 |
< |
thisComponentPlan,thisComponentPlan%rowComm,plan_row3d) |
192 |
< |
call plan_gather_scatter(1,thisComponentPlan%nComponentsColumn,& |
193 |
< |
thisComponentPlan,thisComponentPlan%columnComm,plan_col) |
194 |
< |
call plan_gather_scatter(nDim,thisComponentPlan%nComponentsColumn,& |
195 |
< |
thisComponentPlan,thisComponentPlan%columnComm,plan_col3d) |
188 |
> |
call plan_gather_scatter(1,mpiSim%nComponentsRow,& |
189 |
> |
mpiSim,mpiSim%rowComm,plan_row) |
190 |
> |
call plan_gather_scatter(nDim,mpiSim%nComponentsRow,& |
191 |
> |
mpiSim,mpiSim%rowComm,plan_row3d) |
192 |
> |
call plan_gather_scatter(1,mpiSim%nComponentsColumn,& |
193 |
> |
mpiSim,mpiSim%columnComm,plan_col) |
194 |
> |
call plan_gather_scatter(nDim,mpiSim%nComponentsColumn,& |
195 |
> |
mpiSim,mpiSim%columnComm,plan_col3d) |
196 |
|
|
197 |
|
! Initialize tags |
198 |
|
call setTags(tags,localStatus) |
467 |
|
integer, dimension(:), intent(in) :: rbuffer |
468 |
|
integer :: noffset |
469 |
|
integer, intent(out), optional :: status |
470 |
+ |
integer :: i |
471 |
|
|
472 |
+ |
|
473 |
|
if (present(status)) status = 0 |
474 |
|
noffset = this_plan%displs(this_plan%myPlanRank) |
475 |
|
|