Friday, June 21, 2013

Running OpenFoam in Parallel

I cannot believe that I waited so long to try running OpenFOAM in parallel. Perhaps most of my models were small enough not to need parallelization and would likely not have benefited. I am now running a much larger case and run times are going to be significant so the benefits of running in parallel will be much more significant.


Running Environment

I am running OpenFOAM using VirturalBox on a Dell T5500 workstation which has a six CPU Xenon processor  (X5650) with 24 GB of RAM. Lots of power there. I have the virtual machine set up to run 4 CPUs. I am running the GeekoCFD virtual machine created by Alberto Passalacqua which is based on the OpenSUSE 12.3-64bit Linux distribution.


Setting up the Parallel Run

I first copied the decomposeParDict dictionary from the interFoam/ras/dambreak tutorial. I did not modify any of the settings for this first run. I then ran the decomposePar command and promptly received an error "Open RTE was unable to open the hostfile:". I did a quick search and found the following page and implemented the fix. I created a symbolic link:

ln -s /etc /usr/lib64/mpi/gcc/openmpi/etc

I re-ran decomposePar and then ran the command to begin the run:

mpirun -np 4 pisoFoam -parallel >logParallel &

The the model began running.

No comments:

Post a Comment