From: Vermaas, Josh (vermaasj_at_msu.edu)
Date: Mon Jul 22 2024 - 20:16:50 CDT

My students are running into this today building an older version of
NAMD, so I'm slightly more motivated than usual to figure this out. What
version of the CUDA compiler/VMD are you using? By the look of things,
CUDA 12 killed off texture reference support, which is why these old
builds are failing. What I have working for my group is compiling VMD
from source for the latest alpha (which I wrote up here:
https://urldefense.com/v3/__https://github.com/jvermaas/vmd-packaging-instructions__;!!DZ3fjg!6HpkVIPqN6vjHhQK4w_-vw3VUCki4Tc7725nQEQxj2c_QVZq7lAofZkMDh3EWAD7yNpM_gDNCchvKfEHHBg$ ), where I assume
a workaround has been devised.

-Josh

On 7/21/24 21:53, Chris Taylor wrote:
> Hi everyone, I'm building a new VMD to add OpenMPI and I get this error.
> Rocky9, nvidia/cuda:12.4.1-runtime-rockylinux9 Docker image from the official repo, NVIDIA-OptiX-SDK-6.5.0-linux64.
>
> What's a good way to troubleshoot? Thanks
>
> echo "Compiling " CUDAMarchingCubes.cu " --> " CUDAMarchingCubes.o " ..."; \
> /usr/local/cuda/bin/nvcc -lineinfo --ptxas-options=-v -gencode arch=compute_61,code=compute_61 -gencode arch=compute_61,code=sm_61 --ftz=true --machine 64 -O3 -DARCH_LINUXAMD64 -DVMDCUDA -DMSMPOT_CUDA -DVMDMPI -DVMDLIBOPTIX -DVMDLIBPNG -DVMDTHREADS -DWKFTHREADS -DUSEPOSIXTHREADS -D_REENTRANT -DVMDZLIB -DVMDQUICKSURF -DVMDWITHCARBS -DVMDPOLYHEDRA -DVMDSURF -DVMDMSMS -DVMDNANOSHAPER -DVMDLATTICECUBES -DVMDTCL -DVMDSTATICPLUGINS -I/opt/ompi/include -I/opt/nvidia-optix/NVIDIA-OptiX-SDK-6.5.0-linux64/include -I/usr/local/cuda/include -I/usr/include/libpng16/ -I/usr/include -I../lib/tcl/include -I../plugins/include -I../plugins/LINUXAMD64/molfile -I. -c CUDAMarchingCubes.cu -o ../LINUXAMD64/CUDAMarchingCubes.o
> Compiling CUDAMarchingCubes.cu --> CUDAMarchingCubes.o ...
> CUDAMarchingCubes.cu(188): error: texture is not a template
> texture<int, 1, cudaReadModeElementType> triTex;
> ^
>
> CUDAMarchingCubes.cu(189): error: texture is not a template
> texture<unsigned int, 1, cudaReadModeElementType> numVertsTex;
> ^
>
> CUDAMarchingCubes.cu(191): error: texture is not a template
> texture<float, 3, cudaReadModeElementType> volumeTex;
> ^
>
> CUDAMarchingCubes.cu(331): error: no instance of overloaded function "tex1Dfetch" matches the argument list
> argument types are: (<error-type>, unsigned int)
> numVerts.x = tex1Dfetch(numVertsTex, cubeindex);
> ^
> /usr/local/cuda/include/texture_indirect_functions.h(115): note #3327-D: candidate function template "tex1Dfetch<T>(cudaTextureObject_t, int)" failed deduction
> static __attribute__((device)) T tex1Dfetch(cudaTextureObject_t texObject, int x)
> ^
> /usr/local/cuda/include/texture_indirect_functions.h(109): note #3322-D: number of parameters of function template "tex1Dfetch(T *, cudaTextureObject_t, int)" does not match the call
> static __attribute__((device)) typename __nv_itex_trait<T>::type tex1Dfetch(T *ptr, cudaTextureObject_t obj, int x)
>

-- 
Josh Vermaas
vermaasj_at_msu.edu
Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
Michigan State University
vermaaslab.github.io