I was wondering if at the moment it is possible to run OpenSeespy as in OpenSeesSP (parallel processing without user defined partitions).
Then, I found the presentation by Dr. Minjie,
https://www.youtube.com/watch?v=vjGm2kM5Ihc
I followed the examples provided in the presentation. In particular, I am using Ubuntu. In the case of example, with auto partitioning approach, I am getting the error below. Yet this does not happen in the case of user defined partitioning approach. I would appreciate if you have any ideas with regards to this problem. Thank you
Code: Select all
mpiexec -np 2 python parallel_truss_sp.py
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= PID 43838 RUNNING AT volkan-GL702VMK
= EXIT CODE: 139
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
python3.8 crashed with SIGSEGV in METIS_PartMeshNodal()
The code inside parallel_truss_sp.py can be found here:
Code: Select all
import openseespy.opensees as ops
# truss model
# 8 nodes and 13 elements
# 6 8 7
# -----------
# /|\ | /|\
# / | \ | / | \
# / | \ | / | \
# / | \|/ | \
# -------------------
# 1 2 3 4 5
auto_partition = True
pid = ops.getPID()
np = ops.getNP()
if np != 2:
exit()
ops.model('basic', '-ndm', 2, '-ndf', 2)
ops.uniaxialMaterial('Elastic', 1, 3000.0)
if auto_partition:
ops.node(1, 0.0, 0.0)
ops.node(2, 72.0, 0.0)
ops.node(3, 144.0, 0.0)
ops.node(6, 72.0, 96.0)
ops.node(8, 144.0, 96.0)
ops.fix(1, 1, 1)
ops.element('Truss', 1, 1, 6, 10.0, 1)
ops.element('Truss', 2, 1, 2, 10.0, 1)
ops.element('Truss', 3, 2, 6, 10.0, 1)
ops.element('Truss', 4, 2, 3, 10.0, 1)
ops.element('Truss', 5, 3, 6, 10.0, 1)
ops.element('Truss', 6, 3, 8, 10.0, 1)
ops.element('Truss', 12, 6, 8, 10.0, 1)
ops.node(4, 216.0, 0.0)
ops.node(5, 288.0, 0.0)
ops.node(7, 216.0, 96.0)
ops.fix(5, 1, 1)
ops.element('Truss', 7, 3, 7, 5.0, 1)
ops.element('Truss', 8, 4, 7, 5.0, 1)
ops.element('Truss', 9, 5, 7, 5.0, 1)
ops.element('Truss', 10, 3, 4, 5.0, 1)
ops.element('Truss', 11, 4, 5, 5.0, 1)
ops.element('Truss', 13, 7, 8, 5.0, 1)
ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(7, 100.0, 0.0)
ops.partition()
else: # User defined partitioning
if pid ==0:
ops.node(1, 0.0, 0.0)
ops.node(2, 72.0, 0.0)
ops.node(3, 144.0, 0.0)
ops.node(6, 72.0, 96.0)
ops.node(8, 144.0, 96.0)
ops.fix(1, 1, 1)
ops.element('Truss', 1, 1, 6, 10.0, 1)
ops.element('Truss', 2, 1, 2, 10.0, 1)
ops.element('Truss', 3, 2, 6, 10.0, 1)
ops.element('Truss', 4, 2, 3, 10.0, 1)
ops.element('Truss', 5, 3, 6, 10.0, 1)
ops.element('Truss', 6, 3, 8, 10.0, 1)
ops.element('Truss', 12, 6, 8, 10.0, 1)
# common nodes (This is necessary!)
if pid ==1 or np == 1:
if pid == 1:
ops.node(3, 144.0, 0.0)
ops.node(8, 144.0, 96.0)
ops.node(4, 216.0, 0.0)
ops.node(5, 288.0, 0.0)
ops.node(7, 216.0, 96.0)
ops.fix(5, 1, 1)
ops.element('Truss', 7, 3, 7, 5.0, 1)
ops.element('Truss', 8, 4, 7, 5.0, 1)
ops.element('Truss', 9, 5, 7, 5.0, 1)
ops.element('Truss', 10, 3, 4, 5.0, 1)
ops.element('Truss', 11, 4, 5, 5.0, 1)
ops.element('Truss', 13, 7, 8, 5.0, 1)
ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(7, 100.0, 0.0)
if pid == 0:
print('Partition 0')
print('nodes =', ops.getNodeTags())
print('eles =', ops.getEleTags())
ops.barrier()
if pid == 1:
print('Partition 1')
print('nodes =', ops.getNodeTags())
print('eles =', ops.getEleTags())
ops.constraints('Transformation')
ops.numberer('ParallelRCM')
ops.system('Mumps')
ops.test('NormDispIncr', 1e-6, 6, 0)
ops.algorithm('Newton')
ops.integrator('LoadControl', 0.1)
ops.analysis('Static')
ops.analyze(10)
print('Node 8: ', [ops.nodeCoord(8), ops.nodeDisp(8)])