blitzpp / blitz

Blitz++ Multi-Dimensional Array Library for C++
https://github.com/blitzpp/blitz/wiki
Other
405 stars 84 forks source link

Compiling fails with PAPI 6.0 #162

Open badshah400 opened 4 years ago

badshah400 commented 4 years ago

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 commented 4 years ago

Ping?

citibeth commented 4 years ago

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

citibeth commented 4 years ago

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

badshah400 commented 4 years ago

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