Sorry, my bad. The shared variable is on the stack, so I had to add a taskwait at the end (code follows). A warning would have been nice... --- start c code --- void recurse(int levelsToGo) { if ( levelsToGo == 0 ) { printf("*"); } else { #pragma omp task shared(levelsToGo) { recurse(levelsToGo-1); } #pragma omp task shared(levelsToGo) { recurse(levelsToGo-1); } #pragma omp taskwait } } --- end c code ---