I have created a simple class GLPK_PROBLEM to implement the glpk problem solving approach.
I have two for loop(one nested to the other) running for large number of iterations (say, m * n for instance 512 x 100000).
Before the Inner for loop call i have
created 2 object instance of the class GLPK_PROBLEM and initialize them
with all the constraints-values.
inside the Inner loop i am assigning the coefficient for the maximizing
equation ( using glp_get_obj_coef ) then computing/calling the
glp_simplex (object,¶m) and using the result obtained by
In short the
program creates 2 objects each time in the Outer loop for m
iterations(say) and each of these objects are used in the Inner loop n
This Work very well by GLPK package. I thank you and the glpk team with all my heart.
But when this very operation when i try to parallelize with the outer loop putting in
#pragma omp parallel for
does not work well for large iterations but works well for small
iterations. And the program aborts at different location at different
My query is it this task possible?
Is my problem at all related to the issue of "Thread safety of GLPK" ? If not can you please direct me where i might have gone wrong?