make attempt_swap valgrind clean. now fails in pair->compute().
This commit is contained in:
@ -413,10 +413,6 @@ int FixNeighborSwap::attempt_swap()
|
|||||||
// pick a random atom i
|
// pick a random atom i
|
||||||
|
|
||||||
int i = pick_i_swap_atom();
|
int i = pick_i_swap_atom();
|
||||||
if (i < 0) return 0;
|
|
||||||
|
|
||||||
// get global id and position of atom i
|
|
||||||
// get_global_i(i);
|
|
||||||
|
|
||||||
// build nearest-neighbor list based on atom i
|
// build nearest-neighbor list based on atom i
|
||||||
|
|
||||||
@ -545,8 +541,9 @@ int FixNeighborSwap::pick_i_swap_atom()
|
|||||||
i = local_swap_iatom_list[iwhichlocal];
|
i = local_swap_iatom_list[iwhichlocal];
|
||||||
MPI_Allreduce(&id[i], &id_center, 1, MPI_INT, MPI_MAX, world);
|
MPI_Allreduce(&id[i], &id_center, 1, MPI_INT, MPI_MAX, world);
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
id_center = -1;
|
||||||
}
|
}
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user