Simulation Wiki Tutorial - Running Simulations on the NEEShub using the Workspace
The goal of this tutorial is to demonstrate how to run OpenSees simulations on the NEEShub machines. This tutorial does not include how to use Batchsubmit. Please see the simulation wiki for more information about this topic. This tutorial is also available in video.
There are three main steps that you need to follow to run an OpenSees simulation at the NEEShub using the workspace:
- Upload your files to your directory at the NEEShub
- Run your simulation
- Download your output files back to your local computer for post-processing.
You will need access to the workspace. See the information to request access to the workspace (submit a ticket) if you do not have it already.
Some experience with OpenSees is preferred.
For this tutorial we are going to use a demo available at the OpenSees wiki. In particular, the Pushover analysis for 2-story moment frame (without panel zones). Download the zip file and un-zip it on your computer to follow this tutorial. You can also use any other OpenSees simulation file that you might have available.
Step 1 – Upload files to the NEEShub
The first step will be to upload your .tcl files to your Home Directory on the NEEShub. Each NEEShub user is allocated a 1GB Home Directory in a Unix/Linux environment. This directory is private and can only be accessed by the NEEShub user to which it belongs. The easiest way to transfer files from/to the Home Directory is to use synchroNEES. This is a NEEShub tool that you will have to download and install on your personal computer. DO NOT use the download button at the top of the page. Instead, scroll down to the Abstract and use the use the Downloads link to locate the version of synchroNEES that is appropriate for your OS.
After installing synchroNEES, launch it and enter your NEEShub username and password. You will see something similar to the following figure showing the your home directory (My NEEShub Files), the scratch space, and the various groups to which you belong:
In this tutorial we will upload your simulation files to your home directory (My NEEShub files). This corresponds to your Unix home. If you are running large simulations and your input files require more space than is currently available in your home directory, please log a support ticket and NEEShub will assist you.
After opening the home directory you should be able to see the list of files and sub-directories contained in the home directory, similar to the following figure.
It is good practice to upload your .tcl files into their own sub-directory within the home directory. If you should use batchsubmit to run your simulation at a later date, the batchsubmit command will copy the entire directory in which the .tcl files reside to the output folder that gets created in the scratch space. Having your .tcl files in the home directory may result in the copying of many unnecessary files.
You can create a new sub-directory by using the right button on your mouse (windows) and selecting the option to create a new directory. It is important that you do not have a directory highlighted when you right-click. If you do highlight a directory and right click, you will only have the option to make a “New Folder Within,” which will make a new sub-directory inside of the directory you currently have highlighted.
In this tutorial I am going go call that directory “pushover”.Important: Unix is case sensitive. That means that “pushover” is different than “Pushover”.
The next step is to locate the files for your simulation on your local machine. Press “My files” on the right top of synchroNEES to see your local files. This will split the window in two. The top part contains the files on your local computer and the bottom part contains the files in your home directory on the NEEShub. Locate your the input files for your simulation on your local computer and drag and drop them into the appropriate sub-directory within your home directory on the NEEShub.
Step 2 – Run your simulation
Now that your files have been uploaded to your NEEShub home directory, you are ready to run the simulation. For this you will need to launch the workspace.
Important: You can leave your workspace “open” by simply closing your web browser or by clicking the “keep for later” button in the upper right corner of the tool window. The next time you log into the NEEshub, you can retrieve your workspace by going to “My NEEShub” and looking at the sessions that are running.
Your screen should show a Unix shell similar to the one shown in the following figure
Some basic Unix commands that you can use in the workspace can be found here. Before we can run the simulation we will need to change the current directory to the place where the files were uploaded. This can be done by using the “cd” (change directory) command:
To see the files in this directory you can use the “dir” or the “ls” command.
Now that we are at the correct directory we can run the openSees simulation. The name of the tcl file that we want to run is “pushover_concentrated.tcl” so we type:
A new window should show showing you the different plots that this simulation performs.
After the simulation finishes, type the “ls” command. You should see a new sub-directory called “Concentrated-Pushover-Output” within your pushover directory. You can change to this directory by typing:
and list the files in this directory by typing:
Step 3 – Download simulation results to your local computer
We will use synchroNEES to download the results from the simulation. You might need to close your “/home/neeshub” tab in synchroNEES and opening it again to refresh the content of the files at the NEEShub. SynchroNEES should show the sub-directory with the output files. You can drag and drop the entire output directory to your local computer or you can open the output directory and drag and drop the the individual output files to your local computer. Remember that your local files are available in the “My files” tab on the top right of the synchroNEES window.