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