Likwid tool - markers

Likwid tool - markers

by Razvan Vass -
Number of replies: 5

Hello!

I tried to use the likwid markers but I can not compile my file, I am receiving an error. To not receive an error I know that we need to use module load likwid, but still it doesn't work. Do you have any suggestion? Maybe I forgot something, I don't know...

The error:

ptfs307h@f1054:~/ex8$ make

icx -O3 -xHost -qopenmp -DLIKWID_PERFMON -I-I/apps/likwid/5.3.0/include -o my_program src/main.c -L-L/apps/likwid/5.3.0/lib -llikwid

src/main.c:6:10: fatal error: 'likwid-marker.h' file not found

#include <likwid-marker.h>

         ^~~~~~~~~~~~~~~~~

1 error generated.

make: *** [Makefile:15: my_program] Error 1

In reply to Razvan Vass

Re: Likwid tool - markers

by Jan Laukemann -

Look at your compile line, you try to include the include path (indicated by the -I) -I/apps/likwid/5.3.0/include and the library path (indicated by -L) -L/apps/likwid/5.3.0/lib  .

Do these two paths exist? If not, the compiler of course can't find the header files in the include path...

In reply to Jan Laukemann

Re: Likwid tool - markers

by Razvan Vass -
I think it exists.
ptfs307h@fritz2:/apps/likwid/5.3.0/lib$ ls
liblikwid-hwloc.so liblikwid-hwloc.so.5.3 liblikwid-lua.so.5 liblikwidpin.so liblikwidpin.so.5.3 liblikwid.so.5
liblikwid-hwloc.so.5 liblikwid-lua.so liblikwid-lua.so.5.3 liblikwidpin.so.5 liblikwid.so liblikwid.so.5.3


And also, I specified in my make file just:
CFLAGS = -O3 -xHost -qopenmp -DLIKWID_PERFMON -I$(LIKWID_INC)
LDFLAGS = -L$(LIKWID_LIB) -llikwid

Both links exist.


I don't know how else I can specify the libraries.
In reply to Razvan Vass

Re: Likwid tool - markers

by Jan Laukemann -


I think it exists.
ptfs307h@fritz2:/apps/likwid/5.3.0/lib$ ls

The one you checked now indeed exists, can you spot the difference between the one you just checked and the one you gave to your compiler?

You can always check the value of environment variables like $LIKWID_INC by printing them with the echo command 

In reply to Jan Laukemann

Re: Likwid tool - markers

by Georg Hager -

The LIKWID_INC and LIKWID_LIB variables already contain the "-I" and "-L" options. If you use, e.g., "-L$LIKWID_LIB" then you have the "-L" twice, which is wrong.