[BUG]: example.cu does not compile docs.rapids.ai/api/libcuproj, nvcc 12.6 name followed by "::" must be a class or namespace name #1500
Open
Description
opened on Dec 12, 2024
Version
cuspatial-branch-24.12
On which installation method(s) does this occur?
Source
Describe the issue
The CUDA example on
https://docs.rapids.ai/api/libcuproj/stable/index.html
fails to compile with nvcc V12.6.68
The first, of 85:-(, errors is
../cuspatial/include/rmm/mr/device/device_memory_resource.hpp(312): error: name followed by "::" must be a class or namespace name
friend void get_property(device_memory_resource const&, cuda::mr::device_accessible) noexcept {}
Command lines:
setenv PATH /opt/cuda/cuda-12.6/bin/:"$PATH"
setenv LD_LIBRARY_PATH /opt/cuda/cuda-12.6/lib64:"$LD_LIBRARY_PATH"
nvcc --version
nvcc
-I../cuspatial/cpp/cuproj/include
-I../cuspatial/include
-arch=all
-c example.cu -o example.cu.o
I guess I am missing an #include ?
All being well full output is attached
Minimum reproducible example
/*WBL 25 Nov 2025 example taken from
https://github.com/rapidsai/cuspatial/tree/branch-24.12/cpp/cuproj#example
*/
#include <cuproj/projection_factories.cuh>
#include <cuproj/vec_2d.hpp>
// Make a projection to convert WGS84 (lat, lon) coordinates to UTM zone 56S (x, y) coordinates
auto proj = cuproj::make_projection<cuproj::vec_2d<T>>("EPSG:4326", "EPSG:32756");
cuproj::vec_2d<T> sydney{-33.858700, 151.214000}; // Sydney, NSW, Australia
thrust::device_vector<cuproj::vec_2d<T>> d_in{1, sydney};
thrust::device_vector<cuproj::vec_2d<T>> d_out(d_in.size());
// Convert the coordinates. Works the same with a vector of many coordinates.
proj.transform(d_in.begin(), d_in.end(), d_out.begin(), cuproj::direction::FORWARD);
Relevant log output
See example_fails.bat.txt
Environment details
WBL 12 Dec 2024 output of cuspatial/cpp/build/_deps/rmm-src/print_env.sh clean up by hand
***OS Information***
NAME="Rocky Linux"
VERSION="9.5 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.5"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.5 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
VENDOR_NAME="RESF"
VENDOR_URL="https://resf.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.5"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.5"
Rocky Linux release 9.5 (Blue Onyx)
Rocky Linux release 9.5 (Blue Onyx)
Rocky Linux release 9.5 (Blue Onyx)
Linux xxx 5.14.0-503.15.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 26 17:24:29 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
***GPU Information***
Thu Dec 12 15:09:47 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4070 ... On | 00000000:65:00.0 Off | N/A |
| 0% 40C P8 14W / 285W | 146MiB / 16376MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2252 G /usr/libexec/Xorg 117MiB |
| 0 N/A N/A 2607 G /usr/bin/gnome-shell 13MiB |
+-----------------------------------------------------------------------------------------+
***CPU***
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 4
CPU(s) scaling MHz: 28%
CPU max MHz: 4500.0000
CPU min MHz: 1200.0000
BogoMIPS: 7599.80
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 pti ssbd mba ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 256 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 8 MiB (8 instances)
L3 cache: 16.5 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
***CMake***
/usr/bin/cmake
cmake version 3.26.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
***g++***
/usr/bin/g++
g++ (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2)
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.
***nvcc***
/opt/cuda/cuda-12.6/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Aug_14_10:10:22_PDT_2024
Cuda compilation tools, release 12.6, V12.6.68
Build cuda_12.6.r12.6/compiler.34714021_0
***Python***
/usr/bin/python
Python 3.9.19
***Environment Variables***
PATH : /opt/cuda/cuda-12.6/bin/:/usr/share/Modules/bin:/cs/sys/software2/texlive/2018/bin/x86_64-linux:/opt/ucl/bin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/bin/X11:/opt/UCLCSdefunct/bin:xxx
LD_LIBRARY_PATH : /opt/cuda/cuda-12.6/lib64:/opt/ucl/lib:/usr/X11R6/lib
NUMBAPRO_NVVM :
NUMBAPRO_LIBDEVICE :
CONDA_PREFIX :
PYTHON_PATH :
xxx/assugi/cuproj/cuspatial/cpp/build/_deps/rmm-src/print_env.sh: line 58: type: conda: not found
***pip packages***
/usr/bin/pip
Package Version
------------------- ----------
appdirs 1.4.4
Brlapi 0.8.2
cffi 1.14.5
chardet 4.0.0
cockpit 323.1
configobj 5.0.6
dasbus 1.4
dbus-python 1.2.18
distlib 0.3.2
distro 1.5.0
file-magic 0.4.0
filelock 3.7.1
gpg 1.15.1
idna 2.10
libcomps 0.1.18
lxml 4.6.5
Mako 1.1.4.dev0
Markdown 3.3.4
MarkupSafe 1.1.1
nftables 0.1
numpy 1.20.1
olefile 0.46
packaging 20.9
perf 0.1
pexpect 4.8.0
Pillow 10.0.1
pip 21.3.1
platformdirs 2.5.4
ply 3.11
psutil 5.8.0
ptyprocess 0.6.0
pycairo 1.20.1
pycparser 2.20
PyGObject 3.40.1
pyinotify 0.9.6
pyparsing 2.4.7
PySocks 1.7.1
python-dateutil 2.8.1
python-linux-procfs 0.7.3
python-pam 2.0.2
pytz 2021.1
pyudev 0.22.0
PyYAML 5.4.1
pyzmq 22.3.0
requests 2.25.1
rpm 4.16.1.3
scipy 1.6.2
scour 0.38.1
selinux 3.6
sepolicy 3.6
setools 4.4.4
setproctitle 1.2.3
setroubleshoot 3.3.32
setuptools 53.0.0
six 1.15.0
sos 4.8.1
systemd-python 234
terminator 2.1.3
tinycss2 1.3.0
urllib3 1.26.5
vboxapi 1.0
virtualenv 20.21.1
webencodings 0.5.1
xlrd 2.0.1
youtube-dl 2021.12.17
Other/Misc.
No response
Metadata
Assignees
Labels
Type
Projects
Status
Todo
Activity