ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/lj_FF.F90
(Generate patch)

Comparing trunk/mdtools/md_code/lj_FF.F90 (file contents):
Revision 254 by chuckv, Thu Jan 30 20:03:37 2003 UTC vs.
Revision 260 by chuckv, Fri Jan 31 21:04:27 2003 UTC

# Line 2 | Line 2
2   !! Corresponds to the force field defined in lj_FF.cpp
3   !! @author Charles F. Vardeman II
4   !! @author Matthew Meineke
5 < !! @version $Id: lj_FF.F90,v 1.14 2003-01-30 20:03:36 chuckv Exp $, $Date: 2003-01-30 20:03:36 $, $Name: not supported by cvs2svn $, $Revision: 1.14 $
5 > !! @version $Id: lj_FF.F90,v 1.16 2003-01-31 21:04:27 chuckv Exp $, $Date: 2003-01-31 21:04:27 $, $Name: not supported by cvs2svn $, $Revision: 1.16 $
6  
7  
8  
# Line 124 | Line 124 | contains
124  
125      integer :: thisStat
126      integer :: i
127 +
128 +    integer :: myNode
129   #ifdef IS_MPI
130      integer, allocatable, dimension(:) :: identRow
131      integer, allocatable, dimension(:) :: identCol
# Line 133 | Line 135 | contains
135      status = 0
136    
137  
138 +    
139  
137
140   !! if were're not in MPI, we just update ljatypePtrList
141   #ifndef IS_MPI
142      call create_IdentPtrlst(ident,ljListHead,identPtrList,thisStat)
# Line 167 | Line 169 | contains
169      endif
170      nrow = getNrow(plan_row)
171      ncol = getNcol(plan_col)
172 +    mynode = getMyNode()
173   !! Allocate temperary arrays to hold gather information
174      allocate(identRow(nrow),stat=alloc_stat)
175      if (alloc_stat /= 0 ) then
# Line 184 | Line 187 | contains
187  
188      call gather(ident,identRow,plan_row)
189      call gather(ident,identCol,plan_col)
190 <
191 <
190 >    
191 >  
192   !! Create row and col pointer lists
193 <
193 >  
194      call create_IdentPtrlst(identRow,ljListHead,identPtrListRow,thisStat)
195      if (thisStat /= 0 ) then
196         status = -1
197         return
198      endif
199 <
199 >  
200      call create_IdentPtrlst(identCol,ljListHead,identPtrListColumn,thisStat)
201      if (thisStat /= 0 ) then
202         status = -1
# Line 201 | Line 204 | contains
204      endif
205  
206   !! free temporary ident arrays
207 <    deallocate(identCol)
208 <    deallocate(identRow)
209 <
207 >    if (allocated(identCol)) then
208 >       deallocate(identCol)
209 >    end if
210 >    if (allocated(identCol)) then
211 >       deallocate(identRow)
212 >    endif
213  
214   !! Allocate neighbor lists for mpi simulations.
215      if (.not. allocated(point)) then
# Line 243 | Line 249 | contains
249      endif
250      isljFFinit = .true.
251  
252 +    write(*,*) "Successfully initialized ljFF"
253    end subroutine init_ljFF
254  
255  
# Line 456 | Line 463 | contains
463      eTemp = 0.0E0_DP
464   #endif
465      efr = 0.0E0_DP
466 <
466 >    write(*,*) "At first gather of positions"
467   ! communicate MPI positions
468   #ifdef IS_MPI    
469      call gather(q,qRow,plan_row3d)
470      call gather(q,qCol,plan_col3d)
471   #endif
472 +    write(*,*) "Completed gather"
473  
466
474    if (update_nlist) then
475  
476       ! save current configuration, contruct neighbor list,
# Line 649 | Line 656 | contains
656  
657   #ifdef IS_MPI
658      !!distribute forces
659 +  write(*,*) "At first scatter"
660      call scatter(fRow,f,plan_row3d)
661  
662      call scatter(fCol,fMPITemp,plan_col3d)
# Line 657 | Line 665 | contains
665         f(1:3,i) = f(1:3,i) + fMPITemp(1:3,i)
666      end do
667  
668 <
668 >    write(*,*) "Completed scatter"
669      
670      if (do_pot) then
671   ! scatter/gather pot_row into the members of my column
# Line 681 | Line 689 | contains
689  
690      potE = pe
691  
692 <  
692 >   write(*,*) "Successfully completed force loop"
693  
694  
695    end subroutine do_lj_ff

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines