| 321 |
|
enddo |
| 322 |
|
|
| 323 |
|
maxSkipsForAtom = 0 |
| 324 |
+ |
#ifdef IS_MPI |
| 325 |
+ |
do j = 1, nAtomsInRow |
| 326 |
+ |
#else |
| 327 |
|
do j = 1, nLocal |
| 328 |
+ |
#endif |
| 329 |
|
nSkipsForAtom(j) = 0 |
| 330 |
|
#ifdef IS_MPI |
| 331 |
|
id1 = AtomRowToGlobal(j) |
| 350 |
|
end do |
| 351 |
|
enddo |
| 352 |
|
|
| 353 |
+ |
#ifdef IS_MPI |
| 354 |
+ |
allocate(skipsForAtom(nAtomsInRow, maxSkipsForAtom), stat=alloc_stat) |
| 355 |
+ |
#else |
| 356 |
|
allocate(skipsForAtom(nLocal, maxSkipsForAtom), stat=alloc_stat) |
| 357 |
+ |
#endif |
| 358 |
|
if (alloc_stat /= 0 ) then |
| 359 |
|
write(*,*) 'Could not allocate skipsForAtom array' |
| 360 |
|
return |
| 361 |
|
endif |
| 362 |
|
|
| 363 |
+ |
#ifdef IS_MPI |
| 364 |
+ |
do j = 1, nAtomsInRow |
| 365 |
+ |
#else |
| 366 |
|
do j = 1, nLocal |
| 367 |
+ |
#endif |
| 368 |
|
nSkipsForAtom(j) = 0 |
| 369 |
|
#ifdef IS_MPI |
| 370 |
|
id1 = AtomRowToGlobal(j) |
| 374 |
|
do i = 1, nExcludes_Local |
| 375 |
|
if (excludesLocal(1,i) .eq. id1 ) then |
| 376 |
|
nSkipsForAtom(j) = nSkipsForAtom(j) + 1 |
| 377 |
< |
#ifdef IS_MPI |
| 378 |
< |
id2 = AtomColToGlobal(excludesLocal(2,i)) |
| 367 |
< |
#else |
| 377 |
> |
! exclude lists have global ID's so this line is |
| 378 |
> |
! the same in MPI and non-MPI |
| 379 |
|
id2 = excludesLocal(2,i) |
| 369 |
– |
#endif |
| 380 |
|
skipsForAtom(j, nSkipsForAtom(j)) = id2 |
| 381 |
|
endif |
| 382 |
|
if (excludesLocal(2, i) .eq. id2 ) then |
| 383 |
|
nSkipsForAtom(j) = nSkipsForAtom(j) + 1 |
| 384 |
< |
#ifdef IS_MPI |
| 385 |
< |
id2 = AtomColToGlobal(excludesLocal(1,i)) |
| 376 |
< |
#else |
| 384 |
> |
! exclude lists have global ID's so this line is |
| 385 |
> |
! the same in MPI and non-MPI |
| 386 |
|
id2 = excludesLocal(1,i) |
| 378 |
– |
#endif |
| 387 |
|
skipsForAtom(j, nSkipsForAtom(j)) = id2 |
| 388 |
|
endif |
| 389 |
|
end do |