Thread Checker: conflicts between strchr and _Strxfrm
I'm trying to analyse a small Monte Carlo simulation which uses MKL to generaterandom paths(by vslLeapfrogStream + vsRngGaussian), parallelised by OpenMP.
Thread Checker shows an enormous number of counts for two memory access conflicts: a "read" of unknown inside "strchr"(1st Access) conflicts with a "write" of unknown inside"_Strxfrm" (2nd Access) and the other way around (a write inside _Strxfrm conflicts with a read inside strchr).
I'm puzzled because there's no direct call for either of these two functions inside my code which must be called elsewhere, from some external function (but AFAIK the only external functions I'm calling are the MKL rnd generators which are supposed to be thread safe).
When clicking over the error message inside Thread Checker the "pragma omp parallel" directive is highlighted.
Is that a known pattern for a common error? Any suggestion?
Can you tell me is the C/C++ runtime libraries are statically linked or dynamically linked? This is /MT (/MTd) vs. /MD (/MDd) option on the command line.
Also, if the non-thread safe libraries happened to be used while linking, Thread Checker may reportmany errors as well. The errors you saw were in the C/C++ runtime libraries that other functions may have used.
When you select a diagnostic for analysis, it will only point to the openmp block in which the error occured, i.e., identified by the pragma omp line. This will tell you that you have to change the data-sharing attribute clause of the variable if already present or add it to the pragma line.
In the future, if you have any such issues, please register on https://premier.intel.com and submit your issues there. The turnaround time for a response is within 4 hours from the time of submission.