CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Best OS for CFD (

jacopo.canton February 29, 2012 08:57

Best OS for CFD
Hi all
this may be a question that somebody else has already posed but i couldn't find anything about it.

What OS would you suggest for working with CFD?
i bet linux is the answer but in this case i'd ask what distro do you suggest


CapSizer February 29, 2012 14:57

This will depend on the software that you are using. Obviously, not all codes are available on all types of O/S. When it comes to Linux, you will often find that the software is only supported on one distribution, very often Ret Hat Enterprise. However, you can nearly always get it to work on other distros, although you may need to install a few extra libraries. These days, OpenFOAM is customized for Ubuntu, so you make your life a bit easier by sticking to that combination.

Something else that is worth checking is which compiler has been used. A given code vendor may have used a particularly good compiler on (say) Windows, but a less efficient one on Linux. In this particular case, if you use Linux, you will take a substantial performance hit. This is from personal experience.

jacopo.canton March 1, 2012 05:07

what about centOS then or Scientific Linux which should both be as similar as possible to red hat enterprise? has anyone had any experience with them?

i have been using openFoam and other software on both macOS X and Ubuntu (on the same laptop) and found a great difference of performance among the 2 OSs even though they were running on the exact same hardware, so the question of this thread would have wanted to be "what is the most performant distro?" or something like it ;) i didn't know the compilers used made so much difference on the performance of the software compiled (i kind of ignorantly thought they were pretty much all the same) would you be kind as to explain this issue to me please?


CapSizer March 1, 2012 07:23

I've certainly had very good success with both CentOS and Scientific Linux, and Fedora as well, all part of the same family. I've never bought RHEL!

Many years a go I tested a benchmark on a single PC (back in the day of single core CPU's). The benchmark consisted of a CFD code, written in Fortran. I compiled it with g77 on both Linux and Windows (dual-boot machine). The performance was nearly identical on the two platforms, and in fact, pretty much the same when running the windows binary under Linux with Wine. However, it was somewhat quicker when compiled with Waterloo Fortran under Windows.

Your experience with Mac OSX and Ubuntu is very interesting, and to me certainly a bit unexpected. Which one was quicker? Did you use the same compiler and optimisation switches? Did you check if there wasn't some background process taking up resources?

jacopo.canton March 1, 2012 08:01

I have been using macOSX for the past 3 years on a laptop and there has been a period when i used to have the laptop double booting with macOSX and Ubuntu (10.something).
The "benchmarks" consisted in a code written in Matlab (which i had installed on both OSs starting from the same precompiled surce) which used to make some simple math and reads in and out on txt files (but took a very long time as it had to calculate prime numbers up untill 100millions) and on macOS it took 165 times less than on Ubuntu!! both OSs running on the same machine and with no other processes in the background..

As for openFoam i haven't timed the performance properly but again, it looked slower on Ubuntu.

That is why (being a bit tired of macOS which has it's own directories organization, different from any other unix distro) i'd like to find out which linux distro is the most "performant" to switch to.
I too have to program a CFD code on fortran and i'll be using it for at least the next year or so which is why i don't want to start with a distro and discover that is crap and have to change to another one and so on and on ;)

CapSizer March 1, 2012 08:34

OK, well your example sounds quite strange! Matlab is a bit different though, because it doesn't compile code the same way as a C or Fortran compiler. Best suggestion I can make is that you should partition your disk so that you have two separate /boot and / partitions, and a single /home /opt and /usr/local That way you can boot two or more separate distro's (also easy to change) without messing around with your applications or data. Then benchmark a few distro's and let us know which one works best, although it would be surprising if there was a major difference. FWIW, I see that some SPEC benchmarks are now being compiled with the Open64 compiler, which could be a worthwhile alternative to GFortran.

jacopo.canton March 1, 2012 19:12

I found this which may be of some help:

All times are GMT -4. The time now is 05:02.