Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 tasks
wangzy0327 opened this issue Aug 22, 2023 · 7 comments
Open
4 tasks

Comments

@wangzy0327
Copy link

wangzy0327 commented Aug 22, 2023

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.

@jeffhammond
Copy link
Member

what does your make.defs say about ranges?

for example, this might be useful, as shown in make.defs.gcc:

RANGEFLAG=-DUSE_GCC_RANGES

@wangzy0327
Copy link
Author

what does your make.defs say about ranges?

for example, this might be useful, as shown in make.defs.gcc:

RANGEFLAG=-DUSE_GCC_RANGES

It default says

RANGEFLAG=-DUSE_RANGES_TS -I../deps/range-v3/include

@wangzy0327
Copy link
Author

@jeffhammond how to choose part contents to build in allcxx instead build allcxx?

@jeffhammond
Copy link
Member

  1. change RANGEFLAG appropriately. use the GCC implementation if it's available.
  2. look at Cxx11/Makefile to see what targets exist. you can go to that subdirectory and build individual programs if you want.

@wangzy0327
Copy link
Author

@jeffhammond
I tried to build the stencil-range.cc, but it occurs error: 'range' has not been declared. I have installed libboost-all-dev.How to solve the problem?

g++-11 -std=gnu++17 -pthread -O3 -mtune=native -ffast-math -Wall  -Wno-ignored-attributes -Wno-deprecated-declarations -DPRKVERSION="2020" stencil-ranges.cc -DUSE_BOOST_IRANGE -I/usr/include/boost/ -DUSE_RANGES -o stencil-ranges
In file included from stencil-ranges.cc:66:
stencil_ranges.hpp: In function ‘void star1(int, prk::vector<double>&, prk::vector<double>&)’:
stencil_ranges.hpp:2:16: error: ‘ranges’ has not been declared

@wangzy0327
Copy link
Author

@jeffhammond Hello, I'm trying to run the Cxx11 cuda and SYCL programs in x86_64 Ubuntu-18.04 machine.But I'm unfamiliar with the make.defs config. Can you help me give you more precise make.defs config about cuda and SYCL? Thank you very much!

@AtlantaPepsi
Copy link
Contributor

AtlantaPepsi commented Aug 31, 2023

I tried to build the stencil-range.cc, but it occurs error: 'range' has not been declared. I have installed libboost-all-dev.How to solve the problem?

g++-11 -std=gnu++17 -pthread -O3 -mtune=native -ffast-math -Wall  -Wno-ignored-attributes -Wno-deprecated-declarations -DPRKVERSION="2020" stencil-ranges.cc -DUSE_BOOST_IRANGE -I/usr/include/boost/ -DUSE_RANGES -o stencil-ranges
In file included from stencil-ranges.cc:66:
stencil_ranges.hpp: In function ‘void star1(int, prk::vector<double>&, prk::vector<double>&)’:
stencil_ranges.hpp:2:16: error: ‘ranges’ has not been declared

@wangzy0327
it sounds like a separate issue from the main thread, but I think ranges are from C++20, you are using -std=gnu++17 here as opposed to what you did earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants