-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MMC Colored Output #51
Comments
the color escape code is easy to remove using sed before processing the text, you just insert
or
the first you can also do this with perl and other stream processing tools https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-stream |
Yes, the escape sequences can be removed later, I just find it a little cleaner to keep the escape sequences on the colored lines (or ideally to be able to suppress them via a CLI argument) but I understand this is a matter of taste/opinion. If the escape sequences stay as they are now, the examples cases bash scripts may need to be updated to remove them. Please let me know if you would be open to that kind of contributions, I could try to do a PR. Best, |
is there a particular field that you want to filter? you could also use |
To be clearer, the examples scripts filter the output for postprocessing by Octave/Matlab scripts but the filter commands fail because of the ASCII escape sequences. For instance, the "onecube" example, the run_test.sh script fails to filter the output because of the escape sequence. So a solution may be to either:
Hope that helps. |
ok, I see where this came from. see my above command update to the onecube example. first, the output did not work anymore because the printed messages are only visible when running the simulation on the CPU - this is now triggered by -G -1, if you don't add that flag, mmc will call OpenCL version of mmc, which does not print the message - printing on the GPU is quite expensive. so I added -G -1 in the commands, and also removed the header that I force printing, now the output should be correct again. |
Hello,
I see that MMC outputs colored text using ASCII escape sequences.
In some cases this makes it difficult to filter the output with text based tools like sed.
Would it be possible to either disable it via a command line option or to at least put reset escape sequences before line breaks (example patch below) as it would make it easier to process the following lines.
Thanks for your help.
PS: I compiled mmc from tag v2019.4 using
make release
The text was updated successfully, but these errors were encountered: