Amazon Web Services (AWS) provides a wide range of products for high performance computing with OpenSees, generally at a much lower cost than running the analyses on local machines or clusters. We have developed an Amazon Machine Image (AMI) that runs OpenSeesPy and OpenSeesMP with no additional compilation or installation required. Python, Tcl, and MPI are included with every OpenSees AMI.
Computing with EC2
An EC2 instance, or virtual server, is required to run OpenSees on AWS. Every EC2 instance has a unique combination of virtual CPUs (vCPUs) and gigabytes (GiB) of memory (RAM). We provide OpenSees AMIs for the T3, M5, and C5 instance series.
AWS sets hourly rates for EC2 instances. Within each instance series, hourly rates scale linearly with the amount of RAM.
T3 Instance Series
The T3 series offers low-cost, base level resources for the sequential and parallel analysis of small to moderate OpenSees models. The series ranges from
t3.nano with 2 vCPUs and 0.5 GiB RAM to
t3.2xlarge with 8 vCPUs and 32 GiB RAM.
M5 Instance Series
The M5 series offers balanced computing resources for the sequential and parallel analysis of large OpenSees models. The series ranges from
m5.large with 2 vCPUs and 8 GiB RAM to
m5.metal with 96 vCPUs and 384 GiB RAM.
C5 Instance Series
The C5 series offers compute optimized resources for parametric or “embarrassingly parallel” analysis of small to moderate OpenSees models. Compared to the M5 series, C5 instances offer a higher vCPU-to-RAM ratio. The C5 series ranges from
c5.large with 2 vCPUs and 4 GiB RAM to
c5.metal with 96 vCPUs and 192 GiB RAM.
AWS Region Availability
The OpenSees AMI is available in all AWS regions except for the following:
OpenSees AMI Pricing
For EC2 instances that use the OpenSees AMI, we add approximately 20% to the instance’s base hourly rate, or EC2 infrastructure cost. For example, an EC2 instance with base rate $0.080/hour will cost an additional $0.016/hour when paired with the OpenSees AMI, making the total rate $0.096/hour.
Fixed annual rates for pairing an EC2 instance with the OpenSees AMI are available for savings of up to 54% compared to equivalent hourly OpenSees AMI rates. For example, the OpenSees AMI annual rate for an EC2 instance with base rate $0.080/hour will be approximately $64/year ($0.016/hour * 24 hours/day * 365 days = $140.16, discounted by 54% to reach $64/year). Note that for annual rates, AWS continues to charge its base EC2 infrastructure hourly rate. Therefore, the annual cost of this example OpenSees AMI will be $64 plus $0.080 for every hour used.
Although base EC2 instance rates vary among AWS regions, the additional OpenSees AMI hourly/annual rates are uniform across all regions.
You will see the final rate before you launch your instance.
Steps to Run OpenSees on AWS
Launch an EC2 instance with the OpenSees AMI in three easy steps.
1. Register an AWS Account
If you do not already have an account on AWS, sign up for a free basic account. Note that registration requires a credit card, even for free tier usage.
2. Launch an Instance of OpenSees AMI
Select an EC2 Instance
- Login to the AWS EC2 Console.
- Select a nearby region (see drop-down menu, top right of the panel).
- Select Instances from the left menu.
- Click Launch Instance.
- Select AWS Marketplace; type
OpenSeesin Search and hit Enter.
- Select the OpenSees Virtual Machine product.
- A panel appears showing pricing of OpenSees AMI instances. Click Continue.
- Select your preferred Instance Type from the table, e.g.
- Click Review and Launch.
Modify Storage and Security
These steps are optional; however, you should allocate more than the default storage if you expect a large amount of OpenSees analysis output.
Launch the Instance
- Back in Review Instance Launch, Click Launch.
- A panel appears with Select an existing key pair or create a new key pair.
- If you have previously created a key pair and wish to use it, select the key pair.
- Otherwise select Create a new key pair, enter a name (suggestion:
awskey) and click Create.
- Save the private key file, e.g.
awskey.pem, which is downloaded by your browser. Keep the file in a safe location.
- Click Launch Instances.
Further information on creating and managing Amazon EC2 key pairs.
Check Instance Status
The EC2 Management Console shows the status of all your EC2 instances, e.g.,
To view details for a particular instance:
- Click on the instance ID, e.g.,
- Note the Public iPv4 address for the instance, e.g.,
- View other instance details
3. Run an OpenSees Analysis
After an instance is launched, you can connect to the instance using SSH (Secure Shell) from the command line or using the OpenSSH client. Login with the
ec2-user username using the public iPv4 address shown in your instance details.
[localhost]$ ssh -i ~/.ssh/awskey.pem firstname.lastname@example.org
After connecting, you will see a prompt with the
ec2-user username and the Private IP DNS name for this instance (viewable in the instance details in the EC2 Management Console).
In addition to Python, Tcl, and MPI, every instance of OpenSees AMI is pre-loaded with example scripts to get you started. View the
README file in the instance’s home directory for information available in the
[ec2-user@ip-121-54-6-87 ~]$ cd examples
Single Processor Analyses
To run a single processor OpenSeesPy analysis, e.g., the
[ec2-user@ip-121-54-6-87 ~/examples]$ python3 beam.py
To run a single processor OpenSees (Tcl) analysis, e.g., the
[ec2-user@ip-121-54-6-87 ~/examples]$ OpenSees.exe Example1.1.tcl
Note: In version 18.104.22.168 of the OpenSees AMI, the OpenSees (Tcl) executable is named
OpenSees.exe. In future OpenSees AMI versions, the OpenSees executable will be accessible using either
Multiple Processor Analyses
To run a multi-processor OpenSeesPy analysis, e.g., the
triParallel.py script using 4 processors
[ec2-user@ip-121-54-6-87 ~/examples]$ mpiexec -np 4 python3 triParallel.py
To run a multi-processor OpenSeesMP (Tcl) analysis, e.g., the
triParallelMP.tcl script using 4 processors
[ec2-user@ip-121-54-6-87 ~/examples]$ mpiexec -np 4 OpenSees.exe triParallelMP.tcl
Note: In version 22.214.171.124 of the OpenSees AMI, the OpenSeesMP (Tcl) executable is named
OpenSees.exe. In future OpenSees AMI versions, the OpenSeesMP executable will be accessible using either
Transfer Files Using Secure Copy
You can use Secure Copy (SCP) to transfer OpenSees analysis scripts developed on your local machine to your OpenSees AMI instance and transfer analysis output from OpenSees AMI instance to your local machine.
Secure Copy your analysis script to your OpenSees AMI instance.
[localhost]$ scp -i ~/.ssh/awskey.pem myScript.py email@example.com:~/
Connect to your OpenSeesAMI instance and run your analysis script.
Then Secure Copy the output file generated by your analysis script back to your local machine.
[localhost]$ scp -i ~/.ssh/awskey.pem firstname.lastname@example.org:~/results.out .
SCP can transfer directories using the
-rp option and can transfer multiple files using wild card matching, e.g.,
Technical support is offered for issues encountered while launching an OpenSees AMI.
Send an e-mail to support (at) portwooddigital.com
No support for OpenSees modeling issues.
Refunds are not available. When not in use, use the EC2 Management Console to stop your OpenSees AMI instances so that you do not accrue additional hourly charges.