IntelligentSoftwareSystems / Galois

Galois: C++ library for multi-core and multi-node parallelization
http://iss.ices.utexas.edu/?p=projects/galois
Other
313 stars 133 forks source link

papiGetTID error #404

Open OneMoreProblem opened 2 years ago

OneMoreProblem commented 2 years ago

Hello

Yesterday i was tried to use PAPI and face with an error:

[build] /usr/bin/ld: CMakeFiles/MatMulB.dir/tutorial_examples/MatriMultBaseline.cpp.o: in function `void galois::runtime::internal::papiInit<void>()':
[build] /home/user/Galois/install/include/galois/runtime/Profile.h:95: undefined reference to `galois::runtime::internal::papiGetTID()'

In Profile.h:95 i found reference to papiGetTID(), and declaration of papiGetTID() in Profile.h:78 as i understand papiGetTID() returns thread id.

Also i found papi.h:1095 declaration of similar function PAPI_thread_id(), then i swapped papiGetTID() for PAPI_thread_id(), and code with PAPI was build fine. Is it correct? Why papiGetTID() don't works?

My environment:

PAPI version: 6.0.0.1 cmake version 3.22.1 gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu 22.04 LTS

Best regards

OneMoreProblem commented 2 years ago

This solution is not helped because program is stuck on galois::runtime::profilePapi block. I tried to swap papiGetTID() for galois::substrate::ThreadPool::getTID and change return type to unsigned long but got the ERROR: /home/r00662636/Galois/install/include/galois/runtime/Profile.h:129: failed to add events. I have no idea how to fix it, maybe problem lies in compilation stage.

Best regards