Helgrind (Valgrind) and OpenMP (C): avoiding false positives?

前端 未结 3 1943
北荒
北荒 2020-12-16 09:09

The documentation for the Valgrind thread error detection tool Helgrind, found here

warns that, if you use GCC to compile your OpenMP code, GCC\'s OpenMP runtime lib

3条回答
  •  北海茫月
    2020-12-16 09:56

    Steps which will make it work:

    1. Recompile gcc (including libgomp) using --disable-linux-futex
    2. Make sure you use the futex free gcc when compiling your program.
    3. Make sure the system will load the futex free libgomp when executing your program (the library is usually in GCC-OBJ-DIR/PLATFORM/libgomp/.libs). For example by setting the LD_LIBRARY_PATH environment variable:

    export LD_LIBRARY_PATH=~/gcc-4.8.1-nofutex/x86_64-unknown-linux-gnu/libgomp/.libs:

提交回复
热议问题