Debugging OpenMP fortran code

As the code becomes parallel, the complexity increases. One of the common problem in parallel code is data race. To debug this problem, I encounter that Intel’s Thread Checker to be a good software. You can download from the Intel’s website for evaluation. I found about this when I read this article

When I run tcheck_cl, I realized that some parts has a data race. So I need to eliminate this. I couldn’t make it private since it will give segmentation fault (refer to this bug). So I simply add the !$omp critical to the section that has the data race. And it solves the problem.

Anyway, Intel’s Thread Checker really helped to identify which section of the code has the problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: