Question about running multiple motions by a separate tcl script
Re: Question about running multiple motions by a separate tcl script
Dear STKO Team,
As the last posting was a quite long time ago,
it's not easy for you to follow my request.
Attached is that I made the slope model with the Lysmer dashpot using STKO (i.e., not manually generate it).
Could you help me create the parallel job as described below?
what I want to achieve:
one slope model is partitioned into 4 cores and then this model will be subjected to 4 ground motions in parallel.
Thanks!
Youngkyu
As the last posting was a quite long time ago,
it's not easy for you to follow my request.
Attached is that I made the slope model with the Lysmer dashpot using STKO (i.e., not manually generate it).
Could you help me create the parallel job as described below?
what I want to achieve:
one slope model is partitioned into 4 cores and then this model will be subjected to 4 ground motions in parallel.
Thanks!
Youngkyu
- Attachments
-
- GroundMotionSets.zip
- (197.55 KiB) Downloaded 125 times
-
- Model5_PIMY_9_4_upElem.zip
- (267.66 KiB) Downloaded 137 times
Re: Question about running multiple motions by a separate tcl script
This is very easy to be done with the PythonAPI in STKO.
If you don't know how to use it, please first have a look at this webinar: #20 Intro to STKO v2.0's Python API
Note: I'm using the latest version of STKO (3.1.0) and the latest version of the OpenSees-Solvers from prof. Tarque's webisite
Here's the python script: Download it and unzip it into whatever folder you want. I typically have my own folder for useful scripts.
Once you have it, you can add this folder into Script Explorer, and double-click on the file to open it: The output will be a collection of folders, with the same name found in the GroundMotionSets directory.
Inside each of them, STKO will write the TCL files and the output files from OpenSees.
WARNING: I've seen that you are accessing a file from a custom script. Now each OpenSees will run inside those sub-foders, so you may want to change the name of the file to match the real location of the file.
for example, if you file is in the parent-directory, you could use:
set channel [open "../nodeInfoSlope.dat" r]
Let us know if it works
If you don't know how to use it, please first have a look at this webinar: #20 Intro to STKO v2.0's Python API
Note: I'm using the latest version of STKO (3.1.0) and the latest version of the OpenSees-Solvers from prof. Tarque's webisite
Here's the python script: Download it and unzip it into whatever folder you want. I typically have my own folder for useful scripts.
Once you have it, you can add this folder into Script Explorer, and double-click on the file to open it: The output will be a collection of folders, with the same name found in the GroundMotionSets directory.
Inside each of them, STKO will write the TCL files and the output files from OpenSees.
WARNING: I've seen that you are accessing a file from a custom script. Now each OpenSees will run inside those sub-foders, so you may want to change the name of the file to match the real location of the file.
for example, if you file is in the parent-directory, you could use:
set channel [open "../nodeInfoSlope.dat" r]
Let us know if it works
- Attachments
-
- out.png (10.99 KiB) Viewed 1983 times
Re: Question about running multiple motions by a separate tcl script
Dear STKO team,
I really appreciate your help. That works well.
There are still a couple of questions regarding the same request.
First,
I wonder if I can install the PyMpc package through anaconda
because I am thinking of running the python script you made for me in the anaconda command line environment such as "python run_multiple_gm.py".
Second,
What I wanted to achieve is to run multiple ground motions in parallel without generating the same tcl files.
For instance,
it is only required to change the definitions.tcl part without generating the elements.tcl, nodes.tcl, materials.tcl, and analysis.tcl which are the common tcl files for other ground motions' analyses.
In other words, I do not want to waste my storage by creating the same tcl files in the separate directory.
(I understand your python script that changes the definition part and then launch the entire analysis for one ground motion and then it works in parallel.)
I know that I should edit your python script by myself to achieve what I want, however,
your help really saves my time.
Best Regards,
Youngkyu Cho
I really appreciate your help. That works well.
There are still a couple of questions regarding the same request.
First,
I wonder if I can install the PyMpc package through anaconda
because I am thinking of running the python script you made for me in the anaconda command line environment such as "python run_multiple_gm.py".
Second,
What I wanted to achieve is to run multiple ground motions in parallel without generating the same tcl files.
For instance,
it is only required to change the definitions.tcl part without generating the elements.tcl, nodes.tcl, materials.tcl, and analysis.tcl which are the common tcl files for other ground motions' analyses.
In other words, I do not want to waste my storage by creating the same tcl files in the separate directory.
(I understand your python script that changes the definition part and then launch the entire analysis for one ground motion and then it works in parallel.)
I know that I should edit your python script by myself to achieve what I want, however,
your help really saves my time.
Best Regards,
Youngkyu Cho
Re: Question about running multiple motions by a separate tcl script
No, you can't, because the PyMpc tools require and instance of STKO running, and it works with the Python interpreter inside STKO.First,
I wonder if I can install the PyMpc package through anaconda
because I am thinking of running the python script you made for me in the anaconda command line environment such as "python run_multiple_gm.py".
I would not worry about it, the disk space required by the tcl files is negligible compared to the disk space required by the output files.Second,
What I wanted to achieve is to run multiple ground motions in parallel without generating the same tcl files.
For instance,
it is only required to change the definitions.tcl part without generating the elements.tcl, nodes.tcl, materials.tcl, and analysis.tcl which are the common tcl files for other ground motions' analyses.
In other words, I do not want to waste my storage by creating the same tcl files in the separate directory.
Re: Question about running multiple motions by a separate tcl script
I understand how PyMpc works and agree with your opinion on the second.
Thanks for your help again!
Best,
Youngkyu
Thanks for your help again!
Best,
Youngkyu