I stumbled on the same problem as Mathieu: I wanted to run independent GLPK computations (separate problem objects) in different threads (these threads are started from OpenMP).
My solution was to modify one line in tls.c: static _Thread_local void *tls = NULL; This is standard C2011 and supported by recent compilers. It seems older versions of gcc used __thread and Visual C++ supported __declspec(thread), both of which are still respectively supported. I was wondering whether some configure option could make its way into glpk so as to activate thread-local storage for the main platforms, since this seems a common request. -- David Monniaux Directeur de recherche au CNRS, laboratoire VERIMAG http://www-verimag.imag.fr/~monniaux/ _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk