The GNU OpenMP runtime, libGOMP
, does not support the OMPT API yet.
Therefore to use Tikki for a program compiled with GCC you will need to execute it with an OMPT-ready runtime.
Thankfully the LLVM OpenMP runtime has a compatibility layer with the GNU OpenMP runtime.
By default installing the LLVM runtime will also install symbolic links from libgomp.so
to libomp.so
, but depending on the version of GCC the library may be named libgomp.so.1
, in which case you will need to setup a symbolic link yourself to libomp.so
.
Then you will just need to make sure your LD_LIBRARY_PATH
is appropriately set to detect this symbolic link before the original libGOMP
library.
For instance here is what happens when I compile the hello-task.c
example:
$ /usr/bin/gcc -o test-task -fopenmp test/hello-task.c -lm
$ ldd test-task
linux-vdso.so.1 (0x00007fff6a3f8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9c945c8000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f9c9439b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9c9417e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9c93ddf000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9c94acf000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9c93bdb000)
$ LD_LIBRARY_PATH=$HOME/install/libkomp-hashmaps/lib:$LD_LIBRARY_PATH ldd test-task
linux-vdso.so.1 (0x00007fff35dac000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f84bd589000)
libgomp.so.1 => /home/openmp/install/llvm-openmp/lib/libgomp.so.1 (0x00007f84bd2bf000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f84bd0a2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f84bcd03000)
/lib64/ld-linux-x86-64.so.2 (0x00007f84bda90000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f84bcaff000)
$ ls $HOME/install/llvm-openmp/lib -al
total 1052
drwxr-xr-x 2 openmp openmp 4096 Sep 11 16:10 .
drwxr-xr-x 4 openmp openmp 4096 Jun 3 16:57 ..
lrwxrwxrwx 1 openmp openmp 9 Sep 11 16:10 libgomp.so -> libomp.so
lrwxrwxrwx 1 openmp openmp 9 Aug 6 11:15 libgomp.so.1 -> libomp.so
lrwxrwxrwx 1 openmp openmp 9 Sep 11 16:10 libiomp5.so -> libomp.so
-rw-r--r-- 1 openmp openmp 988280 Sep 11 16:05 libomp.so
-rw-r--r-- 1 openmp openmp 75728 Sep 11 16:10 libomptarget.so
Running your application with the appropriate LD_LIBRARY_PATH
will let it use the LLVM runtime and will enable you to load the Tikki tool, as described here.