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)

henryzz 2019-07-05 06:51

[QUOTE=ixfd64;520708]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.[/QUOTE]

A better way would be to find a way to not need a list of names.

ixfd64 2019-07-05 22:23

[QUOTE=henryzz;520774]A better way would be to find a way to not need a list of names.[/QUOTE]

Yes, I agree it would ultimately be better to select the kernel based on the GPU's feature set rather than its name. Unfortunately, I don't know enough about OpenCL to do that yet.

rogue 2019-07-06 00:46

[QUOTE=ixfd64;520828]Yes, I agree it would ultimately be better to select the kernel based on the GPU's feature set rather than its name. Unfortunately, I don't know enough about OpenCL to do that yet.[/QUOTE]

You must know enough about the GPUs in the list to know that they have the features used by your kernel. Do you know which features work or do not work on which GPUs?

ixfd64 2019-07-14 04:16

Anyone know if Bdot is OK?

He hasn't been on this forum in about a year. I sent him an e-mail the other day and but haven't gotten a response.

SELROC 2019-07-29 04:29

mfakto: [URL]https://www.mersenne.org/report_exponent/?exp_lo=187825411&full=1[/URL]


M187825411 has a factor: 92098860826246978039471 (76.285601 bits, 23.271040 GHz-d)

found 1 factor for M187825411 from 2^76 to 2^77 (partially tested) [mfakto 0.15pre6 cl_barrett15_82_gs_2]
tf(): time spent since restart: 1h 25m 42.178s
estimated total time spent: 1h 57m 17.066s (285.72 GHz-days / day)

tului 2019-09-13 08:53

[QUOTE=ixfd64;521574]Anyone know if Bdot is OK?

He hasn't been on this forum in about a year. I sent him an e-mail the other day and but haven't gotten a response.[/QUOTE]

I certainly hope so.

ixfd64 2019-09-26 19:35

Bdot recently submitted some P-1 results. So he's probably fine, just really busy in real life.

Rodrigo 2019-09-26 20:35

That's good news, thanks!

ixfd64 2019-09-26 22:46

1 Attachment(s)
I thought I'd share a script that users might find useful. For those with multi-GPU systems, [c]start-mfakto.sh[/c] allows multiple mfakto instances to be launched from a single copy of mfakto. You'll first need to create a folder called [C]device-<device number>[/C] for each device. For example, you'll need to create the sub-folders [C]device-0[/C] through [C]device-3[/C] in your mfakto folder on a system with four GPUs. You can then run [C]./start-mfakto.sh <device number>[/C] on launch an instance. If no device number is specified, then the script will simply call mfakto from its root folder.

This script works by creating symbolic links to your mfakto executable and configuration file. It also uses a lock file to prevent the user from accidentally running more than one instance on the same device. Once the mfakto instance terminates, the symbolic links and lock file are deleted. You can set the [c]SHARED_SETTINGS[/c] variable to [C]false[/C] if you want a separate [C]mfakto.ini[/C] file for each GPU. This is useful if you want each device to use specific settings. You can also do the same with the [c]SHARED_KERNEL[/c] variable if you want each instance to use its own kernel file.

I'll try to port this script to Windows If I ever get access to a Windows system with multiple GPUs.

[B]A few more notes:[/B]
[LIST][*]Device numbers don't always start with 0 on some computers. You'll need to experiment with mfakto's [c]-d[/c] to see which numbers map to which devices.[*]I've only tested this script on macOS, but it should work on any Unix-like system.[/LIST]

James Heinrich 2019-10-29 17:54

If anyone has benchmarks for any of the Radeon RX 5700-series cards I would very much appreciate them, please submit here:
[url]https://www.mersenne.ca/mfaktc.php#benchmark[/url]

ixfd64 2019-10-30 04:28

Anyone else having trouble with the [C]-d c[/C] and [C]-d g[/C] options?

On all my computers except a Windows laptop, [C]-d c[/C] gives this error:

[CODE]Error -43 (Invalid build options): clBuildProgram
ERROR: load_kernels(0) failed[/CODE]

I'm unable to get [C]-d g[/C] to work on any computer regardless of operating system. It gives me this error every time:

[CODE]Select device - Error: Only <number> platforms found. Cannot use platform 1000 (bad parameter to option -d).
ERROR: init_CL(3, 10000) failed[/CODE]


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

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