I have compiled OpenSees source code version 3.0.0 (github-link) on UBUNTU 18.04.2 LTS operating system using the procedure, provided by Mr. Farbood Panahi. Following are the detailed step-by-step instructions I followed for compiling this source code,
- Dependency Check - Type the following commands in terminal to check whether the following prerequsites are installed, if not installed the command will automatically execute installing the softwares
sudo apt-get install make
sudo apt-get install tcl8.6
sudo apt-get install tcl8.6-dev
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install gfortran
sudo apt-get install python3-dev
- Download the latest release version of the source code from the link. In this post, I have compiled the release version 3.0.0 . (
.tar.gzany one is fine.)
- Create two folders with names bin and lib in the Home directory. This Home is not necessarily the UBUNTU home directory, you can set any directory as Home directory for OPS. However, you have to specify the path for this Home directory in line-91 of make file, which will be discussed in Step. 6.2.
- Extract the downloaded OPS
.tar.gzin the Home direcotry discussed in Step. 3 and rename it to OpenSees (O and S are capital letter - directory name is case-sensitive).
- Goto MAKES folder inside the OpenSees directory and open the file Makefile.def.EC2-UBUNTU.
- Change the following lines and save the file,
- Line-90 -
/usr/local(i.e. just remove the dot)
- Line-91 -
/home/vijay(i.e. just remove the dot and add your computer login-name, all small letters), if you are compiling in the Ubuntu Home. (or)
/home/vijay/Desktop/OPS_Compile(example path for HOME = If you have created the folder elsewhere). Check - In this folder there will be three sub-folders bin, lib and OpenSees
- Line-90 -
- Open the Terminal from the OpenSees folder and type the command
cp ./MAKES/Makefile.def.EC2-UBUNTU ./Makefile.defand then type the command
make. Wait untill the compilation is over (it took roughly about 15-20 minutes in my computer).
- After the compilation finished, go to the bin folder (i.e. created in step 3). You will find a file named
- Open the Terminal in bin and type
OpenSees, thats all OPS will load and you can input any
tclfile to it. Also you can copy this OpenSees file to whatever the directory you want.
An example showing, running the
Truss.tcl(link) is as follows, (Just Hit the Enter, you will get the response of truss)
Subscribe and download our best stuff (for free) on OpenSees (Tcl and Python), Visual Studio (C++), Matlab, Finite Element Analysis and several other topicsSubscribe...