Reputation: 139
I have a code that I parallelized using OpenMP. I want to make sure that the threads deployed follow the same sequence diagram that I have in mind. In order to do that, I looked for an efficient tool (library, software,..) and found the lib OMPTrace which is a simple tool for tracing and visualizing OpenMP program execution. it's shown here how to install and use it. The file I want to compile is called hecese_OpenMP.f90
(Fortran).
I executed the following block of commands in order to vizualize the behaviour of the threads.
flang -g -mp hecese_OpenMP.f90 -L/home/hakim/llvm-openmp-install/lib -o heceseflang
14 h 40
objdump -d heceseflang >heceseflang.objdump
14 h 40
LD_PRELOAD=/home/hakim/llvm-openmp-install/lib/libomp.so:/home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so ./heceseflang
and it shows:
140557273808912: ompt_event_release_nest_lock_last: wait_id=140558880879816, codeptr_ra=0x411abe
140557273808912: ompt_event_wait_nest_lock: wait_id=140558880879816, hint=0, impl=2, codeptr_ra=0x41199f
140557273808912: ompt_event_acquired_nest_lock_first: wait_id=140558880879816, codeptr_ra=0x41199f
140557273808912: ompt_event_release_nest_lock_last: wait_id=140558880879816, codeptr_ra=0x411abe
Erreur de segmentation (core dumped)
I tested the library on a hello_world program and it worked perfectly.
I tried to reproduce the sequence diagram I have in mind and it gave me:
The problem is that if I compile my code with gfortran
and execute it, I don't get a segmentation fault (everything works fine) but when I try with OMPTrace I get a segmentation fault.
My question is very simple. Does the problem come from the library itself (knowing that it worked for the hello_world code) or it can come from my code (knowing that it works without the lib) ? I doubt that this library does not support large codes. My code contains 1200 lines.
Upvotes: 0
Views: 79