I am trying to use OMPTrace which is a tool for tracing and visualizing OpenMP program execution as shown here https://github.com/passlab/omptrace. The codes given in the examples is written in C. (jacobi.c and axpy.c)
The library is well installed in /home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so. I created a makefile as following:
OMP_INSTALL=/home/hakim/llvm-openmp-install
OMP_LIB_PATH=${OMP_INSTALL}/lib
OMPTRACE_LIB=/home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so
default:runaxpy
axpyclang: axpy.c
clang -g -fopenmp axpy.c -o axpyclang
objdump -d axpyclang >axpyclang.objdump
jacobi: jacobi.c
clang -g -fopenmp jacobi.c -o jacobi -lm
objdump -d jacobi >jacobi.objdump
runaxpy: axpyclang
LD_PRELOAD=${OMP_LIB_PATH}/libomp.so:${OMPTRACE_LIB} ./axpyclang 1024
runjacobi: jacobi
LD_PRELOAD=${OMP_LIB_PATH}/libomp.so:${OMPTRACE_LIB} ./jacobi
clean:
rm axpyclang axpyclang.objdump core jacobi jacobi.objdump
and when executing it, I get :
clang -g -fopenmp axpy.c -o axpyclang
axpy.c:18:5: warning: 'ftime' is deprecated [-Wdeprecated-declarations]
ftime(&tm);
^
/usr/include/x86_64-linux-gnu/sys/timeb.h:40:19: note: 'ftime' has been explicitly marked deprecated here
__nonnull ((1)) __attribute_deprecated__;
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:251:51: note: expanded from macro '__attribute_deprecated__'
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
^
axpy.c:25:5: warning: 'ftime' is deprecated [-Wdeprecated-declarations]
ftime(&tm);
^
/usr/include/x86_64-linux-gnu/sys/timeb.h:40:19: note: 'ftime' has been explicitly marked deprecated here
__nonnull ((1)) __attribute_deprecated__;
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:251:51: note: expanded from macro '__attribute_deprecated__'
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
^
axpy.c:95:5: warning: implicit declaration of function 'sleep' is invalid in C99 [-Wimplicit-function-declaration]
sleep(1);
^
3 warnings generated.
/usr/bin/ld: cannot find -lomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [makefile:8: axpyclang] Error 1
What is really bothering me is that I succeded 3 hours ago to execute the makefile and to generate a graphml file but now, I'm getting new multiples warnings + an error.
I wonder if it comes from the clang compiler (version 10.0.0-4ubuntu1) because getting new warnings gave me the idea that maybe I updated the compiler (and forgot).
Any help, please ?
/usr/bin/ld: cannot find -lomp< here is your error, libraryompcannot be found, make surelibomp.a(oromp.lib) actually exists in your library search path.unistd.hfor thesleepfunction warningftimeisclock_gettimeorGetLocalTimedepending on your system.sleepfunction warning.