--- trunk/OOPSE/libmdtools/do_Forces.F90 2004/05/27 15:21:20 1199 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2004/06/01 18:42:58 1214 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.64 2004-05-27 15:21:20 gezelter Exp $, $Date: 2004-05-27 15:21:20 $, $Name: not supported by cvs2svn $, $Revision: 1.64 $ +!! @version $Id: do_Forces.F90,v 1.67 2004-06-01 18:42:58 gezelter Exp $, $Date: 2004-06-01 18:42:58 $, $Name: not supported by cvs2svn $, $Revision: 1.67 $ module do_Forces use force_globals @@ -428,6 +428,8 @@ contains nAtomsInCol = getNatomsInCol(plan_atom_col) nGroupsInRow = getNgroupsInRow(plan_group_row) nGroupsInCol = getNgroupsInCol(plan_group_col) + write(*,*) nAtomsInRow, nAtomsInCol, nGroupsInRow, nGroupsInCol + write(*,*) pot_local #else natoms = nlocal #endif @@ -481,13 +483,19 @@ contains ! See if we need to update neighbor lists ! (but only on the first time through): if (loop .eq. loopStart) then - call checkNeighborList(nGroups, q_group, listSkin, update_nlist) +#ifdef IS_MPI + call checkNeighborList(nGroupsInRow, q_group_row, listSkin, & + update_nlist) +#else + call checkNeighborList(nGroups, q_group, listSkin, & + update_nlist) +#endif endif if (update_nlist) then !! save current configuration and construct neighbor list #ifdef IS_MPI - call saveNeighborList(nGroupsInRow, q_group) + call saveNeighborList(nGroupsInRow, q_group_row) #else call saveNeighborList(nGroups, q_group) #endif @@ -502,7 +510,7 @@ contains iend = nGroups - 1 #endif outer: do i = istart, iend - + if (update_nlist) point(i) = nlist + 1 n_in_i = groupStartRow(i+1) - groupStartRow(i) @@ -577,7 +585,7 @@ contains atom2 = groupListCol(jb) if (skipThisPair(atom1, atom2)) cycle inner - + if ((n_in_i .eq. 1).and.(n_in_j .eq. 1)) then d_atm(1:3) = d_grp(1:3) ratmsq = rgrpsq @@ -590,6 +598,10 @@ contains q(:,atom2), d_atm, ratmsq) #endif endif +#ifdef IS_MPI + write(*,'(a20,2i8,es12.3,2i8)') 'atom1, atom2, pot = ', atom1, atom2, ratmsq, AtomRowToGlobal(atom1), AtomColToGlobal(atom2) +#endif + if (loop .eq. PREPAIR_LOOP) then #ifdef IS_MPI call do_prepair(atom1, atom2, ratmsq, d_atm, sw, & @@ -605,11 +617,13 @@ contains call do_pair(atom1, atom2, ratmsq, d_atm, sw, & do_pot, & u_l, A, f, t, pot_local, vpair, fpair) + write(*,'(a20,2i11,2es12.3)') 'atom1, atom2, pot = ', atom1, atom2, pot_local, vpair #else call do_pair(atom1, atom2, ratmsq, d_atm, sw, & do_pot, & u_l, A, f, t, pot, vpair, fpair) #endif + vij = vij + vpair fij(1:3) = fij(1:3) + fpair(1:3) endif @@ -1131,8 +1145,8 @@ contains endif enddo - do i = 1, nSkipsForAtom(unique_id_1) - if (skipsForAtom(unique_id_1, i) .eq. unique_id_2) then + do i = 1, nSkipsForAtom(atom1) + if (skipsForAtom(atom1, i) .eq. unique_id_2) then skip_it = .true. return endif