Opened 10 years ago
Closed 10 years ago
#3075 closed defect (fixed)
omc +help=debug doesn't work
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.2 |
Component: | *unknown* | Version: | trunk |
Keywords: | Cc: | Adrian Pop |
Description
I tried to run omc +help=debug
using OMC the r24023 nightly build under Windows. The reply is
I'm sorry, I don't know what debug is
This reminds me of the old joke: type make love
at the Unix prompt, it will reply: Dont' know how to make love. Stop.
In this case, though, OMC is supposed to actually know what debug is, isn't it?
Change History (18)
follow-up: 2 comment:1 by , 10 years ago
Cc: | added |
---|
follow-up: 3 comment:2 by , 10 years ago
Replying to perost:
Francesco, do you get the normal output with all the flags if you just run omc without any arguments?
Yes. Also, omc +help works fine, as well as omc +help=optmodules and all other topics, except debug.
comment:3 by , 10 years ago
follow-up: 5 comment:4 by , 10 years ago
The situation is actually much worse, when using Windows (apparently everything's OK in Linux)
- I understand that the bootstrapped compiler expects flags given with - or --, not with + However, if you type omc, the help text still refers to +help=debug and +help=topics. Please correct that
omc -h
works as expected. However,omc -h=topics
doesn't, whileomc --help=topics does
omc +help=debug
,omc -h=debug
,omc --help=debug
all fail for various reasons.
Please make sure this is fixed before 1.9.2 is released.
comment:5 by , 10 years ago
Replying to casella:
The situation is actually much worse, when using Windows (apparently everything's OK in Linux)
- I understand that the bootstrapped compiler expects flags given with - or --, not with + However, if you type omc, the help text still refers to +help=debug and +help=topics. Please correct that
Fixed in r24111. + still works for flags, but we prefer to use - or -- now that the RML runtime no longer eats those flags.
omc -h
works as expected. However,omc -h=topics
doesn't, whileomc --help=topics does
Also fixed in r24111.
omc +help=debug
,omc -h=debug
,omc --help=debug
all fail for various reasons.
Probably not fixed in r24111, but let me know if my changes somehow fixed the issue.
comment:6 by , 10 years ago
With r24120 on Windows (Msys terminal) I get:
adrpo@ida-liu050 ~/dev/OpenModelica/build/bin/ $ ./omc -h=debug I'm sorry, I don't know what debug is. adrpo@ida-liu050 ~/dev/OpenModelica/build/bin/ $ ./omc +help=debug I'm sorry, I don't know what debug is.
Note that:
./omc +help=topics ./omc +help=omc ./omc +help=optmodules ./omc +help=simulation
works fine.
I wonder if somehow +help=debug doesn't conflict with:
./omc +locale=C +help=topics ... <flagname> Displays option descriptions for multi-option flag <flagname>. ...
I'll check more.
follow-up: 8 comment:7 by , 10 years ago
I think that Util.stringWrap somehow fails if the inWrapLength is 80 as returned by System.getTerminalWidth when printing debug flags.
comment:8 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
Replying to adrpo:
I think that Util.stringWrap somehow fails if the inWrapLength is 80 as returned by System.getTerminalWidth when printing debug flags.
Yes, I get the same issue now if I resize my terminal to be 79 characters in width. I'll fix it tomorrow.
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The issue should now be fixed in r24126. The description for the useMPI debug flag ended with a space for some reason, and Util.stringWrap didn't handle the case when the only remainder from a split was a single space.
comment:10 by , 10 years ago
I am sorry, but r24187 still doesn't work for me. If I type omc --help=debug at the cmd prompt (without resizing the window or anything), the process starts eating up memory like mad (over 2 GB after a few seconds). Eventually an error window pops up stating "Fatal error in GC: too many heap sections".
comment:11 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 14 comment:13 by , 10 years ago
Replying to bachmann:
omc +help=debug | moredoes not give any output on Linux
As far as I understand, +help=debug is deprecated. Does --help=debug work?
follow-up: 15 comment:14 by , 10 years ago
Replying to casella:
Replying to bachmann:
omc +help=debug | moredoes not give any output on Linux
As far as I understand, +help=debug is deprecated. Does --help=debug work?
There shouldn't be any difference between +help and --help. +help=debug | more works for me in Linux though. But I will see if I can replicate the issue.
comment:15 by , 10 years ago
Replying to perost:
Replying to casella:
Replying to bachmann:
omc +help=debug | moredoes not give any output on Linux
As far as I understand, +help=debug is deprecated. Does --help=debug work?
There shouldn't be any difference between +help and --help. +help=debug | more works for me in Linux though. But I will see if I can replicate the issue.
I can confirm the issue with redirecting +help=debug by pipe, all other cases work fine for me.
comment:16 by , 10 years ago
Ok, I've attempted to solve the issue in r24303. Let me know how it works for you.
comment:18 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
The windows issues are fixed also!
This works fine on Linux at least. Adrian, can you check on Windows? Maybe System.getTerminalWidth fails on Win? Francesco, do you get the normal output with all the flags if you just run omc without any arguments?