CADSWES Maintenance Accomplishment Report Compilation -- October 2017
Phil Weinstein, edit 11-08-2017, initial writing in progress
October 2017 Maintenance Highlights:
Report contributors:
(II) RiverWare Software Maintenance
|
The following release was generated this month:
Summary of Changes in RiverWare Patch Release 7.1.4 Bugs:
|
The following fourteen bugs were fixed:
Remove Slot Dialog Creation and Management from Open Object Dialogs / Bug 6006
In RiverWare 7.2, the life-cycle of Slot Dialogs is no longer tied to the parent simulation object's Open Object Dialog. Slot Dialogs will no longer be closed when the Object Viewer or associated Object Dialog is closed. There was a lot to this change, as the life-cycle of Slot Dialogs has been very fundamentally based on a legacy parent/child dialog mechanism involving a lot of interaction between the dialogs and dialog managers.
In order to more directly address Bug 6006, we had initially experimented with deleting and recreating Slot Dialogs as their slot's containing simulation objects were moved between the new Object Viewer and single-object Open Object dialogs. That was somewhat successful, but some user interface state information was lost when Slot Dialogs were recreated (e.g. the vertical, time, scroll position). Separating out the management of Slot Dialogs was a broader way of addressing the problems described in Bug 6006.
Investigation: Crash with large memory usage from numerous diagnostic messages / Bug 6023
When a model with many slots and many timesteps has informational diagnostics enabled for all slots, millions of diagnostic messages may be generated. As a result, RiverWare crashes when allocating memory for the data structure that holds the messages.
Two items were investigated: 1) Why does RiverWare crash when the memory usage is not yet at the machine limit, and 2) What can we do to show a warning message and exit gracefully before a crash like this occurs.
Item 1: RiverWare is adding a large chunk of messages all at the same time to the diagnostic window during a run state called INIT_SUSPENDED. In order to do this, Qt must resize the QVector (internal to QTreeView) that holds the messages. QVector requires contiguous memory and if there is no available chunk of contiguous memory, Qt throws a fatal error. While current memory use is not yet at the machine limit, the request for a large contiguous amount of memory fails because the contiguous space is not available.
Item 2: A possible way to prevent the crash might be to use a configurable max number of diagnostic messages with a default of, say, one million. If this threshold is detected, RiverWare would stop displaying diagnostic messages and present a pop-up window indicating the max number of diagnostic messages has been reached and that no more would be written. This would allow the run to continue.
Maintain Mass Balance Summary slot references through name changes / Bug 6024
In RiverWare 7.1 and prior versions, changes to the names of any slots referenced from a Mass Balance Summary Slot (including changes to the names of containing SimObjs and Accounts) did not result in updating those slot references. Those broken slot references resulted in errors being reported when the Mass Balance Summary Slot was evaluated. (See Bug 6024).
In most other places in RiverWare, slot references are represented with "live" C++ pointers to Slot data structures. In that context, the only thing that needs to be done when a slot is renamed is updating the user interface. But slot references from Mass Balance Summary Slots are maintained as character strings (the full name of the referenced slot). So, the Mass Balance Summary Slot's slot references need to be explicitly updated -- whether or not the Mass Balance Summary Slot is being shown in the user interface. (The user interface also needs to be updated). This was completed for RiverWare 7.2.
Move method rwSetting::resolveSymbolicDateTime to a more appropriate location.
During the project to introduce symbolic dates to expression slots, it came to light that a utility method designed to resolve date strings was residing within the rwSettings class. This location was not appropriate for a date-time utility method, and the method was relocated to the Date_Time class. Related code changes were made within the DateTimeQtSpinner, SlotQtDialog, Workspace, UberSymbolDateTimeEdit, RplApplication, ModelReportItem, and Slot classes.
RiverWare Software Maintenance / FY 2017 Report
A report draft summarizing all CADSWES maintenance work for FY 2017 (Oct. 2016 through Sept. 2017) was prepared. This document is available here:
- R:\doc\Accomplishments Reports\FY17\SoftwareMaintenanceSummaryFY17-Phil-2017-10-19.docx
CADSWES bug tracking system (for RiverWare, RiverWISE and RiverSMART) is a collection of home grown Perl scripts running from an Apache web server on the front end and the Gnats bug tracking system on the back end. The Perl scripts:
- Create web pages containing forms for users to fill out.
- Use the information provided by users to invoke Gnats commands.
- Gather the output from the Gnats commands.
- Parse the output and create web pages displaying the output.
The Perl scripts are intended to be run from a web server but can be run from the command line, provided the forms they’re creating are relatively simple.
The bug tracking system is being ported from the current Linux server, Alamosa, to the new Linux server, Animas. The port includes four components:
- The Perl scripts
- Perl, which is being upgraded to a new version
- Gnats, which being upgraded from 4.1.0 to 4.2.0
- Linux, which is being upgraded from "stock" Linux to "Security Enhanced" Linux, or SELinux.
All four components have been problematic during the port, unfortunately the first component is the only one where we can fix problems. The others require that we email the CU Office of Information Technology (OIT) and wait – sometimes hours, sometimes days – for the current problem to be fixed.
In October we were able to accomplish the following in this difficult environment:
- Verify Perl scripts which query the Gnats database work from both the web server and the command line. (These are scripts which display either a list of bugs based on search criteria or a single bug).
- Verify Perl scripts which modify the Gnats database don’t work from the web server but do work from the command line. (These are scripts which either submit a new bug report or modify and existing bug report.)
The discrepancy in the second bullet item is because from the web server scripts run as the pseudo-user "apache" while from the command line scripts run as the currently logged in user. SELinux has different access control security policies for the different users, hence the different behaviors.
The regression tests continue to be maintained on a daily basis. This involves updating the regression tests to exercise new developments in the code. Also, as new code is added to the development area, the model comparisons performed in the nightly regression tests usually show differences (for example, because a new method category may have been added). When this occurs, the regression tests need to be updated to reflect the current state of the development area so model comparisons do not fail. In addition, every week, the daily history of each regression test is analyzed to determine if the run time or model size has significantly changed because of new development.
In October,
- Tests were investigated when the test machines could no longer send email, presumably due to the new server.
- The tvaOptRPL and BPA_STBig10Opt tests were revised to prevent sporadic failures due to alternative optima. The use of the OptValue function in some optimization constraints frequently led to arbitrary differences in model results due to alternative optima. This created the potential for ignoring actual issues when they occurred. The policies using OptValue were revised to no longer use the function and, thus, prevent these differences. Revising these two optimization tests revealed an actual issue with 3D Table Interpolation that was filed and fixed as bug 6016.
- The BPA_STBig10Opt test was updated based on software changes to summation satisfaction scaling, which contributed to small differences in model results. An unused optimization seed parameter was also removed with the software changes, and the model was updated to reflect this change.
None reported for October 2017.
--- (end) ---