6 |
|
!! @author Charles F. Vardeman II |
7 |
|
!! @author Matthew Meineke |
8 |
|
!! @author J. Daniel Gezelter |
9 |
< |
!! @version $Id: neighborLists.F90,v 1.5 2003-08-08 21:22:37 chuckv Exp $, |
9 |
> |
!! @version $Id: neighborLists.F90,v 1.6 2003-09-05 21:28:19 gezelter Exp $, |
10 |
|
|
11 |
|
module neighborLists |
12 |
|
|
59 |
|
!! If one is associated and one is not, something is wrong |
60 |
|
!! and return a error. |
61 |
|
|
62 |
< |
#ifndef IS_MPI !!/Non MPI |
62 |
> |
#ifdef IS_MPI !! // MPI |
63 |
|
if (.not. associated(point) .and. & |
64 |
|
.not. associated(list) ) then |
65 |
< |
allocate(point(natoms),stat=alloc_error) |
65 |
> |
allocate(point(getNRow(plan_row)),stat=alloc_error) |
66 |
|
if (alloc_error /= 0) then |
67 |
|
write(default_error,*) & |
68 |
< |
"ExpandNeighborLists: Error in allocating point" |
69 |
< |
error = -1 |
68 |
> |
"ExpandNeighborLists: Error in allocating MPI point" |
69 |
> |
error = -1 |
70 |
|
return |
71 |
|
end if |
72 |
< |
allocate(list(listMultiplier * natoms),stat=alloc_error) |
72 |
> |
allocate(list(listMultiplier * getNCol(plan_col)),stat=alloc_error) |
73 |
|
if (alloc_error /= 0) then |
74 |
|
write(default_error,*) & |
75 |
< |
"ExpandNeighborLists: Error in allocating list" |
75 |
> |
"ExpandNeighborLists: Error in allocating MPI list" |
76 |
|
error = -1 |
77 |
|
return |
78 |
|
end if |
80 |
|
nAllocations = nAllocations + 1 |
81 |
|
return |
82 |
|
end if |
83 |
< |
#else !!// MPI |
83 |
> |
#else !! // NONMPI |
84 |
|
if (.not. associated(point) .and. & |
85 |
|
.not. associated(list) ) then |
86 |
< |
allocate(point(getNRow(plan_row)),stat=alloc_error) |
86 |
> |
allocate(point(natoms),stat=alloc_error) |
87 |
|
if (alloc_error /= 0) then |
88 |
|
write(default_error,*) & |
89 |
< |
"ExpandNeighborLists: Error in allocating MPI point" |
90 |
< |
error = -1 |
89 |
> |
"ExpandNeighborLists: Error in allocating point" |
90 |
> |
error = -1 |
91 |
|
return |
92 |
|
end if |
93 |
< |
allocate(list(listMultiplier * getNCol(plan_col)),stat=alloc_error) |
93 |
> |
allocate(list(listMultiplier * natoms),stat=alloc_error) |
94 |
|
if (alloc_error /= 0) then |
95 |
|
write(default_error,*) & |
96 |
< |
"ExpandNeighborLists: Error in allocating MPI list" |
96 |
> |
"ExpandNeighborLists: Error in allocating list" |
97 |
|
error = -1 |
98 |
|
return |
99 |
|
end if |