45 |
|
|
46 |
|
!! @author Charles F. Vardeman II |
47 |
|
!! @author Matthew Meineke |
48 |
< |
!! @version $Id: doForces.F90,v 1.54 2005-10-12 18:59:16 chuckv Exp $, $Date: 2005-10-12 18:59:16 $, $Name: not supported by cvs2svn $, $Revision: 1.54 $ |
48 |
> |
!! @version $Id: doForces.F90,v 1.56 2005-10-12 20:18:01 chuckv Exp $, $Date: 2005-10-12 20:18:01 $, $Name: not supported by cvs2svn $, $Revision: 1.56 $ |
49 |
|
|
50 |
|
|
51 |
|
module doForces |
1088 |
|
|
1089 |
|
if (do_pot) then |
1090 |
|
! scatter/gather pot_row into the members of my column |
1091 |
< |
call scatter(pot_Row, pot_Temp, plan_atom_row) |
1092 |
< |
|
1091 |
> |
do i = 1,POT_ARRAY_SIZE |
1092 |
> |
call scatter(pot_Row(i,:), pot_Temp(i,:), plan_atom_row) |
1093 |
> |
end do |
1094 |
|
! scatter/gather pot_local into all other procs |
1095 |
|
! add resultant to get total pot |
1096 |
|
do i = 1, nlocal |
1097 |
< |
pot_local = pot_local + pot_Temp(i) |
1097 |
> |
pot_local(1:POT_ARRAY_SIZE) = pot_local(1:POT_ARRAY_SIZE) & |
1098 |
> |
+ pot_Temp(1:POT_ARRAY_SIZE,i) |
1099 |
|
enddo |
1100 |
|
|
1101 |
|
pot_Temp = 0.0_DP |
1102 |
< |
|
1103 |
< |
call scatter(pot_Col, pot_Temp, plan_atom_col) |
1102 |
> |
do i = 1,POT_ARRAY_SIZE |
1103 |
> |
call scatter(pot_Col(i,:), pot_Temp(i,:), plan_atom_col) |
1104 |
> |
end do |
1105 |
|
do i = 1, nlocal |
1106 |
< |
pot_local = pot_local + pot_Temp(i) |
1106 |
> |
pot_local(1:POT_ARRAY_SIZE) = pot_local(1:POT_ARRAY_SIZE)& |
1107 |
> |
+ pot_Temp(1:POT_ARRAY_SIZE,i) |
1108 |
|
enddo |
1109 |
|
|
1110 |
|
endif |
1157 |
|
#ifdef IS_MPI |
1158 |
|
|
1159 |
|
if (do_pot) then |
1160 |
< |
pot(1:SIZE_POT_ARRAY) = pot(1:SIZE_POT_ARRAY) & |
1161 |
< |
+ pot_local(1:SIZE_POT_ARRAY) |
1160 |
> |
pot(1:POT_ARRAY_SIZE) = pot(1:POT_ARRAY_SIZE) & |
1161 |
> |
+ pot_local(1:POT_ARRAY_SIZE) |
1162 |
|
!! we assume the c code will do the allreduce to get the total potential |
1163 |
|
!! we could do it right here if we needed to... |
1164 |
|
endif |