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

[OpenFOAM.org] Compile OpenFOAM 2.4 on amazon cws

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Rojj

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2015, 18:38
Default Compile OpenFOAM 2.4 on amazon cws
  #1
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   September 21, 2015, 18:25
Default
  #3
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 12
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 10:19
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56


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