Updating number of threads involve in the parallel region

Hi,
I modified the way we update *the number of threads involve in the paralel region*. Currently, all threads update the variable *num_threads*. I think one thread updates this variable is enough.

Kind regards,
Minh