Thread-safe test only when using OpenMP.
Fix warnings.
Update global optimization in example.
Global solver: count number of function evaluations.