Anurag Upadhyay, Ph.D.
Parametric analysis requires running a large number of nonlinear time-history analyses with OpenSees. I have seen at-least two popular cases,
1. Structural Optimization
2. Fragility Analysis
There are parallel commands but to be able to use them you have to compile OpenSeesPy locally and need to install MPI on your machine. Compiling OpenSees locally is not easy, at-least on a Windows machine.
At least for parametric analysis, there is an alternative way with Python itself using this module.
“The concurrent.futures module provides a high-level interface for asynchronously executing callable.”
In simple words, you can launch multiple tasks using a simple and intuitive Python API call (command). Python is awesome!
There are two ways (subclasses) to perform multi-process using this module,
1 .ThreadPoolExecutor
This subclass uses multi-threading and we get a pool of threads for submitting the tasks. The tasks are assigned to multiple threads.
2.ProcessPoolExecutor
This subclass uses multi-processing and we get a pool of processors for submitting the tasks. The tasks are assigned to multiple processors.
Subscribe to get full access to the code
def Parallel_Analysis():
with ProcessPoolExecutor() as executor:
### submit all tasks
for parameter in parameter_list:
p = executor.submit(myParallelModel,parameter)