Inspector XE and OpenMP TASK blocks

Inspector XE and OpenMP TASK blocks

Ritratto di jansson

Hi,

I got a few questions about Inspector XE I use with the Fortran Compiler 12.0.3.175.

a)
Is there a way to only check for races in the dynamical context of a certain TASK/Parallel construct?

b)
Does Inspector understand OpenMP TASK, MASTER and Parallel constructs?

An example where it seems not to be the case.
When I do similar to
-----------
COMMON/matrix/A(m,m),b(m)
Zero A, x and b
!$OMP Parallel
!$OMP master
loop row
!$OMP TASK
Each task compute its own row of matrix A and element of answer b.
!$OMP END TASK
end loop row
!$OMP TASKWAIT
Solve Ax=b
!$OMP END master
!$OMP END Parallel
------------
Inspector indicate a race between assembling A and solving the system of equations, I do not believe this is a true race, how do I avoid it being reported so.
To avoid many falsely detected problems I previously moved Zeroing from just before the TASK region to the serial part before the Parallel region, I hope there is a smoother way.

c)
If I understand correctly; annotations could be used in my code to help Inspector understand the program and give better reports.
Is there a example where annotations is used in Fortran code that I could learn from, I do not speak C/C++ ?

d)
Many of the reported problems state as "Focus Code Location" the beginning of a OpenMP region, for example the !$OMP TASK line. What might this mean?

Best Regards,
Magnus

3 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Peter Wang (Intel)

a) All data races will be checked, not only in TASK/Parallel region. b) I suppose matrix A and array b are not global variables, and used in each task. Absolutely data races will happen in my view. c) I don't think that Inspector XE relies on annotation code for Fortran programming. d) Inspector XE should report data races in global variables, e.g. comput matrix A, array b. Please provide a workable test case, so we investigate the problem in detail. Regards, peter

Ritratto di Peter Wang (Intel)

Here is investigating result, I verified - that is true.

"I believe that the issue is that the attached project was using static linking. When I modified the Configuration->LIbraries->Runtime Library from Debug Multithreaded to Debug Multithreaded DLL, I can no longer see any data races.Threadchecker really isn't designed for static linking with system libraries."

Accedere per lasciare un commento.