Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation failed with cuda issue #5

Closed
maplesond opened this issue Jan 25, 2018 · 3 comments
Closed

compilation failed with cuda issue #5

maplesond opened this issue Jan 25, 2018 · 3 comments

Comments

@maplesond
Copy link

I was trying to install gem3 mapper via gembs and encountered the following issue that seems to be related to cuda.

... <log other gembs installation tools> ...

cd gem3-mapper; ./configure;
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gzopen in -lz... yes
checking for BZ2_bzReadOpen in -lbz2... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking omp.h usability... yes
checking omp.h presence... yes
checking for omp.h... yes
checking whether gcc supports -flto... yes
checking whether gcc supports -fuse-linker-plugin... yes
checking nvcc in /usr/local/cuda/bin... yes
checking for /usr/local/cuda/lib64... yes
checking for main in -lcuda... yes
checking for main in -lcudart... yes
checking for /usr/local/cuda/include... yes
checking cuda.h usability... yes
checking cuda.h presence... yes
checking for cuda.h... yes
checking cuda_runtime.h usability... yes
checking cuda_runtime.h presence... yes
checking for cuda_runtime.h... yes
configure: creating ./config.status
config.status: creating Makefile.mk
make --directory=gem3-mapper
make[1]: Entering directory '/home/dan/software/gemBS/tools/gem3-mapper'
make --directory=resources release
make[2]: Entering directory '/home/dan/software/gemBS/tools/gem3-mapper/resources'
make --directory=gem-cutter release
make[3]: Entering directory '/home/dan/software/gemBS/tools/gem3-mapper/resources/gem-cutter'
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_index.c -o build/gpu_fmi_index.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_table.c -o build/gpu_fmi_table.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_primitives.c -o build/gpu_fmi_primitives.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_primitives_decode.c -o build/gpu_fmi_primitives_decode.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_primitives_ssearch.c -o build/gpu_fmi_primitives_ssearch.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_fmi_primitives_asearch.c -o build/gpu_fmi_primitives_asearch.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_sa_index.c -o build/gpu_sa_index.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_sa_primitives.c -o build/gpu_sa_primitives.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_bpm_primitives_filter.c -o build/gpu_bpm_primitives_filter.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_bpm_primitives_align.c -o build/gpu_bpm_primitives_align.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_kmer_primitives_filter.c -o build/gpu_kmer_primitives_filter.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_commons.c -o build/gpu_commons.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_buffer.c -o build/gpu_buffer.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_errors.c -o build/gpu_errors.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_io.c -o build/gpu_io.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_sample.c -o build/gpu_sample.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_module.c -o build/gpu_module.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_devices.c -o build/gpu_devices.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_index.c -o build/gpu_index.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
gcc -Ofast -march=native -flto -std=c99 -Wall  -c src/gpu_reference.c -o build/gpu_reference.o -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda -lcudart -lstdc++ -lrt
/usr/local/cuda/bin/nvcc -O3 -m64 -Xptxas="-dlcm=ca" -gencode arch=compute_20,code=\"sm_20,compute_20\" -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=\"sm_50,compute_50\" -gencode arch=compute_52,code=\"sm_52,compute_52\" -gencode arch=compute_60,code=\"sm_60,compute_60\" -gencode arch=compute_61,code=\"sm_61,compute_61\" -gencode arch=compute_62,code=\"sm_62,compute_62\" -c src/gpu_fmi_decode.cu -o build/gpu_fmi_decode.o
nvcc fatal   : Unsupported gpu architecture 'compute_20'
Makefile:90: recipe for target 'build/gpu_fmi_decode.o' failed
make[3]: *** [build/gpu_fmi_decode.o] Error 1
make[3]: Leaving directory '/home/dan/software/gemBS/tools/gem3-mapper/resources/gem-cutter'
Makefile:17: recipe for target 'release' failed
make[2]: *** [release] Error 2
make[2]: Leaving directory '/home/dan/software/gemBS/tools/gem3-mapper/resources'
Makefile:32: recipe for target 'release' failed
make[1]: *** [release] Error 2
make[1]: Leaving directory '/home/dan/software/gemBS/tools/gem3-mapper'
Makefile:28: recipe for target 'release' failed
make: *** [release] Error 2

Error while compiling gemBS. That is very unfortunate.
A possible reason might be a missing dependency. Please take a look at the lines
before this one. You need the following programs and libraries installed to compile
the gemBS.
Programms needed:
    * make
    * gcc
Libraris needed:
    * python-dev (the python headers and include files)
    * libbz2-dev (for bz compression support)
On a Debian/Ubuntu system you should be able to get all needed dependencies with:
sudo apt-get install make gcc python-dev libbz2-dev

Any suggestions for a fix?

@smarco
Copy link
Owner

smarco commented Jan 28, 2018 via email

@achacond
Copy link
Contributor

Daniel,
Are you using a CUDA version higher than 8.5?
In that case let me try to upload a fix for the gem-cutter module.
Regards,

@maplesond
Copy link
Author

Thanks for the suggested workaround @smarco that seems to work. In case it helps improve your build system, I had previously tried "--enable-cuda=no" in the configure script, which made the configure script work (at least it completed successfully and created the makefiles) but then failed during compilation.

@achacond On my home machine, I have a Gigabyte NVIDIA GeForce GTX 760 4096MB (1084/3004MHz) card and am running the latest cuda toolkit 9.1. If I can get CUDA working that would be great, assuming it delivers a significant speed up, but not to worry too much if not. I recently tried installing on our HPC at work (where CUDA was not available) and had no problems installing the software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants