CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

OpenFOAM on Amazon EC2

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes

LinkBack Thread Tools Display Modes
Old   August 27, 2013, 06:21
New Member
Paul Lynch
Join Date: Aug 2013
Posts: 3
Rep Power: 5
pmlynch is on a distinguished road
Hi All

Sorry to bump an old thread, but has any further progress been made on developing AMIs for the EC2 cluster compute instances?

I'm particularly interested in testing an AMI for OpenFoam-ext 1.6, ideally in the EU west region.

cloudFlu looks interesting, but we may have QA issues with switching to OF 1.7.
pmlynch is offline   Reply With Quote

Old   June 28, 2014, 17:04
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 537
Rep Power: 17
philippose will become famous soon enough
Hello everyone,
Good Evening!

I didnt want to start a new thread because this topic already existed....

Last week I put together a CentOS 6.5 64-bit AMI with the intention of running OpenFOAM (specifically foam-extend-3.1) on Amazon EC2. The
basic setup is as follows:

1. I started with the official CentOS 6.5 64-bit AMI available on the Amazon servers which contains a minimal installation of CentOS 6.5

2. Updated the installation and installed the developer tools, libraries and dependencies required to compile foam-extend-3.1 and the Thirdparty libraries.... everything except Qt and Paraview since my intention was to create a text-based interface.

3. Then, I created a new EBS (Elastic Block Store) Volume and attached it to the Installation in [2]

4. In then split up this volume into two partitions, one which is mounted into "/opt/Simulation" and the other which gets mounted as "/home", in order to separate the User home directories from the base installation.

5. Now, in "/opt/Simulation", I created a folder called "site" in which I created a file called "sim_settings" to act as the main interface to the entire Simulation software installation.

6. In order to separate the whole Simulation setup from the base installation, I created a file in "/etc/profile.d" (which gets called automatically each time a terminal is opened) which simply calls the "sim_settings" file in [5].

7. In "/opt/Simulation", I created a folder "OpenFOAM" under which a new folder "foam-extend-3.1" was created containing a clone of the foam-extend-3.1 git repo. I then compiled foam-extend-3.1 and all the Thirdparty software (except for Qt and Paraview since my intention was to create a text interface).

8. Once all this was done, I unmounted and detached the additional EBS volume created for the simulation setup, and created a new AMI of the base installation of CentOS 6.5 with the modifications required to mount and call the simulation setup (if available... if not, it runs as a normal CentOS installation without the simulation stuff).

9. Finally I made a snapshot of the EBS Volume which now contains a fully compiled and working copy of foam-extend-3.1 and the Thirdparty utilities along with the scripts needed to source them all bundled into a single script called "sim_settings" which is called from "/etc/profile.d".

So basically, I ended up with one AMI (and the corresponding snapshot) of a modified CentOS 6.5 x86_64 installation, and one snapshot of an EBS Volume containing OpenFOAM and its dependencies.

In order to run the whole system, I need to launch an instance of the AMI after attaching the EBS volume snapshot to it.

What do you think of this workflow / concept for running OpenFOAM on Amazon EC2? Do you think this method of splitting the two parts is advantageous and eases maintenance? For example, such an approach could be used for testing, or maintaining multiple simulation setups, etc....

What other ideas have you all thought of and implemented for getting OpenFOAM up and running on Amazon EC2 keeping in mind a modular approach?

I would be interested to get some feedback :-) If anyone is interested in this AMI / EBS Volume, maybe there is some way of sharing it on Amazon (I am a complete newbie with regards to Amazon EC2..... :-)!)

Have a great day ahead!


(P.S.... Most of the setup was done using a t1.micro instance type, except for the actual compilation... for which I switched to a c3.2xlarge which is an 8 core system with 15GB RAM using a Spot Instance for 8,5 cents/hour...)
wyldckat likes this.
philippose is offline   Reply With Quote

Old   October 5, 2016, 09:21
Senior Member
Join Date: Mar 2015
Posts: 210
Rep Power: 4
KateEisenhower is on a distinguished road
Hello Philippose,

thank you for sharing this information.
I don't really understand what you want to achieve with the modular setup. Can you explain it in more detail? For example, how would such an approach ease maintenance?

Currently, I am also setting up a custom OpenFOAM AMI (still struggling) and I will share my experience here once it is done.

Any other experiences with OpenFOAM on EC2?

Best regards,


@Paul: I got the impression the active development for cloudFlu has ceased some time ago, correct me if I'm wrong.

@all: I think the number one reason I am still struggling with ec2 is, that I am missunderstanding the whole concept:
1) Right now, I am installing OpenFOAM on a publicly available AMI
2) Then I plan to create an image from this running instance. This is then my custome AMI which contains OpenFOAM
3) Suppose I run my custom AMI and make a few simulations. How can I accomplish not to loose my simulation data when I am shutting down my instance? Do I even have to consider this problem since my custom AMI is EBS-backed?
4) Or do I have to create a new image from my running instance before every shutdown in order to not loose my simulation data?

I have many more questions, but the above one troubles me the most.

Last edited by KateEisenhower; October 5, 2016 at 09:49. Reason: Addition
KateEisenhower is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM on Amazon Elastic Compute Cloud (Amazon EC2) piina OpenFOAM Running, Solving & CFD 14 November 11, 2015 14:17
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25

All times are GMT -4. The time now is 11:57.