solver functions for glpk, mosek, gurobi. capture output function.