Tuesday, April 23, 2013



Note on Technical Writing

Writing is hard and essential for any researcher, considering the fact that it is the sole objective of research itself (i.e. to propagate knowledge). Many of us fall-behind in this aspect (so as me) and to help alleviate this are guidelines or best practices written by experts. Two of them that I find useful are;

1. NASA - Technical Report Writing
2. Style and Ethics of Communication in Science and Engineering
3. Note on Literature Review

Happy writing !

Thursday, April 11, 2013


Instrumentation using gprof

gprof is a free performance analysis tool on Linux. One is always concerned about the efficiency of the code developed. Also, timing it manually might be tedious. To elevate this we could use performance analysis tools to time the code automatically and remove possible bottlenecks. This process is called profiling and there are other advanced tools which are available. However, gprof is a start point for any beginner or early analysis.

Ok, quickly getting to the topic. The following steps could be followed for profiling a simple C or FORTRAN code.

Step 1:
Enabling profiling is as simple as adding -pg to the gcc compile flags. T

gcc mycode.c -pg

Step 2:
Now run the code normally for sufficiently large number of samples. The code could be setup to run for few samples rather than the full runtime. However, it is good to keep the execution running for few seconds for gprof to collect statistics accurately.

./a.out [arguments if any] 

Step 3:
Finally, the profiler is called and the two inputs for grpof are, the name of the executable and a file gmon.out which is the monitor file generated while execution.

gprof example1 gmon.out -p

Here -p option refers to flat graph, alternatively, -q refers to call graph.

Flat graph, prints the functions called and the runtime of each function or subroutine.
Whereas, call graph in addition gives out the detail of each function separately.
Additionally, -A option print out the code bits overlayed with the timing and number of calls. 

One could simply check the validity of the timings using time command as

time ./a.out [arguments if any]

It is to be noted that system commands in the code should be avoided as they are not timed by gprof. A discussion is found hereFor a longer and definitely better understanding, see article.







Code instrumentation for timers and other runtime data

1. Tau Link
2. Scalasca Link
3. Open Speedshop Link

Friday, April 5, 2013



Essential list of Validation & Verification cases for CFD solvers



This list is generally for mainly compressible flows & suggestions for incompressible flows is greatly appreciated !


1. Best Practices Guide

A tutorial from NASA on best practices in verification and validation of CFD solvers.
[ NASA Link ]


2. Turbulence Models 

NASA provides a series of test cases to validate & verify turbulence models from Spalart-Allamaras to LES / DNS.
NASA LARC - Turbulence models V&V ]


3. Comprehensive Test cases

A comprehensive list of test cases for various CFD solver and its components.
[ NPARC Alliance Verification and Validation Archive ]


4. Another set of Test cases

A list of test cases for NASA's CFL3D solver.
[ CFL3D Test cases ]


5. Drag prediction workshop

Test cases for production grade solvers
[ AIAA Drag prediction Workshop  ]


6. A collection of resources

From CFD-online
[ CFD-online Validation & Verification ]


7. AGARD Experimental data for CFD code validation

PDF1 4mb
PDF2 22mb

Also AIAA papers
1. AIAA 93-0002 Dryden Lectureship in Research - A perspective on CFD validation.
2. Von Karman Institute, Verification and validation of computational fluid dynamics. In association with the Thematic Network FLOWNET (European Commission DG XII) June 5 - 8, 2000; F. Grasso, J. PĂ©riaux, H. Deconinck


8. Higher-order Schemes

A list of test cases for higher-order scheme accuracy. [Wang]

9. Some other validation cases

SimJournal: Ammar Hakim’s Simulation Journal. [Ammar Hakim]


Thursday, April 4, 2013



CUDA Video Tutorials

Prerequisites : moderate level in C/C++ programming


Learn the fundamentals of parallel computing with the GPU and the CUDA programming environment! In this class, you'll learn about parallel programming by coding a series of image processing algorithms, such as you might find in Photoshop or Instagram. You'll be able to program and run your assignments on high-end GPUs, even if you don't own one yourself.

Wednesday, April 3, 2013





CFD Lectures available freely from Boston University.
Presented by Prof. Lorena A. Barba

Topics Covered include Governing equations, Basics of CFD, FDM & FVM

Youtube Playlist link


Subscribe to RSS Feed Follow me on Twitter!