Author Topic: FEATURE: application for running backend directly  (Read 16938 times)

ACTbeta

  • Newbie
  • *
  • Posts: 2
    • View Profile
FEATURE: application for running backend directly
« on: February 26, 2020, 01:57:06 AM »
Having used the tool and understanding how it works, it would be nice to just edit the input file created and run it using a separate application to run the backend application directly locally or at design safe w/o going through the user interface.

Michael Valentine

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: FEATURE: application for running backend directly
« Reply #1 on: July 05, 2020, 12:47:55 AM »
Agreed. Having access to quoFEM at the command line would greatly help practitioners in commercial industries incorporate the application into their workflows.

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 233
    • View Profile
Re: FEATURE: application for running backend directly
« Reply #2 on: July 05, 2020, 01:53:22 AM »
this feature request is under development. We have a working prototype Will be include in next release.

adindar

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: FEATURE: application for running backend directly
« Reply #3 on: June 04, 2022, 08:59:39 PM »
I wonder whether any recent development happened or not about this request.

All the best.


Ahmet

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 233
    • View Profile
Re: FEATURE: application for running backend directly
« Reply #4 on: June 06, 2022, 06:52:11 PM »
1. We are updating the doc on this type of usage, here is a heads up if you want to try in out .. you can get back to me if you have issues (it will help me with the documentation, the other helper is an undergraduate student here at Berkeley). But the simplest way to get what you need is to run quoFEM locally once. In your Documents folder you will find a directory quoFEM and in that directory a file called debug.log. That file contains a line starting with PYTHON COMMAND: (mine looks like the following)

a. you need to create a folder in which quoFEM will run the input
b. in that folder, create a folder named templatedir
c. in templatedir, place all files that will be needed (including the input file for workflow .. we call it scInput.json if you are using the current quoFEM application)
d. from the terminal you need to issue a few commands (those commands will depend on where the application is installed and what your operating system is). I have modified the quoFEM application to when they run locally spit out these commands to the debug.log file (The debug.log file is located in your ~/Documents/quoFEM directory after you start the application and run a local run). Writing this I think I should also modify the application to pop up these commands in a dialog.

  The debug.log file contains in it a line with the words "PYTHON COMMAD" which you can search for. The following was in my debug.log file.


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

    From this line you can create a .bat file or a .sh file (depending on your operating system) .. that file splits up the command above into a number of line & removes the \" .. for example, I would create a run.sh file from the above with the following:

source $HOME/.bash_profile;
export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/fmckenna/release/quoFEM/build/quoFEM.app/Contents/MacOS/applications/opensees/bin:/Users/fmckenna/release/quoFEM/build/quoFEM.app/Contents/MacOS/applications/dakota/bin:$PATH;
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /Users/fmckenna/release/quoFEM/build/quoFEM.app/Contents/MacOS/applications/Workflow/qWHALE.py
 runningLocal /Users/fmckenna/Documents/quoFEM/LocalWorkDir/tmp.SimCenter/templatedir/scInput.json /Users/fmckenna/release/quoFEM/build/quoFEM.app/Contents/MacOS/applications/Workflow/WorkflowApplications.json


    This file I copy now to templatedir and run.

2.A second approach underway is creation of a jupyter notebook created that is an example of using the quoFEM backend that is being finished. It will be done by end September.