mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   mfakto: an OpenCL program for Mersenne prefactoring (https://www.mersenneforum.org/showthread.php?t=15646)

kracker 2014-07-08 22:39

1 Attachment(s)
:smile:

Mark Rose 2014-07-08 23:31

[QUOTE=kracker;377707]:smile:[/QUOTE]

Beautiful :)

Thanks!

kracker 2014-07-11 01:02

Finally got it recognized, it would only appear in clinfo if the iGPU was the primary active display... ugh

[code]
mfakto 0.15pre1-MGW (64bit build)


Runtime options
Inifile mfakto.ini
Verbosity 1
SieveOnGPU yes
MoreClasses yes
GPUSievePrimes 111157
GPUSieveProcessSize 24Ki bits
GPUSieveSize 96Mi bits
FlushInterval 8
WorkFile worktodo.txt
ResultsFile results.txt
Checkpoints enabled
CheckpointDelay 300s
Stages enabled
StopAfterFactor class
PrintMode compact
V5UserID none
ComputerID none
TimeStampInResults yes
VectorSize 4
GPUType AUTO
SmallExp no
UseBinfile mfakto_Kernels.elf
Compiletime options

Select device - Get device info:

OpenCL device info
name Intel(R) HD Graphics 4600 (Intel(R) Corporation)
device (driver) version OpenCL 1.2 (10.18.10.3621)
maximum threads per block 512
maximum threads per grid 134217728
number of multiprocessors 20 (20 compute elements)
clock rate 1200MHz

Automatic parameters
threads per grid 256
optimizing kernels for INTEL

Compiling kernels.

BUILD OUTPUT
In file included from :81:
.\barrett.cl:2040:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2065:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2123:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2124:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^
.\barrett.cl:2187:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2212:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2270:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2271:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^
.\barrett.cl:2334:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2359:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2417:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2418:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^
.\barrett.cl:2481:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2506:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2564:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2565:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^
.\barrett.cl:2628:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2653:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2711:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2712:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^
.\barrett.cl:2775:3: error: use of undeclared identifier 'cl_uint'
cl_uint num_c;
^
.\barrett.cl:2800:3: error: use of undeclared identifier 'num_c'
num_c = NUM_CLASSES % (total_bit_count + 1000000);
^
.\barrett.cl:2858:32: error: use of undeclared identifier 'num_c'
my_k_base.d0 = k_base.d0 + num_c * k_delta; // k_delta can exceed 2^24: don't use mul24/mad24 for it
^
.\barrett.cl:2859:39: error: use of undeclared identifier 'num_c'
my_k_base.d1 = k_base.d1 + mul_hi(num_c, k_delta) - AS_UINT_V(k_base.d0 > my_k_base.d0); /* k is limited to 2^64 -1 so there is no need for k.d2 */
^

error: front end compiler failed build.
END OF BUILD OUTPUT
ERROR: load_kernels(0) failed
[/code]

Prime95 2014-07-11 01:46

Try replacing cl_uint with uint.

kracker 2014-07-11 02:39

1 Attachment(s)
[QUOTE=Prime95;377839]Try replacing cl_uint with uint.[/QUOTE]

Well, that fixed the errors.

EDIT: Just on a whim, I ran it with admin privileges. It works. WTF? Once kernels are compiled it seems to be fine...
EDIT2: Now it doesn't recompile (same error) hmm...

Bdot 2014-07-11 10:59

[QUOTE=kracker;377837]
[code].\barrett.cl:2040:3: error: use of undeclared identifier 'cl_uint'

[/code][/QUOTE]
sorry ... fixed now.

The other error is clearly an out-of-memory on the host. Too many things running?

Bdot 2014-07-11 11:22

[QUOTE=kracker;377842]
EDIT2: Now it doesn't recompile (same error) hmm...[/QUOTE]
Well, possible that your driver does not support writing binary kernels. I improved the error handling ...

kracker 2014-07-11 14:32

1 Attachment(s)
[QUOTE=Bdot;377868]Well, possible that your driver does not support writing binary kernels. I improved the error handling ...[/QUOTE]

Hmm, I don't know. I tried it on my i3-3220(HD2500) and it compiles fine, so I transferred the compiled kernel back and it seems to work... Probably something with my computer.(the i3 has a slightly older driver)

Also.... :whistle:

kracker 2014-07-11 14:36

Also:
:smile:
[code]
gcc -m64 -Wall -O3 -funroll-loops -ffast-math -finline-functions -frerun-loop-opt -fgcse-sm -fgcse-las -flto -I/opt/AMDAPP/include -DBUILD_OPENCL -c mfakto.cpp -o mfakto.o
mfakto.cpp: In function 'int load_kernels(cl_int*)':
mfakto.cpp:916:5: error: expected ';' before '}' token
}
^
mfakto.cpp:1016:18: error: 'numDevices' was not declared in this scope
for(i = 0; i < numDevices; i++)
^
mfakto.cpp:1018:8: error: 'binaries' was not declared in this scope
if(binaries != NULL && binaries[i] != NULL)
^
mfakto.cpp:1024:6: error: 'binaries' was not declared in this scope
if(binaries != NULL)
^
mfakto.cpp:1029:6: error: 'binarySizes' was not declared in this scope
if(binarySizes != NULL)
^
make: *** [mfakto.o] Error 1
[/code]

Bdot 2014-07-11 19:43

[QUOTE=kracker;377878]Also:
:smile:
[/QUOTE]
Oh-oh, things like these happen when in a hurry without checking ... even the smallest fix can introduce new bugs :gah:

kracker 2014-07-11 20:52

[QUOTE=Bdot;377863]sorry ... fixed now.

The other error is clearly an out-of-memory on the host. Too many things running?[/QUOTE]

That was the first thing I checked. VRAM is/was fine, I had 6GB free memory on the RAM when I tried it.


All times are UTC. The time now is 23:04.

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