Skip to main content

Cannot display log in Matlab (macos)

Answered

Comments

12 comments

  • Maliheh Aramon
    Gurobi Staff Gurobi Staff

    Hi Wei,

    I just tested this by running the example problem \(\texttt{mip1.m}\) in MATLAB R2021b on macOS and I was able to save the log file. I explicitly set the \(\texttt{params.logfile}\). Do you mean the log file is saved on Windows even if you do not set this parameter explicitly?

     
    Best regards,
    Maliheh
    1
  • Wei Wang
    Gurobi-versary
    Conversationalist
    First Question

    Hi Maliheh,

    Thanks for your reply. Normally, the log will be printed dynamically in the command-line window of Matlab when Gurobi is running with default parameters, right? However, there was no log printed when I ran Gurobi in Matlab on macOS, until the solving process was interrupted by 'ctrl+c'. I am sure all of the parameters are kept default.

    Best regards,

    Wei

    0
  • Maliheh Aramon
    Gurobi Staff Gurobi Staff

    Hi Wei,

    Normally, the log will be printed dynamically in the command-line window of Matlab when Gurobi is running with default parameters, right?

    Yes, you are right. I am running Gurobi 9.5.1 in MATLAB R2021b on macOS and I see the log in the command-window of MATLAB. It might be worth checking this link in MATLAB Answers: command window no output

    Best regards,

    Maliheh

    0
  • kevin qiao
    Gurobi-versary
    First Comment

    Hi Maliheh,

      I get the same problem, and the MATLAB answers don't work for me, even though I reinstall matlab R2021b and gurobi 9.5.1. 

    Best regards,

    Wenji

    0
  • Wei Wang
    Gurobi-versary
    Conversationalist
    First Question

    Hi Maliheh,

    I run the code again and it all seems to work well. The log can be printed as in the normal case, however, I did not make any change to Matlab or Gurobi. As Wenji said, the error may not scarcely happen and I guess it may result from a compatibility issue between Gurobi and MacOS (with M1 CPU). Thanks for your kind help.

    Best regards,

    Wei

    0
  • kevin qiao
    Gurobi-versary
    First Comment

    Hi Maliheh and Wei,

      The same problem happens when I run Gurobi 9.5.2 in Matlab R2021b and R2022a on windows 10 platform. While Gurobi 9.5.2 works well in Matlab R2021a. So I guess there may be a compatibility problme between Gurobi 9.5.2 (and 9.5.1) with Matlab R21b (and R22a).

    Best regards,

    Wenji

    0
  • Wei Wang
    Gurobi-versary
    Conversationalist
    First Question

    Hi Kevin,

    Thank you for the reply.

    It works! I reinstalled the Matlab with R2020a version (instead of the previous R2021b) on my Mac and the log can be displayed normally in command-line window. As you said, there might be some compatibility problme when using Gurobi on Matlab R2021b.

    Best regards,

    Wei

    0
  • Johan Gustafsson
    Gurobi-versary
    Curious
    Conversationalist

    Hi,

    I'm having the same problem on Windows 10. Should we really have to go back to an old MATLAB version to make this work? Is there no other workaround? Are there any plans to fix this problem? It is very annoying...

    Thanks for a good thread!

    Johan

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    We are aware of the issue and are working on a fix.

    Unfortunately, the issue is not as simple as it looks on the surface. We will try to provide a fix in the next major release.

    The output should come up in the console latest after optimization has finished, so as long as you don't need continuous output, you should be fine.

    Best regards, 
    Jaromił

    0
  • Wei Wang
    Gurobi-versary
    Conversationalist
    First Question

    Hi Jaromił,

    Thank you and your colleagues for the effort of fixing this issue.

    Wei

    0
  • Johan Gustafsson
    Gurobi-versary
    Curious
    Conversationalist

    Ok, thanks, looking forward to it! I can work in the old MATLAB version until then!

    Best,

    Johan

    0
  • Wei Wang
    Gurobi-versary
    Conversationalist
    First Question

    Hi Johan,

    It seems no available way has been found yet to fix this problem, except using some old versions of Matlab like R2020a. Hope this to be fixed in the next release.

    Thank you,

    Wei

     

    0

Please sign in to leave a comment.