popt_caller writes out partial optimality states.
Implementation not pretty!