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/