Saturday, October 17, 2015

Trying my hands at SnappyHexMesh ( F1 car simulation )


F1 car - STL file picked from GrabCAD

snappyHexMesh  


Pressure coutour

Velocity Contour

Using OpenFOAM we can easily import stl files and mesh them using snappyHexMesh utility. The stl file used above was taken from GrabCAD ( you can find various CAD files on this site ). I have used simpleFoam here for solving an steady state problem (to save time and energy.. :D ). For more details/discussions you can comment below the post.. Simulation...

Sunday, October 4, 2015

MPI vs. OpenMP

Simple explanation of difference between OpenMP and OpenMPI


"Donald Jones" wrote


OpenMP works on SMP systems, whereas MPI works on both SMP anddistributed memory systems (ie, clusters). The codes we use in our officetypically use MPI between cluster nodes and OpenMP on individual nodes(assuming a dual CPU node), and often both at once (launch on 32 nodeswith 2 CPUs per node; OpenMP spawns appropriate portions of the code overboth CPUs).

From my experience, OpenMP has better performance on SMP systems,ignoring MPI implementations that short circuit the TCP/IP stack (eg,SGI's MPI on Origin 3000s). If you will be launching different runs oneach node, then OpenMP will likely offer better performance than MPI.However, if you are going to launch a single job across multiple nodes,MPI is the de facto standard for parallelizing on clusters.

Other difference between OpenMP and MPI is that OpenMP is a fine grainparallelism and MPI is a course grain parallelism. For example, in OpenMPyou most often parallelize over a loop using compile directives, so thecode runs in serial until the loop, runs the loop in parallel, thenreverts back to serial. Conversely, with MPI the entire code is launchedon each node and you control what each code executes based its nodenumber in the MPI universe along with an algorithm that distributes work,eg, a master/slave model.

-------------------------------------------

Parallel computing concepts can be really made simple to understand by such explanation for all CS as well as NON-CS users...

P.S : I was reading about OpenMP and OpenMPI and came across a link which had this explanation.