FRA Compute Time
Last Modified: 2023-03-26 15:26:20.266
Software Version
HEC-WAT Version 1.1.0 was used to create this example. You can open the example WAT study with HEC-WAT Version 1.1.0 or a newer version.
Download Initial Project File: Workshop_2.7.7z
Purpose
This workshop explores a few tools within HEC-WAT to help estimate the compute time of a simulation to help inform scoping a compute for HEC-WAT to meet some design objective. Within HEC-WAT there are many things that impact the time a compute takes. One major contributor is the computing capabilities of the computer in use. These workshops were created using one computer, and the images stored in the workshop represent the time it takes to compute on that machine – performance may vary on different computers. Additionally, if large processes (like virus scans) are running while HEC-WAT is running, that can have large impacts on the compute speed. Practically, it is encouraged to run many time trials to develop an estimate of how long a compute will take.
Part 1: One Event Compute Time
To start we are going to run a single event. HEC-WAT with the FRA compute option allows the user to run a single event. To make sure the event we select is not skipped, we need to turn off the skip rules and then compute a specific event within the FRA compute editor to run. This part walks through those steps. HEC-WAT with the FRA compute option will generate all of the events for the lifecycle within the Hydrologic Sampler, and then run the specified event for HMS and ResSim.
- Start HEC-WAT, from the HEC-WAT main window, from the File menu, click Open Study, the Open Study browser will open. Browse to the location of the HEC-WAT study for Workshop 2.7 – C:\Workshops\Workshop2_7\RussianRiver_updated.
- Click on sty, click Open, the Open Study browser will close (Figure 1), and the Russian River study will display in the HEC-WAT main window.
- To view the Existing FRA simulation, from the Study Tree, expand the Simulations folder. This simulation contains Model Skip Rules which must be edited to compute the entire event.
- From the HEC-WAT toolbar, select the Model Skip Rules Editor icon.
The Model Skip Rules Editor opens. - From the Model Skip Rules Editor, from the Build Logical Expression table, select the first row (should be selected by default). Now you can edit the logical expression, which must be cleared before we compute the FRA simulation.
- To clear Expression A, from the Edit Logical Expression panel – click the Clear button for Expression A and the Expression A box will clear.
- Repeat for Expression B – click the Clear button for Expression B and the Expression B box will clear.
- Click the Save button to update the Build Logical Expression table, and the expression in row 1 will be replaced with "** Not Set **".
- Next, from the Build Logical Expression table, we need to clear the second row, so select row 2.
- To remove the skip models condition, from the Select Models to Skip panel, click Deselect All to uncheck the selected models to skip, and click Save to update the Build Logical Expression table. Alternatively, the skip models rule in the second row can be removed completely by selecting row 2 and clicking the Delete button.
- To remove the skip models condition, from the Select Models to Skip panel, click Deselect All to uncheck the selected models to skip, and click Save to update the Build Logical Expression table. Alternatively, the skip models rule in the second row can be removed completely by selecting row 2 and clicking the Delete button.
- Click OK, to save changes and close the Editor. From the HEC-WAT main window, from the HEC-WAT toolbar, click the Save icon to save the watershed.
- From the Study Tree, right-click the FRA simulation name, Existing, point to Compute from the shortcut menu, and while holding down the Ctrl keyboard key, click Simulation (CTRL to Force) from the submenu.
- The Run FRA Simulation - Existing Editor opens (Figure 7). Select the radio button for Run specified, and from the dropdown list, select Event(s). In the left textbox, next to the Run specified dropdown list, enter "4" for lifecycle 4, and in the right textbox enter "7" to compute lifecycle 4 – event 7. (Note, the tooltip, "Enter the Lifecycle of the Events to run" that appears when you hover over the left textbox).
- Click Next. Then click Compute and make a note of the total compute time from the last line in the Compute Progress window when the compute is complete.
- Now scroll down in the Compute Progress window and find the total compute time for the event in the third from last line in the Compute Progress window.
This represents the total compute time for the simulated event – that includes the generation of events from the hydrologic sampler, computation of the specific event by HEC-HMS and HEC-ResSim, and storage of output variables.
- It is useful to look at the compute time for HEC-HMS and HEC-ResSim specifically, their compute times should be included in the text in the compute progress window, scroll up to in the Compute Progress window and find the compute time for HMS and ResSim. Make a note of those compute times, and close the Compute Progress window. Now we have an estimate of the compute time for a single event – we are going to use that information to estimate the compute time for a lifecycle which will represent 50 events.
Part 2: Enable Compute Timings to DSS File
We would like to use the information from the first part to help inform our estimation of the compute time for a lifecycle. We will be able to see the total compute time of the simulation in the same manner as the previous part, however, since we will be running many events it is unreasonable to read the log file to determine the event computes for each event and model, so we are going to use the DSS compute timing log to assist in our evaluation of compute times.
- From the HEC-WAT main window, from the Tools menu, click Options. The Options dialog opens.
- From the Options dialog, select the DSS Timing Log tab and check the Enable Compute timings to DSS File checkbox (Figure 10).
- Click OK to close the Options dialog. This enables the DSS timing log which is a feature to log the amount of time each plug-in contributes to the overall compute time within an HEC-WAT FRA compute.
Part 3: Estimate Compute Time for One Lifecycle
As scientists, it is useful to use hypothesis testing in every aspect of our jobs. To facilitate learning and understanding of how the HEC-WAT compute works we are going to use the data collected in Part 1 to inform an estimate of the compute time for a given lifecycle. Since a lifecycle is 50 years, we know how many events there will be within a lifecycle; therefore, if we know how long a single event took to compute, we can estimate how long 50 events will take.
Question 1: What was the total compute time for running one event (from the compute time reported in Part 1)?
The single simulation took 35.7 seconds. Answer's will vary depending an individual's computer.
Question 2: How much of that time was HEC-HMS and HEC-ResSim computes you recorded in Part 1, page 6?
The HMS and ResSIM computes took 7.5 seconds. Answer's will vary depending an individual's computer.
Question 3: Since there are 50 events in each life cycle, what is the maximum time and minimum time you would estimate for running a lifecycle?
Lifecycle Runtime Time = Hydrologic Sampler Runtime + 50 events * (ResSim Runtime + HMS Runtime)
28 seconds + 50 events * (7.5 seconds) = 6.75 min
Answer's will vary depending an individual's computer.
- Open the Run FRA Simulation window again by computing the Existing Select the radio button for Run specified and select Lifecycle(s) from the dropdown list. In the textbox for the lifecycles(s) to compute, enter "3" and click Next. Click Compute and wait until the compute is done.
Question 4: Record how long the compute took when it was completed. Was your estimate of the compute time accurate? If it was not, can you estimate why it may have been wrong?
The simulation took 8.5 minutes which is higher than the estimated runtime. After that first event, it takes about 10 seconds on average for the simulation. Answers will vary.
- To evaluate how long each compute took within the lifecycle we will look at the compute timings log. From the Tools menu, click Compute Timings. The Compute Timings window opens.
- The compute time in this window is shown in Milliseconds (by default), from the Show Time in list, change the time to be shown in Seconds. Change the Record selection to be LifeCycle 2. Although we computed Lifecycle 3 (ran the 3rd lifecycle in the simulation), the Compute Timings counts lifecycles from zero (which is lifecycle 2).
Question 5: Knowing how long a lifecycle takes to compute, how long should one realization take? A whole simulation of 15 realizations?
For a 10 lifecycles per realization (500 years in a realization and 50 events per lifecycle), 1 lifecycle takes 8.5 minutes which means 1 Realization should take ~ 85 minutes.
Estimating 15 Realizations: 85 minutes * 15 realizations = 21.3 hours
Question 6: How could you shrink the amount of time it would take to compute if you are only interested in results for events greater than the 100 year event? How long would the compute time take (approximately)?
100Yr event = .01 probability or 1%
We’re only interested in running 1% of the events which means we can utilize the skip rules. The skip flag doesn’t impact the Hydrologic Sampler since those computes need to happen for the sip flag to work.
1 Lifecyle runtime = Hydrologic Sampler runtime + 50 events * (ResSim runtime + HMS runtime)
= 28 sec + 50 * (7.5 seconds) * .01
= 31.75 seconds
For a realization, the compute time estimate: Realization = Lifecycle runtime * 10 lifecycles
= 31.75 minutes * 10 lifecycles
= 5.3 minutes
Question 7: Start a compute running the entire simulation – leave it to run over night.Simulation completed after 513 mins ~ 8 hours.