mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > FermatSearch

Reply
 
Thread Tools
Old 2019-02-27, 12:38   #1
SELROC
 

104368 Posts
Default Searching program for fermat factors

I got ppsieve-cl.zip is this good for gpu on linux ?
  Reply With Quote
Old 2019-02-27, 13:46   #2
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by SELROC View Post
I got ppsieve-cl.zip is this good for gpu on linux ?
It's a bit outdated. gfndsieve (from the mtsieve offered by rogue) does a better job if you work on N > 5000; otherwise you can use mmff (small N and GPU) and Feromant_CUDA.

PM or email me (l DOT morelli AT moreware DOT org) for more advice.

Luigi
ET_ is offline   Reply With Quote
Old 2019-02-28, 10:36   #3
SELROC
 

23·1,187 Posts
Default

Quote:
Originally Posted by ET_ View Post
It's a bit outdated. gfndsieve (from the mtsieve offered by rogue) does a better job if you work on N > 5000; otherwise you can use mmff (small N and GPU) and Feromant_CUDA.

PM or email me (l DOT morelli AT moreware DOT org) for more advice.

Luigi



Found gfndsieve.
Fails compilation on Debian.
Later I post the error log.
  Reply With Quote
Old 2019-03-01, 12:45   #4
SELROC
 

2×5×919 Posts
Default

Quote:
Originally Posted by SELROC View Post
Found gfndsieve.
Fails compilation on Debian.
Later I post the error log.

Compilation on Debian 9.8


$ make
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/App.o core/App.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/FactorApp.o core/FactorApp.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/AlgebraicFactorApp.o core/AlgebraicFactorApp.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/Clock.o core/Clock.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/Parser.o core/Parser.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/Worker.o core/Worker.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/HashTable.o core/HashTable.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/main.o core/main.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o core/SharedMemoryItem.o core/SharedMemoryItem.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o opencl/Device.o opencl/Device.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o opencl/Kernel.o opencl/Kernel.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o opencl/KernelArgument.o opencl/KernelArgument.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o opencl/ErrorChecker.o opencl/ErrorChecker.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/EratBig.o sieve/EratBig.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/EratSmall.o sieve/EratSmall.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/PreSieve.o sieve/PreSieve.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/PrimeGenerator.o sieve/PrimeGenerator.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/PrimeSieve.o sieve/PrimeSieve.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/Wheel.o sieve/Wheel.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/popcount.o sieve/popcount.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/nthPrime.o sieve/nthPrime.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/EratMedium.o sieve/EratMedium.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/ParallelPrimeSieve.o sieve/ParallelPrimeSieve.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/CpuInfo.o sieve/CpuInfo.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/SieveOfEratosthenes.o sieve/SieveOfEratosthenes.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/iterator.o sieve/iterator.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/api.o sieve/api.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o sieve/SievingPrimes.o sieve/SievingPrimes.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_mod_init_fini.o x86_asm/fpu_mod_init_fini.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_mulmod.o x86_asm/fpu_mulmod.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_powmod.o x86_asm/fpu_powmod.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_push_pop.o x86_asm/fpu_push_pop.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_powmod_4b_1n_4p.o x86_asm/fpu_powmod_4b_1n_4p.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_mulmod_iter.o x86_asm/fpu_mulmod_iter.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_mulmod_iter_4a.o x86_asm/fpu_mulmod_iter_4a.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/fpu_mulmod_4a_4b_4p.o x86_asm/fpu_mulmod_4a_4b_4p.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/sse_mod_init_fini.o x86_asm/sse_mod_init_fini.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/sse_powmod_4b_1n_4p.o x86_asm/sse_powmod_4b_1n_4p.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/sse_mulmod_4a_4b_4p.o x86_asm/sse_mulmod_4a_4b_4p.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_set_a.o x86_asm/avx_set_a.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_set_b.o x86_asm/avx_set_b.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_get.o x86_asm/avx_get.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_compute_reciprocal.o x86_asm/avx_compute_reciprocal.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_compare.o x86_asm/avx_compare.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_mulmod.o x86_asm/avx_mulmod.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o x86_asm/avx_powmod.o x86_asm/avx_powmod.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o alternating_factorial/AlternatingFactorialApp.o alternating_factorial/AlternatingFactorialApp.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o alternating_factorial/AlternatingFactorialWorker.o alternating_factorial/AlternatingFactorialWorker.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o alternating_factorial/afsieve.o alternating_factorial/afsieve.S
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -c -o alternating_factorial/AlternatingFactorialGpuWorker.o alternating_factorial/AlternatingFactorialGpuWorker.cpp
g++ -Isieve -m64 -Wall -O2 -std=c++11 -DHAVE_GPU_WORKERS -lstdc++ -o afsieve core/App.o core/FactorApp.o core/AlgebraicFactorApp.o core/Clock.o core/Parser.o core/Worker.o core/HashTable.o core/main.o core/SharedMemoryItem.o opencl/Device.o opencl/Kernel.o opencl/KernelArgument.o opencl/ErrorChecker.o sieve/EratBig.o sieve/EratSmall.o sieve/PreSieve.o sieve/PrimeGenerator.o sieve/PrimeSieve.o sieve/Wheel.o sieve/popcount.o sieve/nthPrime.o sieve/EratMedium.o sieve/ParallelPrimeSieve.o sieve/CpuInfo.o sieve/SieveOfEratosthenes.o sieve/iterator.o sieve/api.o sieve/SievingPrimes.o x86_asm/fpu_mod_init_fini.o x86_asm/fpu_mulmod.o x86_asm/fpu_powmod.o x86_asm/fpu_push_pop.o x86_asm/fpu_powmod_4b_1n_4p.o x86_asm/fpu_mulmod_iter.o x86_asm/fpu_mulmod_iter_4a.o x86_asm/fpu_mulmod_4a_4b_4p.o x86_asm/sse_mod_init_fini.o x86_asm/sse_powmod_4b_1n_4p.o x86_asm/sse_mulmod_4a_4b_4p.o x86_asm/avx_set_a.o x86_asm/avx_set_b.o x86_asm/avx_get.o x86_asm/avx_compute_reciprocal.o x86_asm/avx_compare.o x86_asm/avx_mulmod.o x86_asm/avx_powmod.o alternating_factorial/AlternatingFactorialApp.o alternating_factorial/AlternatingFactorialWorker.o alternating_factorial/afsieve.o alternating_factorial/AlternatingFactorialGpuWorker.o -lpthread
/usr/bin/ld: opencl/Device.o: in function `Device::~Device()':
Device.cpp:(.text+0x35): undefined reference to `clReleaseContext'
/usr/bin/ld: opencl/Device.o: in function `Device::GetDevicesForPlatform(platform_t*)':
Device.cpp:(.text+0x22a): undefined reference to `clCreateContextFromType'
/usr/bin/ld: Device.cpp:(.text+0x27a): undefined reference to `clGetContextInfo'
/usr/bin/ld: Device.cpp:(.text+0x2ab): undefined reference to `clGetDeviceIDs'
/usr/bin/ld: Device.cpp:(.text+0x300): undefined reference to `clGetContextInfo'
/usr/bin/ld: Device.cpp:(.text+0x395): undefined reference to `clGetDeviceInfo'
/usr/bin/ld: Device.cpp:(.text+0x3c5): undefined reference to `clGetDeviceInfo'
/usr/bin/ld: Device.cpp:(.text+0x400): undefined reference to `clGetDeviceInfo'
/usr/bin/ld: Device.cpp:(.text+0x430): undefined reference to `clGetDeviceInfo'
/usr/bin/ld: opencl/Device.o: in function `Device::GetPlatforms()':
Device.cpp:(.text+0x48c): undefined reference to `clGetPlatformIDs'
/usr/bin/ld: Device.cpp:(.text+0x53f): undefined reference to `clGetPlatformInfo'
/usr/bin/ld: Device.cpp:(.text+0x576): undefined reference to `clGetPlatformInfo'
/usr/bin/ld: Device.cpp:(.text+0x5a9): undefined reference to `clGetPlatformInfo'
/usr/bin/ld: opencl/Device.o: in function `Device::Device()':
Device.cpp:(.text+0x778): undefined reference to `clGetPlatformIDs'
/usr/bin/ld: opencl/Kernel.o: in function `Kernel::~Kernel()':
Kernel.cpp:(.text+0xd): undefined reference to `clReleaseKernel'
/usr/bin/ld: Kernel.cpp:(.text+0x16): undefined reference to `clReleaseProgram'
/usr/bin/ld: Kernel.cpp:(.text+0x1f): undefined reference to `clReleaseCommandQueue'
/usr/bin/ld: opencl/Kernel.o: in function `Kernel::SetGPUInput()':
Kernel.cpp:(.text+0x125): undefined reference to `clSetKernelArg'
/usr/bin/ld: opencl/Kernel.o: in function `Kernel::Execute(unsigned int)':
Kernel.cpp:(.text+0x246): undefined reference to `clEnqueueNDRangeKernel'
/usr/bin/ld: opencl/Kernel.o: in function `Kernel::Kernel(Device*, char const*, char const**, bool)':
Kernel.cpp:(.text+0x46b): undefined reference to `clCreateCommandQueueWithProperties'
/usr/bin/ld: Kernel.cpp:(.text+0x4a6): undefined reference to `clCreateProgramWithSource'
/usr/bin/ld: Kernel.cpp:(.text+0x502): undefined reference to `clBuildProgram'
/usr/bin/ld: Kernel.cpp:(.text+0x51d): undefined reference to `clCreateKernel'
/usr/bin/ld: Kernel.cpp:(.text+0x57d): undefined reference to `clGetKernelWorkGroupInfo'
/usr/bin/ld: Kernel.cpp:(.text+0x65e): undefined reference to `clGetProgramBuildInfo'
/usr/bin/ld: opencl/KernelArgument.o: in function `KernelArgument::~KernelArgument()':
KernelArgument.cpp:(.text+0xe): undefined reference to `clReleaseMemObject'
/usr/bin/ld: opencl/KernelArgument.o: in function `KernelArgument::Initialize(gpu_dir_t, void*, int, int)':
KernelArgument.cpp:(.text+0x90): undefined reference to `clCreateBuffer'
/usr/bin/ld: opencl/KernelArgument.o: in function `KernelArgument::WriteToGPU(_cl_command_queue*)':
KernelArgument.cpp:(.text+0x477): undefined reference to `clEnqueueWriteBuffer'
/usr/bin/ld: opencl/KernelArgument.o: in function `KernelArgument::ReadFromGPU(_cl_command_queue*)':
KernelArgument.cpp:(.text+0x4d7): undefined reference to `clEnqueueReadBuffer'
collect2: error: ld returned 1 exit status
makefile:121: recipe for target 'afsieve' failed
make: *** [afsieve] Error 1
  Reply With Quote
Old 2019-03-01, 13:37   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3×1,973 Posts
Default

Use "make gfndsieve" from the command line. gfndsieve does not have an OpenCL code.
rogue is offline   Reply With Quote
Old 2019-03-01, 14:05   #6
SELROC
 

100102 Posts
Default

Quote:
Originally Posted by rogue View Post
Use "make gfndsieve" from the command line. gfndsieve does not have an OpenCL code.

Done. Same error. verbatim.
  Reply With Quote
Old 2019-03-01, 14:55   #7
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by SELROC View Post
Done. Same error. verbatim.
Open the makefile.
change ENABLE_GPU=yes to ENABLE_GPU=no
save the makefile
make gfndsieve
ET_ is offline   Reply With Quote
Old 2019-03-07, 11:54   #8
SELROC
 

66548 Posts
Default

Sorry but I WANT a gpu program. The purpose was to compute with my gpus......
  Reply With Quote
Old 2019-03-07, 18:12   #9
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by SELROC View Post
Sorry but I WANT a gpu program. The purpose was to compute with my gpus......
There are many programs that use GPUs. Unfortunately they (still) don't use OpenCL.
ET_ is offline   Reply With Quote
Old 2019-03-07, 18:43   #10
SELROC
 

22×32×7×29 Posts
Default

Quote:
Originally Posted by ET_ View Post
There are many programs that use GPUs. Unfortunately they (still) don't use OpenCL.

Ciao ET_


Unfortunately I don't own any CUDA gpus.


But we could start by quantifying the effort needed to port the software to OpenCL...
  Reply With Quote
Old 2019-03-08, 20:29   #11
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

476610 Posts
Default

Quote:
Originally Posted by SELROC View Post
Ciao ET_


Unfortunately I don't own any CUDA gpus.


But we could start by quantifying the effort needed to port the software to OpenCL...
Mfakto is the opencl version of mfaktc.
Mmff.exe is based on mfaktc

We can start from here :)
ET_ is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Fermat factors philmoore FermatSearch 302 2020-06-30 10:20
Program for searching all odd-16-digit Aliquot cycles Drdmitry Aliquot Sequences 302 2016-05-11 02:17
Fermat number and Modulo for searching divisors CyD Factoring 4 2011-05-31 11:24
best Fermat search space program wanted jasong Programming 0 2007-10-03 20:34
will searching for factors sometimes be faster than LL test? ixfd64 Math 3 2003-10-16 22:15

All times are UTC. The time now is 03:28.

Tue Sep 29 03:28:30 UTC 2020 up 19 days, 39 mins, 0 users, load averages: 1.58, 1.72, 1.68

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.