NRCan-IETS-CE-O-HBC / HTAP

NRCan's Ruby scripts for batch analysis and optimization with HOT2000
http://www.nrcan.gc.ca/energy/efficiency/housing/home-improvements/17725
GNU Lesser General Public License v3.0
14 stars 7 forks source link

htap-prm.rb returns "Fatal Error! HOT2000 message box or couldn't load file!" but the generated .h2k files seem to work. #46

Closed please-wait closed 5 years ago

please-wait commented 6 years ago

I have had this problem with the master branch, using H2K-CLI-Min 11.3b90.

This is the Command Line (input files are attached below) :

λ htap-prm.rb -r test.run -v -o HOT2000.options

 ======================================================
 HTAP-prm.rb ( a simple parallel run manager for HTAP )
 ======================================================

 - Creating working directories (HTAP_work-0 ... HTAP_work-2)

 - Deleting prior HTAP-sim directories

 - Reading HTAP run definition from test.run...  done.

 - Creating mesh run combinations from run definitions...  done. (created 3 .choice files)

 - Preparing to process 3 generated '.choice' files using 3 threads

 - HTAP-prm: begin runs ----------------------------

   + Batch 1 ( 0/3 files processed so far...)
     - Starting thread : 1/3 for file ./gen-choice-files/sim-1.choices (PID 14204)... done.
     - Starting thread : 2/3 for file ./gen-choice-files/sim-2.choices (PID 20256)... done.
     - Starting thread : 3/3 for file ./gen-choice-files/sim-3.choices (PID 4832)... done.
     - Waiting on PID: 14204 (1/3)... done.
     - Waiting on PID: 20256 (2/3)... done.
     - Waiting on PID: 4832 (3/3)... done.
     - Post-processing results from PID: 14204 (1/3 ./gen-choice-files/sim-1.choices )... RUN FAILED! (see dir: HTAP-sim-1)
     - Post-processing results from PID: 20256 (2/3 ./gen-choice-files/sim-2.choices )... RUN FAILED! (see dir: HTAP-sim-2)
     - Post-processing results from PID: 4832 (3/3 ./gen-choice-files/sim-3.choices )... RUN FAILED! (see dir: HTAP-sim-3)
     - Writing results to disk...  done.

 - HTAP-prm: runs finished -------------------------

 - Deleting working directories

 - HTAP-prm: Run complete -----------------------
   + 0 files were evaluated successfully.

   + 3 files failed to run
   ! The following files failed to run !
     + ./gen-choice-files/sim-1.choices (dir: HTAP-sim-1)
     + ./gen-choice-files/sim-2.choices (dir: HTAP-sim-2)
     + ./gen-choice-files/sim-3.choices (dir: HTAP-sim-3)

When I look in in each of those HTAP-sim-* directories, the end of Substitute-PL.log is:

... 

Overwriting: C:\HTAP\HTAP-work-0\NRCan-A9_3000sf_2stry_walkOut.h2k 

 Changed path to path: C:/HTAP/HTAP-work-0/H2K for simulation.

 Invoking HOT2000 (PID 20108)... Hot2000 (PID: 20108) finished with exit status  

substitute-h2k.rb -> Fatal error: 
 Fatal Error! HOT2000 message box or couldn't load file!

There is no HOT2000 error popping up on my screen, and the .h2k file in each directory is ok (attached below): The XML contains <AllResults> and I have opened and ran them in GUI version of HOT2000.

My understanding is that the problem stems from HOT2000 closing without an exit code. What would be the reason for that?

Attachments

please-wait commented 6 years ago

When I comment out the following line of Exit Status == nil scenario:

https://github.com/NRCan-IETS-CE-O-HBC/HTAP/blob/5ea8a6ac42cdc8e837093f27e5bce90f47c38b94/substitute-h2k.rb#L3005

the error changes to:

 Invoking HOT2000 (PID 13872)... Hot2000 (PID: 13872) finished with exit status  

 Moved to path: C:/HTAP/HTAP-work-0

 Copying results.
 Loading XML elements from C:\HTAP\HTAP-work-0\NRCan-A9_3000sf_2stry_walkOut.h2k ...
substitute-h2k.rb -> Fatal error: 
Could not read Browse.Rpt.

~Reading substitute-h2k.rb it seems it is looking for Browse.rpt because it could not get .h2k's XML. Same problem with the exit status.~

please-wait commented 5 years ago

Looking further into the issue, I can't see how this comment is enforced:

https://github.com/NRCan-IETS-CE-O-HBC/HTAP/blob/5ea8a6ac42cdc8e837093f27e5bce90f47c38b94/substitute-h2k.rb#L3110

The XML file is loading so I have bypassed the reading of Browse.Rpt by switching the bReadAuxEnergyHeating flag to false. The simulations are successful now.

Sounds like there were two are separate issues.

please-wait commented 5 years ago

Reading the latest general-dev changes at https://github.com/NRCan-IETS-CE-O-HBC/HTAP/commit/87a6f9f481da421f8613f5e332e03a6963bfdb92, although I haven't tested it, both issues seem to be addressed. Closing this for now.