2

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 ?

Sharat Chandra
  • 4,434
  • 7
  • 49
  • 66

1 Answers1

3

-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.

markhahn
  • 565
  • 4
  • 6