mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2021-01-28, 09:31   #1
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

2×401 Posts
Default yafu doesn't build with CUDA enabled

I'm trying to build yafu with CUDA enabled, and I'm getting the following compile error:

Code:
gcc -g -DUSE_NFS -DHAVE_CUDA -O3 -fomit-frame-pointer -Wall  -I. -Iinclude -Itop/aprcl -I../gmp/include -I../../ecm/ecm/include/linux -I/usr/local/cuda-11.2/targets/x86_64-linux/include/ -c -o factor/qs/tdiv.o factor/qs/tdiv.c
factor/qs/tdiv.c: In function ‘trial_divide_Q_siqs’:
factor/qs/tdiv.c:204:4: error: too few arguments to function ‘buffer_relation’
  204 |    buffer_relation(offset,large_prime,smooth_num+1,
      |    ^~~~~~~~~~~~~~~
In file included from factor/qs/tdiv.c:22:
include/qs.h:604:6: note: declared here
  604 | void buffer_relation(uint32 offset, uint32 *large_prime, uint32 num_factors,
      |      ^~~~~~~~~~~~~~~
factor/qs/tdiv.c:65:14: warning: unused variable ‘f64’ [-Wunused-variable]
   65 |  uint64 q64, f64;
      |              ^~~
make: *** [Makefile:303: factor/qs/tdiv.o] Error 1
This is CUDA-specific, as it's within a HAVE_CUDA block.
Happy5214 is offline   Reply With Quote
Old 2021-01-28, 14:08   #2
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,617 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
I'm trying to build yafu with CUDA enabled, and I'm getting the following compile error:

Code:
gcc -g -DUSE_NFS -DHAVE_CUDA -O3 -fomit-frame-pointer -Wall  -I. -Iinclude -Itop/aprcl -I../gmp/include -I../../ecm/ecm/include/linux -I/usr/local/cuda-11.2/targets/x86_64-linux/include/ -c -o factor/qs/tdiv.o factor/qs/tdiv.c
factor/qs/tdiv.c: In function ‘trial_divide_Q_siqs’:
factor/qs/tdiv.c:204:4: error: too few arguments to function ‘buffer_relation’
  204 |    buffer_relation(offset,large_prime,smooth_num+1,
      |    ^~~~~~~~~~~~~~~
In file included from factor/qs/tdiv.c:22:
include/qs.h:604:6: note: declared here
  604 | void buffer_relation(uint32 offset, uint32 *large_prime, uint32 num_factors,
      |      ^~~~~~~~~~~~~~~
factor/qs/tdiv.c:65:14: warning: unused variable ‘f64’ [-Wunused-variable]
   65 |  uint64 q64, f64;
      |              ^~~
make: *** [Makefile:303: factor/qs/tdiv.o] Error 1
This is CUDA-specific, as it's within a HAVE_CUDA block.
Sorry, the CUDA code in yafu is very old, didn't ever really work, and hasn't been maintained. In short, don't use it. I will remove at some point.

Note that this is separate from gpu-msieve or gpu-ecm... if you build those with GPU enabled I believe yafu will use them as normal. You don't have to include any kind of cuda directive to yafu builds to do so.

Last fiddled with by bsquared on 2021-01-28 at 14:10
bsquared is offline   Reply With Quote
Old 2021-01-29, 01:42   #3
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

11001000102 Posts
Default

Quote:
Originally Posted by bsquared View Post
Sorry, the CUDA code in yafu is very old, didn't ever really work, and hasn't been maintained. In short, don't use it. I will remove at some point.

Note that this is separate from gpu-msieve or gpu-ecm... if you build those with GPU enabled I believe yafu will use them as normal. You don't have to include any kind of cuda directive to yafu builds to do so.
That solved the compilation issue (rather, just commenting out the compiler flag from the Makefile, since I still needed the library arguments), but I now have a couple of linking errors.Both are related to GMP-ECM, and I'm not even sure if the second is a yafu issue (though GMP-ECM itself built OK):
Code:
happy5214@happy5214-focus:~/rps/progs/src/yafu/yafu$ make x NFS=1 USE_AVX2=1 CUDA=1
gcc -g -DUSE_AVX2 -DUSE_SSE41 -march=core-avx2 -m64 -DUSE_NFS -O3 -fomit-frame-pointer -Wall  -I. -Iinclude -Itop/aprcl -I../gmp/include -I../../ecm/ecm/include/linux -I/usr/local/cuda-11.2/targets/x86_64-linux/include/ factor/qs/msieve/lanczos.o factor/qs/msieve/lanczos_matmul0.o factor/qs/msieve/lanczos_matmul1.o factor/qs/msieve/lanczos_matmul2.o factor/qs/msieve/lanczos_pre.o factor/qs/msieve/sqrt.o factor/qs/msieve/savefile.o factor/qs/msieve/gf2.o top/driver.o top/utils.o top/stack.o top/calc.o top/test.o top/aprcl/mpz_aprcl.o factor/factor_common.o factor/rho.o factor/squfof.o factor/trialdiv.o factor/tune.o factor/qs/filter.o factor/qs/tdiv.o factor/qs/tdiv_small.o factor/qs/tdiv_large.o factor/qs/tdiv_scan.o factor/qs/large_sieve.o factor/qs/new_poly.o factor/qs/siqs_test.o factor/tinyqs/tinySIQS.o factor/qs/siqs_aux.o factor/qs/smallmpqs.o factor/qs/SIQS.o factor/qs/tdiv_med_32k.o factor/qs/tdiv_resieve_32k.o factor/qs/med_sieve_32k.o factor/qs/poly_roots_32k.o factor/qs/update_poly_roots_32k.o factor/gmp-ecm/ecm.o factor/gmp-ecm/pp1.o factor/gmp-ecm/pm1.o factor/nfs/nfs.o arith/arith0.o arith/arith1.o arith/arith2.o arith/arith3.o top/eratosthenes/count.o top/eratosthenes/offsets.o top/eratosthenes/primes.o top/eratosthenes/roots.o top/eratosthenes/linesieve.o top/eratosthenes/soe.o top/eratosthenes/tiny.o top/eratosthenes/worker.o top/eratosthenes/soe_util.o top/eratosthenes/wrapper.o factor/qs/tdiv_med_32k_avx2.o factor/qs/update_poly_roots_32k_avx2.o factor/qs/med_sieve_32k_avx2.o factor/qs/tdiv_resieve_32k_avx2.o factor/qs/update_poly_roots_32k_sse4.1.o factor/qs/med_sieve_32k_sse4.1.o factor/nfs/nfs_sieving.o factor/nfs/nfs_poly.o factor/nfs/nfs_postproc.o factor/nfs/nfs_filemanip.o factor/nfs/nfs_threading.o factor/nfs/snfs.o -o yafu -L../gmp/lib/linux/x86_64 -L../../ecm/ecm/ -L../../msieve/msieve/ -lmsieve -L/usr/local/cuda-11.2/targets/x86_64-linux/lib/ -lcuda -lecm -lgmp -lpthread -lm -ldl
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `allocate_vars':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:218: multiple definition of `allocate_vars'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1370: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `free_vars':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:252: multiple definition of `free_vars'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1404: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `CompareSquare':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:290: multiple definition of `CompareSquare'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1442: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `NormalizeJS':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:307: multiple definition of `NormalizeJS'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1459: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `NormalizeJW':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:332: multiple definition of `NormalizeJW'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1484: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `JS_JW':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:359: multiple definition of `JS_JW'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1511: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `JS_2':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:387: multiple definition of `JS_2'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1539: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `JS_E':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:422: multiple definition of `JS_E'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1574: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `JacobiSum':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:460: multiple definition of `JacobiSum'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1612: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o): in function `mpz_aprtcle':
/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:485: multiple definition of `mpz_aprtcle'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1645: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:94: multiple definition of `LEVELmax'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1246: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:185: multiple definition of `aiT'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1337: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:181: multiple definition of `aiNQ'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1333: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:100: multiple definition of `aiQ'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1252: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:178: multiple definition of `aiNP'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1330: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:97: multiple definition of `aiP'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1249: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:155: multiple definition of `aiG'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1307: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(libecm_la-mpz_aprcl.o):/home/happy5214/rps/progs/src/ecm/ecm-svn/aprtcle/mpz_aprcl.c:90: multiple definition of `Qmax'; top/aprcl/mpz_aprcl.o:/home/happy5214/rps/progs/src/yafu/yafu/top/aprcl/mpz_aprcl.c:1242: first defined here
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `cuda_errCheck(cudaError, char const*, int) [clone .part.0] [clone .constprop.0]':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x14): undefined reference to `cudaGetErrorString'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `__device_stub__Z16Cuda_Init_Devicev()':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0xaf): undefined reference to `__cudaPopCallConfiguration'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0xdf): undefined reference to `cudaLaunchKernel'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `select_and_init_GPU':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x14c): undefined reference to `cudaSetDevice'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x160): undefined reference to `cudaGetDevice'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x17b): undefined reference to `cudaGetDeviceProperties'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x1aa): undefined reference to `cudaSetDeviceFlags'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x1e1): undefined reference to `__cudaPushCallConfiguration'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x1ea): undefined reference to `cudaGetLastError'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x305): undefined reference to `cudaFuncGetAttributes'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x399): undefined reference to `cudaGetErrorString'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `__device_stub__Z15Cuda_Ell_DblAddPA32_VjS1_S1_S1_j(unsigned int volatile (*) [32], unsigned int volatile (*) [32], unsigned int volatile (*) [32], unsigned int volatile (*) [32], unsigned int)':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x4cb): undefined reference to `__cudaPopCallConfiguration'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x4fe): undefined reference to `cudaLaunchKernel'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `cuda_Main':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x5a4): undefined reference to `cudaEventCreate'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x5ae): undefined reference to `cudaEventCreate'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x5ba): undefined reference to `cudaEventRecord'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x5fd): undefined reference to `cudaEventCreateWithFlags'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x617): undefined reference to `cudaEventCreateWithFlags'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x62c): undefined reference to `cudaMalloc'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x641): undefined reference to `cudaMalloc'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x656): undefined reference to `cudaMalloc'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x66b): undefined reference to `cudaMalloc'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x691): undefined reference to `cudaMemcpyToSymbol'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x6b5): undefined reference to `cudaMemcpyToSymbol'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x6d9): undefined reference to `cudaMemcpyToSymbol'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x6ff): undefined reference to `cudaMemcpyToSymbol'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x71e): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x73d): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x75c): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x779): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x7c1): undefined reference to `__cudaPushCallConfiguration'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x840): undefined reference to `__cudaPushCallConfiguration'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x88b): undefined reference to `cudaEventRecord'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x8be): undefined reference to `cudaGetLastError'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x8db): undefined reference to `cudaEventSynchronize'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x8f2): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x911): undefined reference to `cudaMemcpy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x926): undefined reference to `cudaEventDestroy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x93b): undefined reference to `cudaEventDestroy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x94d): undefined reference to `cudaFree'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x957): undefined reference to `cudaFree'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x961): undefined reference to `cudaFree'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x96b): undefined reference to `cudaFree'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x977): undefined reference to `cudaEventRecord'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x981): undefined reference to `cudaEventSynchronize'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x995): undefined reference to `cudaEventElapsedTime'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x99f): undefined reference to `cudaEventDestroy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0x9b1): undefined reference to `cudaEventDestroy'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0xa33): undefined reference to `cudaEventSynchronize'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0xa91): undefined reference to `cudaGetLastError'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `__cudaUnregisterBinaryUtil()':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text+0xc): undefined reference to `__cudaUnregisterFatBinary'
/usr/bin/ld: /usr/local/lib/libecm.a(cudakernel.o): in function `__sti____cudaRegisterAll()':
tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0xd): undefined reference to `__cudaRegisterFatBinary'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0x41): undefined reference to `__cudaRegisterFunction'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0x6f): undefined reference to `__cudaRegisterFunction'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0x99): undefined reference to `__cudaRegisterVar'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0xc1): undefined reference to `__cudaRegisterVar'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0xe9): undefined reference to `__cudaRegisterVar'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0x112): undefined reference to `__cudaRegisterVar'
/usr/bin/ld: tmpxft_000030a8_00000000-6_cudakernel.compute_75.cudafe1.cpp:(.text.startup+0x122): undefined reference to `__cudaRegisterFatBinaryEnd'
collect2: error: ld returned 1 exit status
make: *** [Makefile:293: x] Error 1
(Note: "make x" is a renamed "make x86_64", since I couldn't get that to run.)

Last fiddled with by Happy5214 on 2021-01-29 at 01:43 Reason: Clarify
Happy5214 is offline   Reply With Quote
Old 2022-01-06, 20:08   #4
Yusuf
 
Jan 2020

11 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
That solved the compilation issue (rather, just commenting out the compiler flag from the Makefile, since I still needed the library arguments), but I now have a couple of linking errors.Both are related to GMP-ECM, and I'm not even sure if the second is a yafu issue (though GMP-ECM itself built OK):
Were you able to fix this issue? I'm trying to compile yafu with CUDA-msieve and CUDA-CGBN-ecm and I'm getting the same type of errors. I tried including the CGBN and CUDA directories in the Makefile but it made no difference.

Last fiddled with by Uncwilly on 2022-01-06 at 20:34 Reason: Removed redundant quoting.
Yusuf is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
I'm trying to speedup AES MSIEVE factoring using CUDA build but... loopdemack Msieve 11 2016-01-18 13:44
32-bit CUDA build? f1pokerspeed Msieve 2 2013-12-30 01:14
Windows x64 CUDA Build Brian Gladman Msieve 12 2013-08-30 12:40
Windows build for GPU CUDA code Brian Gladman GMP-ECM 13 2013-05-13 15:00

All times are UTC. The time now is 16:51.


Sat May 21 16:51:02 UTC 2022 up 37 days, 14:52, 0 users, load averages: 1.62, 1.62, 1.43

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔