Child pages
  • Mox_OpenSees
Skip to end of metadata
Go to start of metadata

Building OpenSees

Below are the steps to build OpenSees. Here xyz is your group name and abc is your hyak userid.

(1) Run below command to get a build node:

srun -p build --time=4:00:00 --mem=10G --pty /bin/bash

(2) mkdir /gscratch/xyz/abc/opensees

(3) cd /gscratch/xyz/abc/opensees

(4) mkdir lib

(5) mkdir bin

(6) git clone https://github.com/OpenSees/OpenSees

(7) cd OpenSees

(8) cd MAKES

(9) cp Makefile.def.EC2-REDHAT-ENTERPRISE ../Makefile.def

(10) cd ..

(11) export HOME=/gscratch/xyz/abc/opensees

(12) pwd (verify that you are in the directory /gscratch/xyz/abc/opensees/OpenSees)

(13) Now make below changes to the file Makefile.def :

(a) Delete -Wl option in below line in Makefile.def
LINKFLAGS = -rdynamic -Wl
After the the change, the line should look like below:
LINKFLAGS = -rdynamic

(b) Fix a typo. Change the libCBlas.a on the right hand side of this line to libCSparse.a .
CSPARSE_LIBRARY = $(HOME)/lib/libCBlas.a

After the the change, the line should look like below:
CSPARSE_LIBRARY = $(HOME)/lib/libCSparse.a

(14) Run below command to build the OpenSees executable. This command will take some time.

make

(15) After the make ends, the OpenSees executable will be in /gscratch/xyz/abc/opensees/bin

(16) cd /gscratch/xyz/abc/opensees/bin

(17) Run below command to get the OpenSees command prompt:
./OpenSees


OpenSees -- Open System For Earthquake Engineering Simulation
Pacific Earthquake Engineering Research Center
Version 3.0.3 32-Bit

(c) Copyright 1999-2016 The Regents of the University of California
All Rights Reserved
(Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)


OpenSees >

(18) Enter quit to leave the OpenSees command prompt.
OpenSees > quit

(19) Change HOME back to your home directory. Below abc is your userid.
export HOME=/usr/lusers/abc

(20) Optional: Use below command to put the OpenSees executable in your PATH
export PATH=/gscratch/xyz/abc/opensees/bin:$PATH


Using OpenSees

Below is an example of running OpenSees on mox. You should change the path for the ExampleScripts directory appropriately.

(a) cd /gscratch/xyz/abc/openseesdir/OpenSees/EXAMPLES/ExampleScripts

(b) /sw/contrib/opensees/OpenSees

(c) After running the above OpenSees command, you will see the OpenSees prompt

(d) Issue the command below at the OpenSees prompt

     source Example1.1.tcl

(e) Below is the output of steps (a) to (d)


OpenSees -- Open System For Earthquake Engineering Simulation
Pacific Earthquake Engineering Research Center
Version 3.0.3 32-Bit

(c) Copyright 1999-2016 The Regents of the University of California
All Rights Reserved
(Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)


OpenSees > source Example1.1.tcl

Node: 4
Coordinates : 72 96
Disps: 0.530093 -0.177894
Velocities : 0 0
unbalanced Load: 100 -50
ID : 0 1

Element: 1 type: Truss iNode: 1 jNode: 4 Area: 10 Mass/Length: 0 cMass: 0
strain: 0.00146451 axial load: 43.9352
unbalanced load: -26.3611 -35.1482 26.3611 35.1482
Material:
Element: 2 type: Truss iNode: 2 jNode: 4 Area: 5 Mass/Length: 0 cMass: 0
strain: -0.00383642 axial load: -57.5463
unbalanced load: -34.5278 46.0371 34.5278 -46.0371
Material:
Element: 3 type: TrussSection iNode: 3 jNode: 4 Mass density/length: 0 cMass: 0
strain: -0.00368743 axial load: -55.3114
unbalanced load: 55.3114 55.3114 -55.3114 -55.3114
Section:

Node: 4
Coordinates : 72 96
Disps: 0.530093 -0.177894
Velocities : 0 0
unbalanced Load: 100 -50
ID : 0 1


CorotTruss, tag: 1
Connected Nodes: 1 4
Section Area: 10
Undeformed Length: 120
Current Length: 120.177
Mass Density/Length: 0
Consistent Mass: 0
Rotation matrix:
Axial Force: 44.2283
UniaxialMaterial, tag: 1

CorotTruss, tag: 2
Connected Nodes: 2 4
Section Area: 5
Undeformed Length: 120
Current Length: 119.54
Mass Density/Length: 0
Consistent Mass: 0
Rotation matrix:
Axial Force: -57.4937
UniaxialMaterial, tag: 1

CorotTrussSection, tag: 3
Connected Nodes: 3 4
Undeformed Length: 135.765
Current Length: 135.264
Mass Density/Length: 0
Consistent Mass: 0
Rotation matrix:
Section, tag: 1
OpenSees >

  • No labels