rjsa wrote:Just thought I could ask (and answer, if I can) some questions on Open FOAM, Paraview and the likes.
Right now I'm pretty confused on how many processors I should get going on an OF run. I have setup a 16 core AWS system for rush runs. I'm running OF with 16 processors and it seems blazing fast up until the end, when the calculation steps are done and it goes wrapping up. The last steps, before the mesh merging, take ages, a lot longer when compared to my MacBook Pro, which I run with 8 processors.
Should I stick to the basic concept of one OF processor per core? What's best?
TIA!
In general, hyperthreading with openFOAM doesnt gain you anything because the process is an iterative one and also that cells are solved relative to one another across their interfaces; so you require the solution to the current iteration/cell before you can start the next one.
Your sim speed at the end slowing down is most likely when your processors are starting to write the data stored in your RAM to your HDD. If your macbook has an SSD, you may find it to be faster at the end because of that.
It is possible to take advantage of your hyperthreaded cores though... it is a little dicey and may not work for all setups, but I have managed to get it to work in the past. If you have a computer with say quad-hyperthread capability, you have 8 logical cores. So what you can do is run OpenFOAM in a virtual machine. This isnt ideal in terms of overeall efficiency and it will eat into the maximum RAM that the simulation can use because you require a portion of it to maintain your windows partition whilst also maintaining the VM client, however, if your simulation RAM required is 3-4Gb below what your system has, then you should be ok.
The reason that this works is because a VM is only able to see what the computer tells it. So when it sees 8 threads, it doesnt know that it is 4 physical and 4 logical. And so what I used to do when I was teaching myself, was give 7 cores to the VM, keeping 1 for windows, and then partition my openFOAM simulations across 8 "theoretical" VM cores. So I would have 7 actual threads (4 physical and 3 logical) working to solve what the VM thought was an 8-core simulation. I did some sensitivity studies to see how changing this figure affected total sim time, and this was the quickest option that I had available to me at the time.
Up to you if you wanna give it a shot - you can do to a website called "GeekoCFD" and there is an openSUSE linux install of OpenFOAM and all the things that you need already set up and working perfectly for you to download for free. All you do then is download a free VM client like virtualbox, load in the iso, convert to a VM and off you go!!