data61 / cuda-fixnum

Extended-precision modular arithmetic library that targets CUDA.
Other
41 stars 28 forks source link

At Master branch, make failed with errors #68

Closed Chenfengldw closed 5 years ago

Chenfengldw commented 5 years ago

At master branch, run: $ make bench and got errors: ...... .......

./src/functions/modexp.cu(109): error: identifier "__shfl_sync" is undefined detected during: instantiation of "cuFIXNUM::modexp::modexp(cuFIXNUM::modexp::fixnum, cuFIXNUM::modexp::fixnum) [with modnum_tp=cuFIXNUM::modnum_monty_cios<cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>>]" bench/bench.cu(47): here instantiation of "void my_modexp::operator()(my_modexp::fixnum &, my_modexp::fixnum) [with modnum=cuFIXNUM::modnum_monty_cios<cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>>]" ./src/array/fixnum_array.cu(262): here instantiation of "void cuFIXNUM::dispatch<Func,fixnum,Args...>(int, Args...) [with Func=modexp_cios, fixnum=cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>, Args=<cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum> , cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum> >]" ./src/array/fixnum_array.cu(294): here instantiation of "void cuFIXNUM::fixnum_array::map<Func,Args...>(Args...) [with fixnum=cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>, Func=modexp_cios, Args=<cuFIXNUM::fixnum_array<cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>> , cuFIXNUM::fixnum_array<cuFIXNUM::warp_fixnum<256, cuFIXNUM::u64_fixnum>> >]" bench/bench.cu(85): here instantiation of "void bench<fn_bytes,word_fixnum,Func>(int) [with fn_bytes=256, word_fixnum=cuFIXNUM::u64_fixnum, Func=modexp_cios]" bench/bench.cu(120): here instantiation of "void bench_func(const char *, int) [with Func=modexp_cios]" bench/bench.cu(150): here

69 errors detected in the compilation of "/tmp/tmpxft_000031dd_00000000-9_bench.cpp1.ii". Makefile:22: recipe for target 'bench/bench' failed

My system is ubuntu 16.04 and I tried cuda 7.5 and cuda 10.1, but both end up with these errors.

unzvfu commented 5 years ago

Thanks for raising the issue @Chenfengldw. Could you please post the output of the commands nvidia-smi and nvcc --version? Thanks.

Chenfengldw commented 5 years ago

Thanks for your reply!

Command output: $ nvidia-smi

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 108... Off | 00000000:05:00.0 Off | N/A | | 27% 49C P2 87W / 250W | 1644MiB / 11178MiB | 27% Default | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX 108... Off | 00000000:09:00.0 Off | N/A | | 28% 50C P2 92W / 250W | 761MiB / 11178MiB | 34% Default | +-------------------------------+----------------------+----------------------+ | 2 GeForce GTX 108... Off | 00000000:85:00.0 Off | N/A | | 25% 46C P2 75W / 250W | 2689MiB / 11178MiB | 33% Default | +-------------------------------+----------------------+----------------------+ | 3 GeForce GTX 108... Off | 00000000:89:00.0 Off | N/A | | 26% 47C P2 79W / 250W | 761MiB / 11178MiB | 31% Default | +-------------------------------+----------------------+----------------------+

$ nvcc --version

nvcc10: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Apr_24_19:10:27_PDT_2019 Cuda compilation tools, release 10.1, V10.1.168

Chenfengldw commented 5 years ago

This issue is caused by my own environment setting, which used an old version of cuda (7.5). Build successfully with cuda 10.1.