smarco / gem3-mapper

GEM-Mapper v3
GNU General Public License v3.0
56 stars 17 forks source link

compilation failed with cuda issue #5

Closed maplesond closed 6 years ago

maplesond commented 6 years ago

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 commented 6 years ago

Daniel,

The GPU architecture you have is not supported by gem3 (Unsupported gpu architecture 'compute_20'). In that case, the mapper must be compiled without GPU support. That is:

cd gem3-mapper ./configure make HAVE_CUDA=0 all

Give it a try and let me know. Best,

On Thu, Jan 25, 2018 at 6:54 PM, Daniel Mapleson notifications@github.com wrote:

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

... ...

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?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/smarco/gem3-mapper/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdvbfGA0sVBB5ii2uZgbRrro4EAguPkks5tOL_rgaJpZM4RtPjQ .

--

Santiago Marco-Sola

achacond commented 6 years ago

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 commented 6 years ago

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.