sandbox/bugs/automatic.c
Threads may get stuck
The following example illustrates a scenerio where not all MPI treads try to set (automatic) boundary conditions. It may wait forever or crashes occur when other threads continue to set boundary conditions in other contexts.
int main() {
init_grid(N);
scalar s[];
foreach()
s[] = x;
if (pid() == 0)
interpolate (s, 0.1, 0.1);
printf ("%d\n", pid());
}