Say I have $n$ threads executing in a parallel region and one of them leaves the parallel region when others are still continuing to execute in the parallel region. Why this is a $BAD$ idea? For example you can consider this program.
$OMP PARALLEL IF(EXECUTE==true) 10 sum(id)=next(id) 30 result(id)=sum(id)*9.8 if(converged(result(id)) goto 20 go to 10 $SOMP END PARALLEL if(not_FINISHED) goto 30 20 print *,id
In this code we are branching out of the parallel region. I have read that its a $BAD$ idea to do so, but I have not got the reason. So it will be very helpful if someone can shed some light on this.