Open evanweaver opened 6 years ago
I linked the OS one here too: https://github.com/NREL/wex/issues/40
Thanks for looking into this!
No worries @eringold. Just FYI, we are now putting tickets for PAT, DView, server, etc in their respective GitHub repos. If you are getting a lot of emails about moving tickets, it's because of this new approach. THanks, Evan.
@evanweaver No problem; Dan advised to put an issue in both, so that's what I did.
FYI I dug into this a little when I first opened the issue, and found this difference in how DView opens the SQLite database file here: https://github.com/NREL/wex/blob/16b812b99b989329194ed9dc84ab0cbc71393aff/src/dview/dvfilereader.cpp#L995 versus how (maybe) ResultsViewer was doing it: https://github.com/jasondegraw/ResultsViewer/blob/60cdea41668cabd06a397f6516498abbae0f2a77/src/SqlFile.hpp#L113 .
Perhaps the use of the flag SQLITE_OPEN_READONLY (vs SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) could be causing the problem?
@eringold thanks for the legwork!
I just tried that on Ubuntu 16.04 with DView (wxWidgets 3.1.1) Version Mar 21 2018. Had a SQL file open in DView, rerun the simulation, and I see the timestamp did change just fine.
The line @eringold pointed to is still the same in current develop, so this might be a platform-specific problem.
From @eringold on November 14, 2017 21:38
Steps to replicate:
From a practitioner POV, model troubleshooting sometimes involves repeatedly running simulations and comparing results. This was easy with ResultsViewer, where old results would be retained while new ones could be examined side-by-side in a new instance. A DView instance which locks the sql file from being over-written makes this process much more difficult. Additionally, the OS Results measure will show updated results, but other measures that rely on the project folder eplusout.sql will be returning out of date results.
Copied from original issue: NREL/OpenStudio#2845