Author Topic: Running EE-UQ backend using Command Line or MATLAB  (Read 15055 times)

omarissa

  • Newbie
  • *
  • Posts: 3
    • View Profile
Running EE-UQ backend using Command Line or MATLAB
« on: March 31, 2021, 03:27:52 AM »
Good evening, all! Just wanted to ask for best practices if I would like to run EE-UQ within a MATLAB routine.

Based on previous posts, my understanding is that record selection must be done prior to running the backend (the PEER NGA record selection feature wouldn't be available), and the "Multiple PEER" option should be selected.

To run the full analysis, would I need to "loop" through each downloaded ground motion and run the EE-UQ workflow using a custom BIM.json file for each iteration?

I'm just brainstorming at this stage, so any input on (1) if my understanding on the implementation is correct and (2) the specific lines of code needed to run each analysis would be much appreciated.

Thank you!

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 233
    • View Profile
Re: Running EE-UQ backend using Command Line or MATLAB
« Reply #1 on: March 31, 2021, 11:08:10 PM »
the Event tab specifies the type of event application . the current event applications do one of two things:
1) go off and do the record selection and get the motions ready for when the backend runs
2) create/get the motions as part of the running backend.

just exactly do you want the Matlab function to do?

omarissa

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Running EE-UQ backend using Command Line or MATLAB
« Reply #2 on: April 01, 2021, 01:30:05 AM »
Thank you for the prompt response! I appreciate the input.

Essentially, I'd like to run through the entire EE-UQ workflow as I would in the application but have the ability to run a set of building simulations back-to-back and store the results locally (as opposed to re-running manually in the GUI).

In general, the only pieces of the workflow I'll be using are:
SIM - both user-specified OpenSees models and AutoSDA
EVT - a suite of PEER NGA records
FEM - an OpenSees analysis script
EDP - Standard Earthquake

The only parts of the workflow I will be varying across analyses are:

  • SIM: the building model
  • EVT: the scaling of the ground motions

So the MATLAB routine would ideally run each analysis and store the results locally.



fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 233
    • View Profile
Re: Running EE-UQ backend using Command Line or MATLAB
« Reply #3 on: April 01, 2021, 05:47:10 PM »
ok. I will update the doc to show people how. basically:

1) if you look in ~/Documents/EE-UQ/LocalWorkDir/tmp.SimCenter after you run from the GUI there are files dakota.out and dakotaTab.out containing the results and a directory templateDir .. the templatedir should have a file dakota.json.
2) dakota.json is the output of the UI when you hit run and it is the input file for the application femUQ.py that actually runs the workflow causing the 2 output files to be generated.
3) you start femUQ by invoking python (you possibly might have to start in same dir as the input file (dakota.json).
4) fewUQ.py takes some additional arguments. if you look in ~/Documents/EE-UQ there is a debug.log file and in there search for something like PYTHON COMMAND . this is how the frontend UI is invoking the backend application and it will show you these additional args.
5) that line will also show that we are adding stuff to the env variable, adding OpenSees, dakota, and possibly python to the env setting of the process that runs. you will have to add these to your env variables if you run from outside the UI.
 
my PYTHON COMMAND line looks like:

PYTHON COMMAND "source $HOME/.bash_profile; export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/fmckenna/release/EE-UQ/build/EE_UQ.app/Contents/MacOS/applications/opensees/bin:/Users/fmckenna/release/EE-UQ/build/EE_UQ.app/Contents/MacOS/applications/dakota/bin:$PATH; \"/Library/Frameworks/Python.framework/Versions/3.8/bin/python3\" \"/Users/fmckenna/release/EE-UQ/build/EE_UQ.app/Contents/MacOS/applications/Workflow/femUQ.py\" runningLocal \"/Users/fmckenna/Documents/EE-UQ/LocalWorkDir/tmp.SimCenter/templatedir/dakota.json\" \"/Users/fmckenna/release/EE-UQ/build/EE_UQ.app/Contents/MacOS/applications/Workflow/WorkflowApplications.json\""

when i run from the terminal i need to take off the \", basically this:

python3 /Users/fmckenna/release/EE-UQ/build/EE_UQ.app/Contents/MacOS/applications/Workflow/femUQ.py runningLocal   /Users/fmckenna/Documents/EE-UQ/LocalWorkDir/tmp.SimCenter/templatedir/dakota.json
/Users/fmckenna/release/EEUQ/build/EE_UQ.app/Contents/MacOS/applications/Workflow/WorkflowApplications.json

so python3 <path to femUQ.py> runningLocal <path to input file> <path to WorkflowApplications.json>