I am using glpk to perform optimization over a linear programming proble using api routines. However, there is no support for multithreading or parallelization. That means only 1 solver can be run at a time on 1 machine. I came across glpsol, which starts a process to perform optimization. This would allow me to run multiple optimizations (ignoring the overhead due to starting a new process). The problem is, I have already created glpk problem statement using api routines, but the glpsol takes a different type of model file (cplex, mps, glpk, etc.). How do I modify existing code to generate this file during runtime?