Opened 9 years ago
Last modified 3 years ago
#3843 new defect
Write .log file directly to disk
Reported by: | Francesco Casella | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Run-time | Version: | |
Keywords: | Cc: |
Description (last modified by )
If I simulate ThermoPower.Examples.CISE.CISESim120501
with OMC for Windows 64 bit with the following flags:
setCommandLineOptions("+cseCall +cseEachCall --tearingMethod=omcTearing --preOptModules+=introduceDerAlias --preOptModules-=clockPartitioning -d=dumpSimCode,nogen,initialization,backenddaeinfo,discreteinfo, stateselection"); getErrorString(); simulate(ThermoPower.Examples.CISE.CISESim120501, simflags = "-lv LOG_STATS"); getErrorString();
I get this message on the console:
Error: File too large to fit into a MetaModelica string: ThermoPower.Examples.CISE.CISESim120501.log.
and the log file does not contain the log of the solver.
These log files can become huge (hundreds of megabytes). This is no big deal, as long as they are written directly to file. Having access to this information can be crucial for debugging.
Please make sure this date goes straight to mass storage without being stored in a MetaModelica string.
Change History (12)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
What I noticed was that the "string too large" error actually prevented the stuff to be written to the .log file, which did not contain any LOG lines, only the simulation statistics. Also, this is is happening on a 64 bit platform, not on a 32-bit one.
Anyway, I think the Dymola approach (which I suggested them many years ago) makes sense here: if the error message is over 10 MB, it is only written to disk and the path of the file displayed in the error message.
comment:5 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:7 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:9 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:11 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
They are written directly to file, but on compilation error, getErrorString() displays the error for convenience. And on 32-bit platforms, the maximum size of strings is small. But we could check the file size and make the displayed error just point to the file if it is over a certain threshold.