mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2019-07-05, 06:51   #1530
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2·2,861 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
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;
}
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 here) 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 clGetDeviceInfo() isn't always consistent.
A better way would be to find a way to not need a list of names.
henryzz is offline   Reply With Quote
Old 2019-07-05, 22:23   #1531
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

230210 Posts
Default

Quote:
Originally Posted by henryzz View Post
A better way would be to find a way to not need a list of names.
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.

Last fiddled with by ixfd64 on 2019-07-05 at 22:23
ixfd64 is offline   Reply With Quote
Old 2019-07-06, 00:46   #1532
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

17·347 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
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.
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?
rogue is offline   Reply With Quote
Old 2019-07-14, 04:16   #1533
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

1000111111102 Posts
Default

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.
ixfd64 is offline   Reply With Quote
Old 2019-07-29, 04:29   #1534
SELROC
 

683510 Posts
Default

mfakto: https://www.mersenne.org/report_expo...7825411&full=1


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)

Last fiddled with by SELROC on 2019-07-29 at 04:41
  Reply With Quote
Old 2019-09-13, 08:53   #1535
tului
 
Jan 2013

10001002 Posts
Default

Quote:
Originally Posted by ixfd64 View Post
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.
I certainly hope so.
tului is offline   Reply With Quote
Old 2019-09-26, 19:35   #1536
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2×1,151 Posts
Default

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

Last fiddled with by ixfd64 on 2019-09-26 at 19:35
ixfd64 is offline   Reply With Quote
Old 2019-09-26, 20:35   #1537
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

32×103 Posts
Default

That's good news, thanks!
Rodrigo is offline   Reply With Quote
Old 2019-09-26, 22:46   #1538
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2·1,151 Posts
Default

I thought I'd share a script that users might find useful. For those with multi-GPU systems, start-mfakto.sh allows multiple mfakto instances to be launched from a single copy of mfakto. You'll first need to create a folder called device-<device number> for each device. For example, you'll need to create the sub-folders device-0 through device-3 in your mfakto folder on a system with four GPUs. You can then run ./start-mfakto.sh <device number> 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 SHARED_SETTINGS variable to false if you want a separate mfakto.ini file for each GPU. This is useful if you want each device to use specific settings. You can also do the same with the SHARED_KERNEL 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.

A few more notes:
  • Device numbers don't always start with 0 on some computers. You'll need to experiment with mfakto's -d 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.
Attached Files
File Type: zip start-mfakto.zip (623 Bytes, 33 views)

Last fiddled with by ixfd64 on 2019-09-26 at 23:45
ixfd64 is offline   Reply With Quote
Old 2019-10-29, 17:54   #1539
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

1011110010112 Posts
Default

If anyone has benchmarks for any of the Radeon RX 5700-series cards I would very much appreciate them, please submit here:
https://www.mersenne.ca/mfaktc.php#benchmark
James Heinrich is offline   Reply With Quote
Old 2019-10-30, 04:28   #1540
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

1000111111102 Posts
Default

Anyone else having trouble with the -d c and -d g options?

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

Code:
Error -43 (Invalid build options): clBuildProgram
ERROR: load_kernels(0) failed
I'm unable to get -d g 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

Last fiddled with by ixfd64 on 2019-10-30 at 04:28
ixfd64 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
gpuOwL: an OpenCL program for Mersenne primality testing preda GpuOwl 2470 2020-09-18 23:06
mfaktc: a CUDA program for Mersenne prefactoring TheJudger GPU Computing 3311 2020-09-16 13:00
LL with OpenCL msft GPU Computing 433 2019-06-23 21:11
OpenCL for FPGAs TObject GPU Computing 2 2013-10-12 21:09
Program to TF Mersenne numbers with more than 1 sextillion digits? Stargate38 Factoring 24 2011-11-03 00:34

All times are UTC. The time now is 10:20.

Sat Sep 19 10:20:02 UTC 2020 up 9 days, 7:31, 0 users, load averages: 1.26, 1.49, 1.56

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.