From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat May 23 2020 - 02:30:44 CDT

Hi,
  If you've manually added -lpthread and you're still getting
that missing symbol error, my guess is that CUDA 10.2 is a bit
too new for the standard libraries included as part of your OS
distribution. I haven't run into that particular error before,
but that would be my guess, since the function it's complaining
about is one of the newer pthread functions that didn't exist
in older POSIX specs.

Best,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, May 04, 2020 at 05:11:25PM +0300, Oleksii Zdorevskyi wrote:
> Dear John,
> Thanks for your message.
> When compiling vmd 1.9.4 I obtained the error:
> /usr/bin/ld:
> /usr/local/cuda-10.2/lib64/libcudart_static.a(libcudart_static.a.o):
> undefined reference to symbol 'pthread_rwlock_trywrlock@@GLIBC_2.2.5'
> //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing
> from command line
> collect2: error: ld returned 1 exit status
> I have dealt with this problem by adding "-lpthread" command to the
> Makefile in the end of of the "LIBS = " line.
> Best,
> Oleksii
> пн, 13 апÑ*. 2020 г. в 17:55, John Stone <[1]johns_at_ks.uiuc.edu>:
>
> Oleksii,
> Â Is there a reason you're unable to run the VMD 1.9.4 test versions?
> The error you're getting below is a known bug in recent versions of CUDA
> (> 9.1 IIRC) that the new versions of VMD have workarounds for.Â
>
> Best,
> Â John Stone
> Â [2]vmd_at_ks.uiuc.edu
>
> On Mon, Apr 13, 2020 at 05:45:11PM +0300, Oleksii Zdorevskyi wrote:
> >Â Â Hi, Josh,
> >Â Â Thanks for your answer.
> >Â Â In my Ubuntu 18.04 I have gcc version 8.4.0. I firstly I upgraded
> it to
> >Â Â the version 9.2.1 but during vmd compilation I got an error that
> my cuda
> >Â Â libraries are incompatible with gcc versions 9* and older, so I
> returned
> >Â Â back to the previous version.
> >Â Â I tried to do 'make veryclean' but it didn't help.
> >Â Â I even made an attemptÄ*Â to install older CUDA libraries (8.0)
> but they
> >Â Â require an older nvidia driver version that has a conflict with
> my GPU.
> >Â Â When compiling VMD, in the log-file above there is a following
> error:
> >Â Â echo "Compiling " CUDAMarchingCubes.cu " --> "
> CUDAMarchingCubes.o " ...";
> >Â Â \
> >Â Â /usr/local/cuda-10.2/bin/nvcc --ptxas-options=-v -gencode
> >Â Â arch=compute_30,code=compute_30 -gencode
> arch=compute_30,code=sm_35
> >Â Â -gencode arch=compute_30,code=sm_37 -gencode
> >Â Â arch=compute_50,code=compute_50 -gencode
> arch=compute_50,code=sm_50
> >Â Â -gencode arch=compute_60,code=compute_60 -gencode
> >Â Â arch=compute_60,code=sm_60 --ftz=true Ä* --machine 64 -O3
> >Â Â Ä* -DARCH_LINUXAMD64 -DVMDOPENGL -DVMDOPENGLPBUFFER
> -DVMDGLXPBUFFER
> >Â Â Ä* -DVMDACTC Ä* -DVMDCOLVARS -DVMDCUDA -DMSMPOT_CUDA -DVMDMPI Ä*
> -DVMDIMD
> >Â Â -DVMDXINPUT -DVMDLIBTACHYON -DVMDCONTRIB -DVMDPYTHON -DVMDTHREADS
> >Â Â -DWKFTHREADS -DUSEPOSIXTHREADS -D_REENTRANT -DVMDNUMPY
> -DVMDQUICKSURF
> >Â Â -DVMDWITHCARBS -DVMDPOLYHEDRA -DVMDSURF -DVMDMSMS -DVMDNANOSHAPER
> -DVMDTCL
> >Â Â -DVMDTK Ä* -DVMDSTATICPLUGINS Ä* -DVMDGUI -DVMDFLTK Ä*
> -I../lib/actc/include
> >Â Â Ä*Â -I/usr/include/mpich Ä*Â -I../lib/tachyon/include
> >Â Â Ä* -I/usr/include/python2.7 -I/usr/include/python2.7/numpy
> >Â Â -I/usr/lib/python2.7/dist-packages/numpy/core/lib Ä*Â
> -I/usr/include/tcl
> >Â Â -I/usr/include/tk -I/usr/local/lib/vmd/plugins/include
> >Â Â -I/usr/local/lib/vmd/plugins/LINUXAMD64/molfile
> -I./lib/netcdf/include
> >Â Â -I../lib/fltk/include -I. -c CUDAMarchingCubes.cu -o
> >Â Â ./LINUXAMD64/CUDAMarchingCubes.o
> >Â Â Compiling Ä* CUDAMarchingCubes.cu Ä* --> Ä* CUDAMarchingCubes.o
> Ä* ...
> >Â Â
> /usr/local/cuda-10.2/bin/../targets/x86_64-linux/include/thrust/system/cuda/detail/cub/block/block_scan.cuh(578):
> >Â Â error: no suitable constructor exists to convert from "int" to
> "uint2"
> >Â Â Are there any options to deal with it?
> >Â Â Thanks.
> >Â Â Best,
> >Â Â Oleksii
> >  ŠæÅ**, 10 Š°ŠæÅ**. 2020 Š³. Š² 19:21, Josh Vermaas
> >Â Â <[1][3]joshua.vermaas_at_gmail.com>:
> >
> >Â Â Â Hi Oleksii,
> >Â Â Â Were there any other errors higher up in the log? I've also
> seen these
> >Â Â Â if I got halfway through a compile and then changed something.
> Sometimes
> >Â Â Â CUDA can get finicky about that. Just "make clean" to remove
> the object
> >Â Â Â files then "make" has solved this problem for me in the past.
> The other
> >Â Â Â possibility I can think of is that your gcc version is too old
> for CUDA
> >Â Â Â 10.2 (depends on your operating system.
> >Â Â Â SeeÄ*
> [2][4]https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements).
> >Â Â Â -Josh
> >Â Â Â On Fri, Apr 10, 2020 at 10:03 AM Oleksii Zdorevskyi
> >Â Â Â <[3][5]alzdorev_at_gmail.com> wrote:
> >
> >Â Â Â Â Hi all,
> >Â Â Â Â I am trying to compile vmd 1.9.3 on my PC with the
> following options:
> >Â Â Â Â LINUXAMD64 OPENGL OPENGLPBUFFER FLTK TK ACTC CUDA MPI IMD
> XINPUT
> >Â Â Â Â LIBTACHYON NETCDF COLVARS CONTRIB TCL PYTHON PTHREADS NUMPY
> GCC
> >Â Â Â Â But when running 'make' command I get the following error:
> >Â Â Â Â 1 error detected in the compilation of
> >Â Â Â Â
> "/tmp/tmpxft_000021ca_00000000-8_CUDAMarchingCubes.compute_60.cpp1.ii".
> >Â Â Â Â Makefile:586: recipe for target 'CUDAMarchingCubes.o'
> failed
> >Â Â Â Â make: *** [CUDAMarchingCubes.o] Error 1
> >Â Â Â Â I have GPU GTX 1660 TI, the version 10.2 of cuda libraries
> and Nvidia
> >Â Â Â Â driver 440.82.
> >Â Â Â Â Could you give me an idea what's wrong?
> >Â Â Â Â Thanks in advance.
> >Â Â Â Â Best,
> >Â Â Â Â Oleksii
> >
> > References
> >
> >Â Â Visible links
> >Â Â 1. mailto:[6]joshua.vermaas_at_gmail.com
> >Â Â 2.
> [7]https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements
> >Â Â 3. mailto:[8]alzdorev_at_gmail.com
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [9]http://www.ks.uiuc.edu/~johns/Â Â Â Â Â Â Phone: 217-244-3349
> [10]http://www.ks.uiuc.edu/Research/vmd/Â Â Â
>
> References
>
> Visible links
> 1. mailto:johns_at_ks.uiuc.edu
> 2. mailto:vmd_at_ks.uiuc.edu
> 3. mailto:joshua.vermaas_at_gmail.com
> 4. https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements
> 5. mailto:alzdorev_at_gmail.com
> 6. mailto:joshua.vermaas_at_gmail.com
> 7. https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements
> 8. mailto:alzdorev_at_gmail.com
> 9. http://www.ks.uiuc.edu/~johns/
> 10. http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/