Skip to content

Commit f409e93

Browse files
Hack to get nomad iter printing
1 parent 291caef commit f409e93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Solvers/Source/nomadmex.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ struct printfbuf : std::streambuf {
340340
int sync() {
341341
*pptr() = 0;
342342
mexPrintf(pbase());
343-
mexEvalString("drawnow;");
343+
mexEvalString("pause(1e-8);"); // HACK (but can't find a way to flush in R2022b? Doesn't print often anyway...)
344344
setp(m_buffer, m_buffer + s_size - 2);
345345
return 0;
346346
}
@@ -994,7 +994,7 @@ int checkInputs(const mxArray *prhs[], int nrhs, mxArray *plhs[], int nlhs)
994994
mexPrintf("User guide: \'%s\'\n",NOMAD::USER_GUIDE_FILE.c_str());
995995
mexPrintf("Examples : \'%s\'\n",NOMAD::EXAMPLES_DIR.c_str());
996996
mexPrintf("Tools : \'%s\'\n\n",NOMAD::TOOLS_DIR.c_str());
997-
mexPrintf("Please report NOMAD bugs to [email protected] and MEX Interface bugs to [email protected]\n\n");
997+
mexPrintf("Please report NOMAD bugs to [email protected] and MEX Interface bugs to [email protected]\n\n");
998998

999999
std::cout.rdbuf(cout_sbuf); //Return cout to initial buffer
10001000
return 0;

0 commit comments

Comments
 (0)