blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Compiling fails with PAPI 6.0

Open badshah400 opened this issue 5 years ago • 4 comments

Compiling fails when PAPI 6.0+ is used with the following errors:

[  255s] In file included from /home/abuild/rpmbuild/BUILD/blitz-1.0.2/src/globals.cpp:15:
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h: In constructor 'blitz::Timer::Timer()':
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h:132:10: error: 'PAPI_start_counters' was not declared in this scope
[  255s]   132 |       if(PAPI_start_counters((int*)Events, nevents)!=PAPI_OK) {
[  255s]       |          ^~~~~~~~~~~~~~~~~~~
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h: In destructor 'blitz::Timer::~Timer()':
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h:139:7: error: 'PAPI_stop_counters' was not declared in this scope
[  255s]   139 |       PAPI_stop_counters(counters_.data(), nevents);
[  255s]       |       ^~~~~~~~~~~~~~~~~~
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h: In member function 'void blitz::Timer::start()':
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h:146:9: error: 'PAPI_read_counters' was not declared in this scope; did you mean 'PAPI_read_ts'?
[  255s]   146 |         PAPI_read_counters(counters_.data(), nevents);
[  255s]       |         ^~~~~~~~~~~~~~~~~~
[  255s]       |         PAPI_read_ts
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h: In member function 'void blitz::Timer::stop()':
[  255s] /home/abuild/rpmbuild/BUILD/blitz-1.0.2/blitz/timer.h:151:9: error: 'PAPI_read_counters' was not declared in this scope; did you mean 'PAPI_read_ts'?
[  255s]   151 |         PAPI_read_counters(counters_.data(), nevents);
[  255s]       |         ^~~~~~~~~~~~~~~~~~
[  255s]       |         PAPI_read_ts

badshah400 avatar Mar 22 '20 10:03 badshah400

Ping?

badshah400 avatar Apr 14 '20 01:04 badshah400

I believe I got around this bug by using a different version of papi.

citibeth avatar Apr 14 '20 04:04 citibeth

I just checked... yes, I compiled successfully with papi 5.6

https://github.com/citibeth/spack/blob/efischer/giss2/var/spack/repos/builtin/packages/papi/package.py

citibeth avatar Apr 14 '20 04:04 citibeth

I am interested as a packager of blitz for openSUSE. It isn't possible in this case to compile with a lower version of papi since the distro (Tumbleweed) has already moved on to papi 6. We will have to drop the package from the distro instead.

Sources are here: https://build.opensuse.org/package/show/openSUSE:Factory/blitz

badshah400 avatar Apr 14 '20 09:04 badshah400