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 2019-06-01 00:36

Got a Ryzen 5 2400G up, which probably has the fastest integrated gpu out there at the moment...
[code]
Resulting speed for M74000077:
bit_min - bit_max GHz-days/day kernelname
60 - 69 228.758 cl_barrett15_69_gs
69 - 70 217.379 cl_barrett15_71_gs
70 - 73 193.854 cl_barrett15_73_gs
73 - 76 182.299 cl_barrett32_76_gs
76 - 77 172.009 cl_barrett32_77_gs
77 - 81 171.178 cl_barrett15_82_gs
81 - 87 165.730 cl_barrett32_87_gs
87 - 88 155.828 cl_barrett32_88_gs
88 - 92 144.272 cl_barrett32_92_gs
[/code]

ixfd64 2019-06-05 23:56

I've noticed a small issue: on my Mac Pro, pressing Ctrl + C twice does not immediately terminate the program. The message telling users they can press Ctrl + C again to stop mfakto only appears after the current class finishes. I'm not sure whether this affects other operating systems.

Rodrigo 2019-06-06 03:20

[QUOTE=ixfd64;518670]I've noticed a small issue: on my Mac Pro, pressing Ctrl + C twice does not immediately terminate the program. The message telling users they can press Ctrl + C again to stop mfakto only appears after the current class finishes. I'm not sure whether this affects other operating systems.[/QUOTE]
Yup, it works the same way in Windows (7).

ixfd64 2019-06-07 20:26

Another minor issue: AMD no longer supports the APP SDK and has removed it from their website. See: [url]https://community.amd.com/thread/228059#comment-2866963[/url]

The readme and makefile should be updated.

kriesel 2019-06-07 22:08

[QUOTE=ixfd64;518820]Another minor issue: AMD no longer supports the APP SDK and has removed it from their website. See: [URL]https://community.amd.com/thread/228059#comment-2866963[/URL]

The readme and makefile should be updated.[/QUOTE]
For Windows however, while the main SDK page does not show it, there is a set of links in [url]https://community.amd.com/thread/203821[/url]

mnd9 2019-06-21 19:38

Hi all, attempting to run mfakto on an ATI HD 4650 which should be supported per the documentation, I can get it to run fine, but anytime I enable GPU sieving I get a boatload of error messages. I'm using the 0.15pre6 binaries from mersenne.ca, see this excerpt:

[QUOTE]
Runtime options
Inifile mfakto.ini
Verbosity 1
SieveOnGPU yes
MoreClasses yes
GPUSievePrimes 4096
GPUSieveProcessSize 24Ki bits
WARNING: GPUSieveSize=4M must be a multiple of GPUSieveProcessSize=24k, adjusting GPUSieveSize to 6M
GPUSieveSize 6Mi 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 2
GPUType VLIW5
SmallExp no
UseBinfile mfakto_Kernels.elf
Compiletime options

Select device - Get device info:

WARNING: Device does not support atomic operations. This may lead to errors when multiple factors are found in the same block. Possible errors include reporting just one of the factors, or (less likely) scrambled factors. If the reported factor(s) are not accepted by primenet, please re-run this test on the CPU, or on a GPU with atomics.

OpenCL device info
name ATI RV730 (Advanced Micro Devices, Inc.)
device (driver) version OpenCL 1.0 AMD-APP (937.2) (CAL 1.4.1734)
maximum threads per block 128
maximum threads per grid 2097152
number of multiprocessors 8 (640 compute elements)
clock rate 700MHz

Automatic parameters
threads per grid 0
optimizing kernels for VLIW5

Loading binary kernel file mfakto_Kernels.elf

Cannot use binary kernel: its build options (-I. -DVECTOR_SIZE=2 -DVLIW5 -O3 -DMORE_CLASSES) are different than the current build options (-I. -DVECTOR_SIZE=2 -DVLIW5 -O3 -DMORE_CLASSES -DCL_GPU_SIEVE). Rebuilding kernels.
Compiling kernels.

BUILD OUTPUT
".\common.cl", line 31: warning: unrecognized #pragma #pragma "Enabling printf"

".\common.cl", line 44: warning: unrecognized #pragma #pragma "Emulating popcount"

".\common.cl", line 60: warning: unrecognized #pragma #pragma "No double precision available"

".\common.cl", line 73: warning: unrecognized #pragma #pragma "Replacing atomic_inc by non-atomics"

".\common.cl", line 81: warning: unrecognized #pragma #pragma "Emulating amd_bitalign"

".\common.cl", line 94: warning: unrecognized #pragma #pragma "Emulating amd_max3"

".\gpusieve.cl", line 96: warning: integer conversion resulted in a change of sign
1<<16, 1<<17, 1<<18, 1<<19, 1<<20, 1<<21, 1<<22, 1<<23, 1<<24, 1<<25, 1<<26, 1<<27, 1<<28, 1<<29, 1<<30, 1<<31,

".\gpusieve.cl", line 216: error: write to < 32 bits via pointer not allowed unless cl_khr_byte_addressable_store is enabled locsieve8[bclr >> 3] |= 1 << (bclr & 7);

".\gpusieve.cl", line 224: error: write to < 32 bits via pointer not allowed unless cl_khr_byte_addressable_store is enabled if (! (val & mask)) locsieve8[bytenum] = val | mask;
[/QUOTE]

ixfd64 2019-06-21 20:13

Try updating your drivers. I believe mfakto does not officially support OpenCL 1.0.

mnd9 2019-06-21 20:27

[QUOTE=ixfd64;519745]Try updating your drivers. I believe mfakto does not officially support OpenCL 1.0.[/QUOTE]

I have the most up to date drivers per the AMD website (catalyst 13.9), and the HD 4000 series should be supported per the mfakto documentation.

I also don't quite understand the nomenclature re OpenCL versions--according to GPU-Z my "platform version" of OpenCL is 1.2 AMD-APP (937.2) while the "version" is OpenCL 1.0 AMD-APP (937.2).

Is there a way to get newer drivers aside from AMD directly?

kracker 2019-06-21 21:36

[QUOTE=mnd9;519747]I have the most up to date drivers per the AMD website (catalyst 13.9), and the HD 4000 series should be supported per the mfakto documentation.

I also don't quite understand the nomenclature re OpenCL versions--according to GPU-Z my "platform version" of OpenCL is 1.2 AMD-APP (937.2) while the "version" is OpenCL 1.0 AMD-APP (937.2).

Is there a way to get newer drivers aside from AMD directly?[/QUOTE]


May not help, but try running older mfakto versions(0.13/0.14)


EDIT: Also set the VectorSize to 4 in the ini, if I recall correctly it's faster for pre-GCN cards.

mnd9 2019-06-21 23:59

[QUOTE=kracker;519756]May not help, but try running older mfakto versions(0.13/0.14)


EDIT: Also set the VectorSize to 4 in the ini, if I recall correctly it's faster for pre-GCN cards.[/QUOTE]

I get similar errors on older versions including 0.14, 0.13 and the "0.12 hd 4000" special version. I'll try changing the vector size and see if that works...

ixfd64 2019-07-04 05:56

I'd like to propose a change to the GPU detection code.

mfakto currently uses if-then statements for each family of devices:

[CODE]if (strstr(deviceinfo.d_name, "Capeverde") || // 7730, 7750, 7770, 8760, 8740, R7 250X
strstr(deviceinfo.d_name, "Pitcairn") || // 7850, 7870, 8870
strstr(deviceinfo.d_name, "Bonaire") || // 7790, R7 260, R7 260X
strstr(deviceinfo.d_name, "Oland") || // 8670, 8570, R9 240, R9 250
strstr(deviceinfo.d_name, "Sun") || // 85x0M
strstr(deviceinfo.d_name, "Mars") || // 86x0M, 87x0M
strstr(deviceinfo.d_name, "Venus") || // 88x0M
strstr(deviceinfo.d_name, "Saturn") || // 8930M, 8950M
strstr(deviceinfo.d_name, "Neptune") || // 8970M, 8990M
strstr(deviceinfo.d_name, "Curacao") || // R9 265, R9 270, R9 270X
strstr(deviceinfo.d_name, "Tonga") || // R9 285
strstr(deviceinfo.d_name, "Hainan") || // R9 285
strstr(deviceinfo.d_name, "Kalindi") // GCN APU, Kabini, R7 ???
)
{
mystuff.gpu_type = GPU_GCN;
}[/CODE]

However, good programming practice dictates that static values should be defined as constants. Therefore, I want to turn each group of devices names into an array (as described [url=https://mersenneforum.org/showpost.php?p=520224&postcount=5]here[/url]) so that anyone who wants to add a device only has to add a string to an array. Does anyone have any objections?

I also want to use this opportunity to add newer GPUs to the list of detected devices. If you have a GPU that mfakto doesn't recognize, please feel free to post the name here. I'm aware Wikipedia has a fairly complete list of AMD GPUs, but the name returned by [c]clGetDeviceInfo()[/c] isn't always consistent.


All times are UTC. The time now is 22:00.

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