CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Installation

Compile OpenFOAM 2.4 on amazon cws

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

Like Tree1Likes
  • 1 Post By Rojj

Reply
 
LinkBack Thread Tools Display Modes
Old   September 20, 2015, 18:38
Default Compile OpenFOAM 2.4 on amazon aws
  #1
New Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 10
Rep Power: 4
Rojj is on a distinguished road
Hi,

I am trying to build OF 2.4 on a amazon EC2 instance. I have launched the compilation yesterday morning and after more than 20 hours it has not completed yet. Is this normal?

The reason I am building OF myself is that with the packaged version I could not install swak4foam because of dependencies issues.

The instance is a t2.micro with 1GB of RAM. I guess this is not much, but one day? And of course it's free.

Could you recommend a minimum spec for the instance?

Thanks

Last edited by Rojj; September 20, 2015 at 21:32.
Rojj is offline   Reply With Quote

Old   September 21, 2015, 14:26
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,215
Blog Entries: 35
Rep Power: 94
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Rojj,

Well, I don't have experience with AWS, but here's what I know about the requirements for building OpenFOAM from source code:
  • If I remember correctly, the minimum memory needed is somewhere around 1.2 GiB of RAM for building with a single core and it will possibly go into swap. This is due to the final linking step needed for a lot of the libraries will take this much memory to load up a ton of objects and linking them into the final binary of each library.
  • Building with 4 cores, it needs around 2.0-2.4 GiB and it might still go into swap.
  • Building with 6 cores can be done with 3.0 GiB, although it might go a little into swap.
Note: GiB = 1024*1024*1024 Byte


The AWS description isn't very clear about the CPU power made available... oh wait, here we go:
Quote:
Originally Posted by http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html
One CPU credit is equal to one vCPU running at 100% utilization for one minute. Other combinations of vCPUs, utilization, and time are also equal one CPU credit, such as one vCPU running at 50% utilization for two minutes, or two vCPUs (on t2.medium and t2.large instances, for example) running at 25% utilization for two minutes.
Which means that since the t2.micro only has 6 CPU credits/hour and you're running at full power during each hour, this equates to the vCPU only running at 10% capacity, which they state are 3.3GHz CPUs, therefore the vCPU is running at 330MHz in practice.
For comparison with some old numbers I have: Build times for OpenFOAM 2.0.x code with Ubuntu 10.10 with its gcc 4.4.5 - it took my machine 2h24m with with a single core at 2.8GHz, to build OpenFOAM 2.0.x. Therefore, in theory, the t2.micro instance may take somewhere between 24h and 30h, if we take into account the possibility that the more recent GCC and OpenFOAM versions take a while longer to build.
In addition, if the instance has memory swap beyond RAM, then things will get even slower.

Either way, you might want to double check if the instance hasn't stalled in the build, i.e. check if the Allwmake script is still outputting new stuff once in a while.

Best regards,
Bruno
__________________
___
I'll be at OFW11 in Portugal
wyldckat is offline   Reply With Quote

Old   September 21, 2015, 18:25
Default
  #3
New Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 10
Rep Power: 4
Rojj is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Therefore, in theory, the t2.micro instance may take somewhere between 24h and 30hTherefore, in theory, the t2.micro instance may take somewhere between 24h and 30h
Hi Bruno,

Thanks for the detailed answer. You were spot on! It took around 27 hours!

Now it's working fine and I managed to install swak4foam and pyfoam and it's working fine.

Thanks again
Ruggiero
styleworker likes this.
Rojj is offline   Reply With Quote

Reply

Tags
amazon, aws, openfoam 2.4, swak4foam

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
Mac-patch for OpenFOAM 2.4 gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 9 September 23, 2015 14:43
OpenFoam 2.1.1 not completely works in Debian jessie keepfit OpenFOAM Installation 1 July 18, 2015 17:46
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
How to compile OpenFOAM from scratch bashrc and cshrc danieltourde OpenFOAM Installation 2 December 15, 2006 10:30


All times are GMT -4. The time now is 15:29.