SimCenter Forum

Research in Natural Hazards Engineering => Regional Hazard Simulation (R2D, rWhale) => Topic started by: emongold on July 13, 2021, 07:34:29 PM

Title: Hazard Simulation Error exit code 1
Post by: emongold on July 13, 2021, 07:34:29 PM
When I try to run a hazard simulation very similar to the example one, I receive this hazard simulation script error with exit code 1 before anything runs. What does this exit code mean? Is there an issue with the inputs?
Title: Re: Hazard Simulation Error exit code 1
Post by: kuanshi on July 13, 2021, 09:23:09 PM
Hi emongold,

It seems that the hazard simulation script is not launched correctly... it would be appreciated if you'd like to share (1) one snapshot of the "Preferences" window (can be launched by clicking on "File"->"Preferences" in the top menu bar) and (2) the configuration file "EQHazardConfiguration.json" in the working directory ("C:\Users\emily\Documents\R2D\LocalWorkDir\HazardSimulation\Input")..  and I'm happy to help troubleshooting it.

Thanks,
Kuanshi
Title: Re: Hazard Simulation Error exit code 1
Post by: emongold on July 13, 2021, 09:53:03 PM
Here they are. Thank you Kuanshi!
Title: Re: Hazard Simulation Error exit code 1
Post by: kuanshi on July 13, 2021, 10:45:13 PM
Thanks for sharing them!  The configuration file looks fine, could you please make an extra check for me to see if the "SiteFile.csv" is generated correctly in the configured directory: "C:/Users/Emily/Documents/R2D/LocalWorkDir\\HazardSimulation\\GroundMotions\\Input"?

Thanks,
Kuanshi
Title: Re: Hazard Simulation Error exit code 1
Post by: emongold on July 13, 2021, 10:53:38 PM
I believe this file looks fine as well.
Title: Re: Hazard Simulation Error exit code 1
Post by: kuanshi on July 14, 2021, 12:52:53 AM
Thanks for sharing the file!  Yes, the bug was finally identified together to be caused by missing a Java install.  The problem is resolved by installing/configuring Java following the instruction on-screen instructions from the official website (https://java.com/en/download/).   

In the meantime, for uses who have any questions or trouble of installing Java and running the "Earthquake Scenario Simulation" tool, please feel free to get us back. More details can also be found here (https://nheri-simcenter.github.io/R2D-Documentation/common/user_manual/installation/desktop/installation.html).

Thanks,
Kuanshi
Title: Re: Hazard Simulation Error exit code 1
Post by: CCChen on May 17, 2023, 09:49:30 PM
Hello,

I have encountered similar error, but I have setup java JDK17 in my PC. Is there any requirement to the installation of java? For example, the folder directory of java, java version, etc.
Title: Re: Hazard Simulation Error exit code 1
Post by: fmk on May 18, 2023, 08:06:19 AM
can you attach the files Kuanshi mentioned before: "if you'd like to share (1) one snapshot of the "Preferences" window (can be launched by clicking on "File"->"Preferences" in the top menu bar) and (2) the configuration file "EQHazardConfiguration.json" in the working directory ("C:\Users\emily\Documents\R2D\LocalWorkDir\HazardSimulation\Input") "
thanks
Title: Re: Hazard Simulation Error exit code 1
Post by: CCChen on May 18, 2023, 07:19:49 PM
Hello fmk, thanks so much for your reply. I have solved this problem by changing the version of Java. Java version 8 recommended in the instruction from the official website works well for R2D. Thanks again for your advice!
Title: Re: Hazard Simulation Error exit code 1
Post by: ff22@uw.edu on May 25, 2023, 01:51:13 AM
Hello,

I am having a similar problem to the previous two users.
The output dialogue box says that my "output folder already exists" (see attached image).
I have tried deleting the 'Output' folder in the local jobs directory, but the same error message still appears.

I have already installed the latest version of Java 8 using the link provided in this thread.
I also ensured that python 3.9 is properly installed using the information from this link:
https://nheri-simcenter.github.io/R2D-Documentation/common/user_manual/installation/desktop/install_macOS.html#install-python-3-9

Additionally, the 'SiteFile.csv' is being properly generated.

Attached is 1) the snapshot of the Preferences window and 2) my "EQHazardConfiguration.json" file.

Thanks, Francisco

Title: Re: Hazard Simulation Error exit code 1
Post by: CCChen on May 25, 2023, 04:48:35 AM
Hello Francisco and fmk,

I also have problem of python, when switch R2D version2 to verision 3.
When I run following scenario simulation, it works in R2D version 2 but can't work in version3. I try to edit the version 3's perference of Python path to be the same as the default python path of version 2, and it works.

The attached file is the input files for version 3. I would really appreciate it if you have any suggestions for this problem.

Title: Re: Hazard Simulation Error exit code 1
Post by: kuanshi on May 25, 2023, 11:31:19 PM
Hi Francisco,

The problem might be caused by the python path in the preference dialog (it currently seems to be directed to anaconda's python instead of your x86 python3.9 install) - could please try to update that to your new python3.9's path to see if it could help resolve the issue.

Kuanshi