These are my first steps with the new nvc++ compiler. I’m on Ubuntu 16.04 hitting this error with a simple example, but only when I use -std=c++17
. If I change that to c++11
, the program compiles & works. But, I’d like to use c++17, eventually.
code:
#include <algorithm>
#include <iostream>
#include <vector>
#include <execution>
int main()
{
std::vector<int> v = {5,100,3,6,6,109,64,234,656,25,7,44,6,232,2};
std::sort(std::execution::par_unseq, v.begin(), v.end());
std::cout << v[0] << '\n';
}
output:
> nvc++ -stdpar -std=c++17 par.cpp -o par
"/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/include-stdpar/thrust/mr/new.h
", line 44: error: namespace "std" has no member "align_val_t"
return ::operator new(bytes, std::align_val_t(alignment));
^
"/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/include-stdpar/thrust/mr/new.h
", line 66: error: namespace "std" has no member "align_val_t"
::operator delete(p, bytes, std::align_val_t(alignment));
^
2 errors detected in the compilation of "par.cpp".
Any ideas what I should do to get past this?
> nvc++ --version
nvc++ 20.7-0 LLVM 64-bit target on x86-64 Linux -tp haswell
NVIDIA Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.