문제

I want to instrument my UPC program with PAPI APIs to get information on hardware counters during the execution of UPC program.

But i keep getting linking errors for eg, "undefined reference to PAPI_read" undefined reference to PAPI_library_init etc

The command I'm giving is upcc -L/full/path/to/libpapi.a -o upcMatrxMultplction upcMatrxMultplction.o

Any suggestions ?

Does PAPI support UPC compiler ?

도움이 되었습니까?

해결책

-L provides a directory, not a think to link with. you should either provide the /full/path/to/libpapi.a as a link argument (along with *.o), or else use "-L/full/path/to -lpapi". the latter is a bit more conventional.

also, linking can be order-dependent, so I prefer to list all to-link objects first and end the line with -o whatever.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top