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. I have already tested the library on a simple code written in C
and it works perfectly (the library is well installed in /home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so
). I wonder now if it works also for codes written in Fortran
.
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:runhecese
heceseclang: hecese_OpenMP.f90
clang -g -fopenmp hecese_OpenMP.f90 -o heceseclang
objdump -d heceseclang >heceseclang.objdump
runhecese: heceseclang
LD_PRELOAD=${OMP_LIB_PATH}/libomp.so:${OMPTRACE_LIB} ./heceseclang
clean:
rm heceselang heceseclang.objdump core
and when executing it, I get :
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `__tasks_MOD_ww0':
hecese_OpenMP.f90:(.text+0x1dc6): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1df7): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1e1c): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1e37): undefined reference to `pow'
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `__tasks_MOD_w':
hecese_OpenMP.f90:(.text+0x1ed0): undefined reference to `pow'
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o:hecese_OpenMP.f90:(.text+0x1eeb): more undefined references to `pow' follow
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `MAIN__':
hecese_OpenMP.f90:(.text+0x36f1): undefined reference to `_gfortran_st_open'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x372c): undefined reference to `_gfortran_st_read'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x373b): undefined reference to `_gfortran_st_read_done'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x3776): undefined reference to `_gfortran_st_read'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x3794): undefined reference to `_gfortran_transfer_integer'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x37a3): undefined reference to `_gfortran_st_read_done'
I didn't show you all the errors because the following ones are the same as the ones I've already showed. It is all about the undefined references
.
I wonder if it comes from the clang
compiler.
Should I install the flang
compiler and use it instead of the clang
one?
The result I'm waiting for is a .graphml
file.
Any help, please ?