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)

DrobinsonPE 2020-10-04 15:38

I was given an old laptop with a broken hinge that still works with an external display. It is an I3-3110M with 8GB ram, HDD, and Windows 10 1909. After using a can of air to blow the dust out, updating windows (really slow process on a hdd) and installing prime95, I was not expecting much. Prime95 is running a 59.2M exponent at 15.3ms/itt, about 12.5GHZ-d/d. That is actually better than I thought it would be because most benchmarking results say that the I3-3110M is slower that the J4105 and my J4105 is doing about 8GHz-d/d. My kill-a-watt is connected to a different computer that I do not want to shut down yet so I do not have power draw info.

Things got a little strange when I downloaded and ran mfakto 0.15pre7. Mfakto started right up first try on a -st with no configuration or fiddling required. However prime95 dropped from 15.3ms/itt to 19.4ms/itt and task manager showed prime95 drop from 51% to 47% CPU utilization. The command prompt process (mfakto) was at 24% CPU utilization. I have never seen mfakto use the CPU before. I looked through mfakto.ini and the compile information when mfakto starts and it states that it is using sieve on gpu. Has anyone seen this before?

With prime95 also running mfakto completed a TF on a 210M exponent 72 to 73 bit at 11.78GHz-d/d. Prime95 at 19.4ms/itt is about 9.9GHz-d/d so the combined output is about 21.68GHz-d/d.

James Heinrich 2020-10-04 15:50

[QUOTE=DrobinsonPE;558858]I have never seen mfakto use the CPU before. I looked through mfakto.ini and the compile information when mfakto starts and it states that it is using sieve on gpu. Has anyone seen this before?[/QUOTE]In [i]mfakto.ini[/i] check for [c]SieveOnGPU=1[/c], and on startup check for [c]SieveOnGPU yes[/c] on the screen under "Runtime Options" at the start of output. Have you set GPUType in [i]mfakto.ini[/i]? What does it detect it as? Perhaps a copy-paste of the startup output would be helpful in debugging.

DrobinsonPE 2020-10-04 23:06

1 Attachment(s)
[QUOTE=James Heinrich;558860]In [i]mfakto.ini[/i] check for [c]SieveOnGPU=1[/c], and on startup check for [c]SieveOnGPU yes[/c] on the screen under "Runtime Options" at the start of output. Have you set GPUType in [i]mfakto.ini[/i]? What does it detect it as? Perhaps a copy-paste of the startup output would be helpful in debugging.[/QUOTE]

Here is the startup output. I also attached a picture showing mfakto at over 25% CPU utilization. I stopped prime95 so mfakto is the only thing running.

[QUOTE]C:\Users\User1\mfakto>mfakto
mfakto 0.15pre7-MGW (64bit build)


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

Select device - Get device info:

OpenCL device info
name Intel(R) HD Graphics 4000 (Intel(R) Corporation)
device (driver) version OpenCL 1.2 (10.18.10.4358)
maximum threads per block 512
maximum threads per grid 134217728
number of multiprocessors 16 (16 compute elements)
clock rate 1000 MHz

Automatic parameters
threads per grid 0
optimizing kernels for INTEL

Loading binary kernel file mfakto_Kernels.elf
Compiling kernels.
GPUSievePrimes (adjusted) 81206
GPUsieve minimum exponent 1037054
Started a simple selftest ...
Selftest statistics
number of tests 30
successful tests 30

selftest PASSED!

got assignment: exp=210305443 bit_min=72 bit_max=73 (4.55 GHz-days)
Starting trial factoring M210305443 from 2^72 to 2^73 (4.55 GHz-days)
Using GPU kernel "cl_barrett32_76_gs_2"
Date Time | class Pct | time ETA | GHz-d/day Sieve Wait
Oct 04 15:55 | 0 0.1% | 34.669 9h14m | 11.81 81206 0.00%[/QUOTE]

Aramis Wyler 2020-10-05 18:03

It looks to me like that laptop either does not have an onboard video card (just the intel integrated graphics) or the integrated graphics is device 1. Either way I don't think you're hitting the gpu there.

kriesel 2020-10-05 18:37

1 Attachment(s)
[CODE]OpenCL device info
name Intel(R) HD Graphics 4000 (Intel(R) Corporation)
device (driver) version OpenCL 1.2 (10.18.10.4358)
maximum threads per block 512
maximum threads per grid 134217728
number of multiprocessors 16 (16 compute elements)
clock rate 1000 MHz[/CODE]HD4000 is the integrated graphics processor.
The i3-3110M is a 2-core with HT cpu. [URL]https://ark.intel.com/content/www/us/en/ark/products/65700/intel-core-i3-3110m-processor-3m-cache-2-40-ghz.html[/URL]. Mfakto is using almost a full hyperthread and should not be. Look further at mfakto.ini etc.

I have a similar situation with mfakto v0.15pre6, i5-7500U, Win10 but the mfakto cpu usage is ~12% indicated in Task Manager (half a hyperthread on this 2-core+HT system) while the prime95 cpu usage is 25% (one actual core instead of the 2 threads configured)

[CODE]OpenCL device info
name Intel(R) HD Graphics 620 (Intel(R) Corporation)
device (driver) version OpenCL 2.1 NEO (26.20.100.8142)
maximum threads per block 256
maximum threads per grid 16777216
number of multiprocessors 24 (24 compute elements)
clock rate 1050MHz[/CODE]HWMonitor indicates 79% cpu utilization (maybe of 2 complete cores, although it shows individual utilization for 4 equals) while Task Manager indicates 41% (of 4 hyperthreads).
Stopping mfakto returns prime95 to 2 cores usage and Task Manager indicating 50% cpu utilization for prime95 (2 cores, 2 out of 4 hyperthreads)

The IGP uses ~9W of the 15W package TDP while prime95 gets ~5W as mfakto runs, and the IGP drops to <0.1watt when mfakto is terminated, which makes the indicated cpu utilization of prime95 jump to 50% and cpu TDP near 15W.

Sieveongpu=1
Experimenting with FlushInterval made no difference.

DrobinsonPE 2020-10-06 03:39

5 Attachment(s)
Yes the laptop only has integrated graphics. Mfakto documentation states it works on HD4000 graphics so why not try it? I took some screenshots of mfakto, prime95, taskmanager, resource manager, HWmonitor and GPUZ all running in different configurations. Does any of this provide useful information?

Mfakto should be only running on the iGPU but shows up as a process on the CPU. I checked and this does not happen on my J4105 with UHD600 graphics. This is about the extent of my testing knowledge right now. It is an interesting issue but not really an important issue to resolve from the big picture point of view.

LaurV 2020-10-06 04:54

Mfakto (and any other process launched, unless deliberately hidden) WILL show up in task manager. There is no way around it. Check your J4105 task manager screen better. What may differ is the amount of CPU resources it needs, so on that one, if almost no resource is used, it is at the end of the list and you can't see it (or launched by other user, or at startup by the system? do you have "show processes from all users" enabled?). Sort the list by name.

Anyhow, there is a big difference between running Mfakt(o/c) on dedicated gpu, with its own memory ans stuff, and running it in the IGP on your CPU - even if the CPU has IGP, there is no memory inside of the CPU, all processing, ALU or IG, need access to the external RAM, and there is where the things get tricky, because intense use of IG [U]will[/U] take resources and bandwidth, slowing down your CPU even if they are "separate" things in theory.

DrobinsonPE 2020-10-06 05:30

LaurV, yes you are correct. I found Mfakto as a CPU process on the J4105 with a 0% CPU usage. The reason I posted the question is I have two CPUs with integrated GPUs. Both are running the exact same version of mfajto.

J4105, UHD600 graphics, mfakto, 100% IGPU usage, 0% CPU usage
I3-3110M, HD4000 graphics, mfakto, 100% IGPU usage, 25% CPU usage

why?
Does it matter? Not really. My IGPU output is a rounding error for a discrete GPU.
I was intrigued! That is why I asked the question.

LaurV 2020-10-06 05:47

No idea why the difference. The UHD600 may be cleverer in this respect. I remember a similar discussion in the past about this, but I can't point you to it, it may be in this very topic or in mfaktc thread, but reading those million pages is scary. People with better knowledge than me may answer. I don't use Mfakto/OpenCL much either, everybody knows here that I am the Nvidia/Windows guy (not much of Linux, AMD, etc, well... at least, this was before Radeon VII era; since that proved to be the best LL/PRP card, and Mihai's gpuOwl started beating cudaLucas consistently, I am (extremely) slowly catching up).

James Heinrich 2020-10-06 10:16

[QUOTE=DrobinsonPE;559008]J4105, UHD600 graphics, mfakto, 100% IGPU usage, 0% CPU usage
I3-3110M, HD4000 graphics, mfakto, 100% IGPU usage, 25% CPU usage[/QUOTE]I don't have the answer, but I could speculate that the older HD4000 either doesn't have the requisite hardware feature (or at least is not detected as such) to enable GPU sieving. And yet it shows that it's using a GPU-sieving kernel (has "_gs" in the kernel name). It clearly shouldn't be using a full core of CPU.

You can try running [c]mfakto --perftest[/c] and see if that happens to reveal anything interesting.

DrobinsonPE 2020-10-07 02:51

[QUOTE=James Heinrich;559028]You can try running [c]mfakto --perftest[/c] and see if that happens to reveal anything interesting.[/QUOTE]

Thank you for the suggestion. I ran [c]mfakto --perftest[/c]. It produced a large amount of text that I went through and did not see anything of interest. It first ran the sieve on the CPU then recompiled to sieve on the GPU. There was a lot of raw data output and then it presented a bunch of tables showing the output speed of each different kernel for a large range of exponents. I did not see any warnings or errors so I can only assume that the program is working properly.

The CPU usage must have something to do with what LaurV said about the IGPU using the resources and bandwidth of the CPU or what you said about the older IGPU not having a needed hardware feature. It is still fun to see that mfakto can run and produce a little work on an old, half-broken, free laptop.


All times are UTC. The time now is 14:16.

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