intel / mpi-benchmarks

146 stars 63 forks source link

explicit specialization of after instantiation errors #36

Open ddinge opened 3 years ago

ddinge commented 3 years ago

In file included from RMA/RMA_benchmark.cpp:61: In file included from helpers/original_benchmark.h:58: ../src_c/IMB_prototypes.h:650:22: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] long IMB_compute_crc(register char buf, register size_t size); ^~~~~ ../src_c/IMB_prototypes.h:650:42: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] long IMB_compute_crc(register char buf, register size_t size); ^~~~~ When attempting to build RMA on a cray machine at LLNL I get the errors below. The compiler is clang. Is there a fix or workaround for this issue?

zwhamo2{dinge1}47: module list

Currently Loaded Modules: 1) cpe-cray 2) cce/11.0.3 3) craype/2.7.5 4) craype-x86-rome 5) craype-network-infiniband 6) cray-mvapich2_nogpu/2.3.5 7) cray-libsci/20.03.1 8) perftools-base/21.02.0 9) PrgEnv-cray/1.0.0 10) rocm/4.0.1

rzwhamo2{dinge1}49: which CC /opt/cray/pe/craype/2.7.5/bin/CC rzwhamo2{dinge1}50: echo $CXX CC rzwhamo2{dinge1}51: CC --version Cray clang version 11.0.3 (477c94a197f0fb1c961670c6e69c34a212c8f345) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/cray/pe/cce/11.0.3/cce-clang/x86_64/share/../bin

RMA/RMA_benchmark.cpp:79:1: error: explicit specialization of 'name' after instantiation BENCHMARK(IMB_rma_single_put, Unidir_put) ^ RMA/RMA_benchmark.cpp:73:106: note: expanded from macro 'BENCHMARK'

define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite, BMRK_FN>; \

                                                                                                     ^

./benchmark.h:88:114: note: expanded from macro '\ DECLARE_INHERITED_TEMPLATE'

define DECLARE_INHERITEDTEMPLATE(CLASS, NAME) namespace { CLASS elem ## NAME; } template<> const char *CLASS::name = #NAME;

                                                                                                             ^

helpers/original_benchmark.h:139:34: note: implicit instantiation first required here BMark->name = strdup(name); ^ RMA/RMA_benchmark.cpp:79:1: error: explicit specialization of 'descr' after instantiation BENCHMARK(IMB_rma_single_put, Unidir_put)

JuliaRS commented 2 months ago

@ddinge is it still actual? Did you try the new release version IMB2021.8?