Compile errors in some benchmarks using IBM XL in HPC Summit
I managed to build some of the benchmarks of VTKm in HPC summit using IBM xlc++ compiler with the following flags:
Using both cuda/11 and xl/16 modules
Using in google-benchmark:
CMAKE_CXX_COMPILER=xlc++
CMAKE_CXX_FLAGS=-std=c++1x
CMAKE_BUILD_TYPE=Release
In VTKm:
CMAKE_CUDA_ENABLE
CMAKE_TESTS_ENABLE=OFF
CMAKE_CUDA_Architecture=volta
CMAKE_CXX_COMPILER=xlc++
CMAKE_CXX_FLAGS=-std=c++1x
CMAKE_BUILD_TYPE=Release
CMAKE_CUDA_HOST_COMPILER=xlc++
Still some benchmarks such as breaks with errors such as:
/ccs/home/vbolea/vtk-m/benchmarking/BenchmarkTopologyAlgorithms.cxx:297:451: required from here
/ccs/home/vbolea/vtk-m/benchmarking/BenchmarkTopologyAlgorithms.cxx:252:195: error: invalid initialization of non-const reference of type ‘benchmark::State&’ from an rvalue of type ‘<brace-enclosed initializer lis↳ t>’
From those errors we can infer that some behaviors supported from c++11 (Such initialize non-const from rvalue) is not actually honored in IBM XL.
It does not seems very hard to "fix" this, however, I wonder if it is worth the trouble.