Output no longer displayed to command window in Matlab
- Daniel Gordon
- Posts: 34
- Joined: Fri May 06, 2016 7:57 am
Output no longer displayed to command window in Matlab
Hi,
Recently I've noticed that running the RRA tool in Matlab no longer pipes output to the command window. I think this happened when I upgraded my Matlab release from 2016a to the latest version.
I was wondering if anyone else has run in to this and figured out a way to restore the old behaviour, or alternatively specify a file for the output to be piped to?
By output I meant what is normally displayed in the OpenSim GUI.
Cheers,
Daniel
Recently I've noticed that running the RRA tool in Matlab no longer pipes output to the command window. I think this happened when I upgraded my Matlab release from 2016a to the latest version.
I was wondering if anyone else has run in to this and figured out a way to restore the old behaviour, or alternatively specify a file for the output to be piped to?
By output I meant what is normally displayed in the OpenSim GUI.
Cheers,
Daniel
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Output no longer displayed to command window in Matlab
You should be able to read the output from the out.log file.
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Output no longer displayed to command window in Matlab
Tom is correct about the workaround.
This is a known issue (https://github.com/opensim-org/opensim-core/issues/1612). The behavior depends on the match between the version of the compiler used for MATLAB and OpenSim.
This is a known issue (https://github.com/opensim-org/opensim-core/issues/1612). The behavior depends on the match between the version of the compiler used for MATLAB and OpenSim.
- Daniel Gordon
- Posts: 34
- Joined: Fri May 06, 2016 7:57 am
Re: Output no longer displayed to command window in Matlab
Is there a way to specify or recover the path to the log file?
As far as I can tell the out.log and err.log files are created upon first use of an OpenSim analysis within a Matlab session and during that session those files are used. Is there a way to programmatically ask for the full out.log path in the middle of a Matlab session, if you haven't made a note of it at the start?
As far as I can tell the out.log and err.log files are created upon first use of an OpenSim analysis within a Matlab session and during that session those files are used. Is there a way to programmatically ask for the full out.log path in the middle of a Matlab session, if you haven't made a note of it at the start?
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Output no longer displayed to command window in Matlab
The files are written to the current working directory.
- Bart van Veen
- Posts: 9
- Joined: Tue Jun 23, 2015 5:40 am
Re: Output no longer displayed to command window in Matlab
Would there be a way to do the opposite, i.e. suppress the OpenSim Messages to be displayed in the MATLAB Command Window?
I am using API calls (so not a call to an OpenSim tool) within a parfor loop and the printing of the messages to the Command Window seem to make the workers wait for each other to print their messages. Running the script through the MATLAB 'evalc' function (which captures rather than prints the messages) provides the expected increase in speed when switching from a for to a parfor loop. However, I would rather avoid using eval.
Thanks in advance for any suggestions.
I am using API calls (so not a call to an OpenSim tool) within a parfor loop and the printing of the messages to the Command Window seem to make the workers wait for each other to print their messages. Running the script through the MATLAB 'evalc' function (which captures rather than prints the messages) provides the expected increase in speed when switching from a for to a parfor loop. However, I would rather avoid using eval.
Thanks in advance for any suggestions.
- Russell Johnson
- Posts: 14
- Joined: Sun Dec 23, 2012 5:10 pm
Re: Output no longer displayed to command window in Matlab
I'm interested if anyone found a better solution to suppressing output to the command window. I have a project that needs to run initSystem many, many times and the output to the command window is overwhelming and seems to make the code extremely slow. I am currently using OpenSim 4.1 and Matlab 2019B. I don't seem to have this issue with OpenSim 3.3 and the same version of Matlab.bartvanveen wrote: ↑Tue Oct 09, 2018 10:16 amWould there be a way to do the opposite, i.e. suppress the OpenSim Messages to be displayed in the MATLAB Command Window?
I am using API calls (so not a call to an OpenSim tool) within a parfor loop and the printing of the messages to the Command Window seem to make the workers wait for each other to print their messages. Running the script through the MATLAB 'evalc' function (which captures rather than prints the messages) provides the expected increase in speed when switching from a for to a parfor loop. However, I would rather avoid using eval.
Thanks in advance for any suggestions.
Thanks in advance!
- Daniel Gordon
- Posts: 34
- Joined: Fri May 06, 2016 7:57 am
Re: Output no longer displayed to command window in Matlab
Hi Russell,
I now have the same problem as you (amusingly the opposite problem to when I originally created this post).
Did you find a nice way of suppressing the output to the command window?
Cheers,
Daniel
I now have the same problem as you (amusingly the opposite problem to when I originally created this post).
Did you find a nice way of suppressing the output to the command window?
Cheers,
Daniel
- Russell Johnson
- Posts: 14
- Joined: Sun Dec 23, 2012 5:10 pm
Re: Output no longer displayed to command window in Matlab
Hi Daniel,
I have not been able to find a way to suppress the output in 4.1. After not hearing any solutions here, I decided to just commit to using OpenSim 3.3 which does not give me the same issues with the output to the screen. I haven't really tried since this summer though, so I'm not sure if recent updates to the 4.1 code would be any different now.
Russell
I have not been able to find a way to suppress the output in 4.1. After not hearing any solutions here, I decided to just commit to using OpenSim 3.3 which does not give me the same issues with the output to the screen. I haven't really tried since this summer though, so I'm not sure if recent updates to the 4.1 code would be any different now.
Russell