Skip to content

prk_ranges.h:59:24: error: ‘ranges::views’ has not been declared #637

@wangzy0327

Description

@wangzy0327

What type of issue is this?

  • [build Error ] Bug in the code or other problem

I copyed the make.defs.gcc to make.defs,use g++-11 to make allcxx. I get the error. How to solve the problem?

g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-ranges.cc -DUSE_RANGES_TS -I../deps/range-v3/include -DUSE_RANGES -o stencil-ranges
In file included from stencil-ranges.cc:64:
prk_ranges.h: In function ‘auto prk::range(S, E)’:
prk_ranges.h:59:24: error: ‘ranges::views’ has not been declared
   59 |         return ranges::views::iota(static_cast<decltype(end)>(start), end);
      |                        ^~~~~
compilation terminated due to -fmax-errors=1.
Makefile:232: recipe for target 'stencil-ranges' failed
make[1]: *** [stencil-ranges] Error 1
make[1]: Leaving directory '/home/wzy/Kernels/Cxx11'
Makefile:241: recipe for target 'allcxx' failed
make: *** [allcxx] Error 2

Where does this bug appear?

Check all that apply:

  • Linux
  • GCC
  • CXX
  • Open-MPI

Operating system

Linux gxnzx1277 4.15.0-188-generic #199-Ubuntu SMP Wed Jun 15 20:42:56 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 18.04.6 LTS \n \l

Compiler

g++-11 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PRK build information

make -C Cxx11
make[1]: Entering directory '/home/wzy/Kernels/Cxx11'
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p.cc -o p2p
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil.cc -o stencil
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose.cc -o transpose
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream.cc -o nstream
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" dgemm.cc -o dgemm
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" sparse.cc -o sparse
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p-vector.cc -o p2p-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p-hyperplane-openmp.cc -o p2p-hyperplane-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-vector.cc -o stencil-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-vector.cc -o transpose-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream-vector.cc -o nstream-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" sparse-vector.cc -o sparse-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" dgemm-vector.cc -o dgemm-vector
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-async.cc -o transpose-async
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-thread.cc -o transpose-thread
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-valarray.cc -o transpose-valarray
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream-valarray.cc -o nstream-valarray
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p-hyperplane-openmp.cc -fopenmp -o p2p-hyperplane-openmp
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-openmp.cc -fopenmp -o stencil-openmp
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-openmp.cc -fopenmp -o transpose-openmp
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream-openmp.cc -fopenmp -o nstream-openmp
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p-tasks-openmp.cc -fopenmp -o p2p-tasks-openmp
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-taskloop.cc -fopenmp -o stencil-taskloop
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-taskloop.cc -fopenmp -o transpose-taskloop
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream-taskloop.cc -fopenmp -o nstream-taskloop
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" p2p-innerloop-opencl.cc -I/usr/local/cuda-11.2/include -L/usr/local/cuda-11.2/targets/x86_64-linux/lib -lOpenCL -Wno-ignored-attributes -Wno-deprecated-declarations -DCL_HPP_MINIMUM_OPENCL_VERSION=120 -DCL_HPP_TARGET_OPENCL_VERSION=120 -DCL_HPP_ENABLE_EXCEPTIONS -o p2p-innerloop-opencl
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-opencl.cc -I/usr/local/cuda-11.2/include -L/usr/local/cuda-11.2/targets/x86_64-linux/lib -lOpenCL -Wno-ignored-attributes -Wno-deprecated-declarations -DCL_HPP_MINIMUM_OPENCL_VERSION=120 -DCL_HPP_TARGET_OPENCL_VERSION=120 -DCL_HPP_ENABLE_EXCEPTIONS -o stencil-opencl
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" transpose-opencl.cc -I/usr/local/cuda-11.2/include -L/usr/local/cuda-11.2/targets/x86_64-linux/lib -lOpenCL -Wno-ignored-attributes -Wno-deprecated-declarations -DCL_HPP_MINIMUM_OPENCL_VERSION=120 -DCL_HPP_TARGET_OPENCL_VERSION=120 -DCL_HPP_ENABLE_EXCEPTIONS -o transpose-opencl
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" nstream-opencl.cc -I/usr/local/cuda-11.2/include -L/usr/local/cuda-11.2/targets/x86_64-linux/lib -lOpenCL -Wno-ignored-attributes -Wno-deprecated-declarations -DCL_HPP_MINIMUM_OPENCL_VERSION=120 -DCL_HPP_TARGET_OPENCL_VERSION=120 -DCL_HPP_ENABLE_EXCEPTIONS -o nstream-opencl
g++-11 -std=gnu++20 -pthread -fmax-errors=1 -O3 -mtune=native -ffast-math -g3 -Wall  -DPRKVERSION="2020" stencil-ranges.cc -DUSE_RANGES_TS -I../deps/range-v3/include -DUSE_RANGES -o stencil-ranges

Output showing problem

prk_ranges.h: In function ‘auto prk::range(S, E)’:
prk_ranges.h:59:24: error: ‘ranges::views’ has not been declared
   59 |         return ranges::views::iota(static_cast<decltype(end)>(start), end);
      |                        ^~~~~
compilation terminated due to -fmax-errors=1.
Makefile:232: recipe for target 'stencil-ranges' failed
make[1]: *** [stencil-ranges] Error 1
make[1]: Leaving directory '/home/wzy/Kernels/Cxx11'
Makefile:241: recipe for target 'allcxx' failed
make: *** [allcxx] Error 

@jeffhammond

Please do not attach screenshots of your terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions