Libraries not being included while running "make" for program.

Trying to install this software: AutoDock Software in Parallel with GPUs download | SourceForge.net

I got the nvcc/video card driver on ubuntu by using: sudo apt-get install nvidia-cuda-toolkit

In the src folder I ran:

./configure --prefix=/opt/gpuAutoDock --enable-cuda
make clean
make // Errors here

During the “make” command I get this output: http://pastebin.com/raw.php?i=zmQfayzh

Don’t know much about CUDA, or programming for that matter, but it seems like a lot of basic CUDA libaries are not being included.

i.e.: undefined reference to `cudaMemcpy’ (many more libraries than this one)

I believed this program is made for CUDA 5, could this be an issue? If not what is it? Thank you!

It’s not finding your CUDA libraries at the link stage. At least at this level of problem, this is independent of the CUDA version you have installed.

  1. your cuda libraries may not be in the right place – this makefile is setup to look in the default locations, so you could rule this out by installing CUDA using the runfile installer and accept all defaults. You can install cuda properly by referring to the linux getting started guide:

[url]http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#abstract[/url]

(refer to section on runfile install)

and downloading the proper runfile installer from here:

[url]https://developer.nvidia.com/cuda-downloads[/url]

  1. this concerns me:

-L/usr/local/cuda/lib

that switch is telling g++ where to look for the CUDA libraries. That is correct for a 32-bit environment, but not for a 64-bit environment. Is your linux OS a 32-bit OS or a 64-bit OS? If 32-bit, that command is correct. If 64 bit, probably not. If 64-bit, are there any configure switches for that package that tell it to build for a 64-bit environment? Because for 64-bit, that makefile is misconfigured. The switch should be:

-L/usr/local/cuda/lib64

I installed the .run file as specified with no luck, files seem to be in default locations as in .deb.

I changed the configure file to look at -L/usr/local/cuda/lib64 instead with no avail.

I’m going to try to install a 32 bit ubuntu and/or legacy toolkit to see if this resolves issue.

Here is the new make output if you have any suggestions: http://pastebin.com/raw.php?i=K7Z4zwz4

Thank you for your help :))

There’s one more thing I see amiss. Some versions of gcc/g++ tend to be more persnickety than other versions concerning this. The library/object link order is wrong:

g++ -I/usr/local/cuda/include -I/common/inc -L/usr/local/cuda/bin -L/usr/local/cuda/lib64 -L/lib -L/common/lib/linux -lcuda -lcudart -o autodock4 main.o libad.a -lm select_alloc_wrapper.o eval_wrapper.o

With gcc/g++, you are supposed to specify objects that have library dependencies before the libraries that they depend on. If you google “g++ library link order” you’ll find various attestations to this. Here is one example:

[url]http://www.network-theory.co.uk/docs/gccintro/gccintro_18.html[/url]

So the above command should really be:

g++ -I/usr/local/cuda/include -I/common/inc main.o libad.a select_alloc_wrapper.o eval_wrapper.o -L/usr/local/cuda/bin -L/usr/local/cuda/lib64 -L/lib -L/common/lib/linux -lm -lcuda -lcudart -o autodock4

Again, this would be a misunderstanding of whoever built the make file or the configure process.

Another possibility is that the nvcc being called is mismatched to the library in question - i.e. the nvcc being used is one in some other place besides /usr/local/cuda/bin

If you only have one CUDA version on your machine, this is unlikely to be the issue. But if you have multiple versions and have not updated the environment variable PATH properly, this could be causing the problem. It could also be a problem if somebody has moved some other nvcc version to a place like /usr/bin or something like that (which would be unusual).

Interesting with the g++, I’ll check it out if the below information suggests that. And yes, I only have one version of CUDA on my machine. I restore a clean backup every time I try something new to avoid potential problems.

So after a bunch of trials I decided to go with Ubuntu 10.04 32bit with CUDA 5.5.22 just to make sure that the problems aren’t due to depreciated software. Turns out I made a lot of progress but still having problems.

The configure went fine, however during make i got a bunch of warnings such as “warning: deprecated conversion from string constant to ‘char*’”, all of which is listed in the “Make console output” below. This concerns me as I am already using legacy software.

I did “make install” and low and behold I have an executable! Problem is…it doesn’t run correctly (of course it wouldn’t be that easy!). I get a bunch of “CUDA ERROR 23 = unspecified launch failure” fails when I use the program

configure output file: http://pastebin.com/raw.php?i=2LmMggY2
Make output file: http://pastebin.com/raw.php?i=mMVNdsf7
Make console output (even when i specified to output to file?): http://pastebin.com/raw.php?i=WUMCU8pE
Make install output file: http://pastebin.com/raw.php?i=NG1TYgh0
Program output: http://pastebin.com/raw.php?i=6JUBDd3n

Plus the program output is complete junk. I get positive binding affinities along with…infinite energies. Haha.

Is it possible that this legacy software just doesn’t agree with my GTX 760? What else could be the problem assuming that this software once worked before?

Also sorry if it isn’t clear or comes off as rude, I haven’t got much sleep. Your help is invaluable and very much appreciated.