-
Notifications
You must be signed in to change notification settings - Fork 43
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
HopsanCLI saves fullCSV on error #2007
Comments
I can not recreate this issue using the latest version of Hopsan (master branch) As an example I tested with this one: I also added simulation abort at t=0.5 in that model to run the test again. (Just connect a SimulationTime block into StopSimulation) The output file still contains the same information up until the stop time, where the aborted output contains one incomplete additional line with zeroes, which is a different problem. Also is the version information given correct ? If so try to upgrade. Not that anything in this code has changed for a while. |
I found that if you do not use the resultsSortCSV cols option, then when the simulation aborts, the export would still contain the entire time vector. But I think that I have fixed that problem in my ongoing work #2002 |
Hi, here is an example of call used with hopsanCLI,
-m C:\git\rdcm\hopsan\models\md20_lr_best_fit.hmf --externalLibsFile
hopsan_libs.txt --simulate 0,1.000000e-06,2.000000e-01 --numLogSamples
100000 --parameterImport cli\params_mod.csv --resultsFullCSV cli\output.csv
--resultsCSVSort cols --logonly logVariables_md20_lr.txt
I tested using stopsimulation like you said, but I'm also unable to
replicate the issue. I'll get back if I'm able to track it down further.
(I forgot to update version info, it's the custom version Robert sent:
2.14.0.20200826.0831, but doubt it makes a difference since I
couldn't replicate on this version either.)
//Erik
Den tis 20 okt. 2020 kl 21:57 skrev Peter Nordin <[email protected]>:
… I found that if you do not use the resultsSortCSV cols option, then when
the simulation aborts, the export would still contain the entire time
vector. But I think that I have fixed that problem in my ongoing work
#2002 <#2002>
Also now if the CSV data is transposed, it does not have that extra line
with missing data at the end. At least in my tests.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2007 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRS3W5EQE5S35BYECLXW33SLXTR3ANCNFSM4SXRPQAQ>
.
|
Describe the bug
A clear and concise description of what the bug is.
When using hopsanCLI, and a component generates an error the simulation stops as it should.
But then hopsan tries to save the full CSV file anyway, WITHOUT caring about the --logonly variables. For my size model, this results in a csv file of over 300Gb. This effectively locks up the computer, and is impossible to handle since the return status seen by the calling software is received after the saving occurs.
To Reproduce
If the bug can be reproduce, please give the steps taken to reproduce the behavior:
Not sure if this applies to all components (in my example its custom components), but try making a model that throws an error during simulation and see if hopsanCLI generates a csv file not obaying the saveonly flag.
Expected behavior
A clear and concise description of what you expected to happen.
HopsanCLI should just halt on error.
Screenshots, Model or Data files
If applicable, add screenshots, models or data files, that display or cause the bug.
Hopsan version (please complete the following information):
Version information is shown in the message widget when HopsanGUI is started
HopsanGUI 64-bit, Version: 2.14.0.20200826.0831]
Custom build from Robert.
Additional information
Add any other context/information about the problem here.
Here's the output from hopsan:
Error: In hydMech_P_A_3; hydMech_P_A> ports crossing more than 10 mm!
Info: In hydMech_P_A_3; X1=0.034766076085979106
Info: In hydMech_P_A_3; X2=0.038604388594068742
Info: In hydMech_P_A_3; Simulation was stopped at t=-0.076045999992137098
Info: In md20_lr_5_5; Simulation was stopped at t=-0.076045999992137098
Error: In hydMech_P_A_3; hydMech_P_A> volume < 0!
Info: In hydMech_P_A_3; X1=0.034766076085979106
Info: In hydMech_P_A_3; X2=0.038604388594068742
Info: In hydMech_P_A_3; Simulation was stopped at t=-0.076045999992137098
Info: In md20_lr_5_5; Simulation was stopped at t=-0.076045999992137098
Saving Full results to file: cli\output.csv
Transposing CSV file
The text was updated successfully, but these errors were encountered: