mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   mfaktc: a CUDA program for Mersenne prefactoring (https://www.mersenneforum.org/showthread.php?t=12827)

James Heinrich 2017-12-12 03:19

I've heard of MISFIT but never used it. Tell me what needs to be changed to the API for my site and I'll make it work.

bayanne 2017-12-12 12:03

I finally managed to get mfaktc running on my Mac, with a lot of kind assistance from TheJudger. He asked me to post the method here, in case there are any other Mac users who wished to run TF on their Mac using the GPU.
I am running an iMac using Mac OSX 10.11.6 El Capitan which is running an Nvidia GeForce GTX 775M.

1. Download Xcode and install
2. Download Cuda 8.0 Toolkit (version 9.0 is only for OSX 10.12 and later) and install
3. Download mfaktc-0.21.tar.gz and unpack and place the folder on your desktop
4. You then need to modify the Makefile which is in the src subdirectory as follows

Change from

[CODE]
CFLAGS = -Wall -Wextra -O2 $(CUDA_INCLUDE) -malign-double CFLAGS_EXTRA_SIEVE = -funroll-all-loops
[/CODE]

to

[CODE]
CFLAGS = -Wall -Wextra -O2 $(CUDA_INCLUDE) CFLAGS_EXTRA_SIEVE =
[/CODE]

You have to remove/comment the line which contains

[CODE]
NVCCFLAGS += --generate-code arch=compute_11,code=sm_11
[/CODE]

because CUDA 8 completely dropped support for the first gen CUDA capable GPUs (e.g. Geforce 8000, 9000 and 200 series).

You may want to add

[CODE]
NVCCFLAGS += --generate-code arch=compute_60,code=sm_60 # CC 6.x GPUs will use this code
[/CODE]

which enables code generation for the current Pascal series GPUs (e.g. Geforce 1000 series).

nvcc is located in a different location than expected by the makefile, thus /usr/local/cuda/bin so you would need to define the path with the following statement:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}

You also need to advise the makefile of the path to lcudart so the following needs to be added to the start of the Makefile

# where is the CUDA Toolkit installed?
CUDA_DIR = /usr/local/cuda
CUDA_INCLUDE = -I$(CUDA_DIR)/include/
CUDA_LIB = -L$(CUDA_DIR)/lib/

This may already been in the makefile, in which case amend /lib64/ to /lib/

5. Now open Terminal and cd to the src subdirectory and then type

make clean
make

This should then produce a file mfaktc.exe in the top directory of mfaktc-0.21

6. Now run

./mfaktc.exe in Terminal which will run a short selftest. If it reports no problems, it will tell you there is nothing to do.

Then run

./mfaktc.exe –st which will run a longer selftest.

If this completes the selftest without a single error, then it is time to get some real work.

7. The file mfaktc.ini contains the settings, and you need to amend V5UserID
and Computer ID to those that you intend to use.

8. You then need to grab some exponents to test, from either the Manual Testing section of GIMPs or from [url]www.GPU72.com[/url]. Add these to a new file called worktodo.txt which should be added to the top directory.

9. Now start running mfaktc.exe in Terminal with the command ./mfaktc.exe

That should be that.

Thanks oince again to TheJudger :cool:

TheJudger 2017-12-22 19:48

[QUOTE=TheJudger;473504]Hi,

guess this won't hurt many users for now: mfaktc + CUDA [B][U]9[/U][/B].0 + [B][U]Volta[/U][/B] architecture doesn't work. (CUDA 9.0 + Pascal seems to work fine, didn't test older architectures). For now it is unclear whether this is a bug within mfaktc or in CUDA.

Oliver[/QUOTE]

[QUOTE=TheJudger;473583]Currently I'm 99% sure it is the famous sub.cc/subc 0 bug [B][COLOR="Red"]again[/COLOR][/B].
[URL="http://mersenneforum.org/showpost.php?p=402488&postcount=2549"]http://mersenneforum.org/showpost.php?p=402488&postcount=2549[/URL]

Oliver[/QUOTE]

Yep, bug in CUDA [B]9.0[/B] and [B]9.1[/B] for [B]Volta[/B] architecture....

Oliver

moebius 2017-12-31 05:29

contradictory output in results.txt at mfaktc-0.21
 
M332538901 has a factor: 38814612911305349835664385407 [TF:76:77:mfaktc 0.21 barrett87_mul32_gs]
no factor for M332538901 from 2^76 to 2^77 [mfaktc 0.21 barrett87_mul32_gs]


Of course, the server did not accept the first result, but this is very strange....

ATH 2017-12-31 05:57

The factor is not correct:

2[sup]332538901[/sup] - 1 = 36146327836316851267023636988 (mod 38814612911305349835664385407)

axn 2017-12-31 07:00

That is a valid (composite) factor of M3321928619

38814612911305349835664385407 = 797262868561 x 48684837137044687

Mod(2,38814612911305349835664385407)^3321928619 == 1

TheJudger 2017-12-31 12:28

Hi moebius,
[LIST][*]is this reproduceable for your setup?[*]default config (mfaktc.ini) or altered settings?[*]did this happen on a long run (several assignments without restart of mfaktc or right after the first assignment after (re-)start)?[*]which GPU?[/LIST]
As axn already mentioned: this is a valid (composite) factor for M3321928619. Why M3321928619? Because this is part of the builtin selftest which is run on every (re-)start of mfaktc. Somehow the result from the selftest isn't cleared and shown after an assignment finished. This was reported 2(?) times before, I didn't figure out why this happens yet.

Oliver

moebius 2017-12-31 13:32

1) Sorry, I don't want to try because it takes to long. I eventually have to go back to mfaktc-0.19 because of the overheating problem. (Cuda driver crashes after a few minutes of mfaktc-running)

2) one assignment with several restarts of mfaktc because of overheating errors
"ERROR: cudaGetLastError() returned 30: unknown error" and "ERROR: cudaGetLastError() returned 77: an illegal memory access was encountered"
3) default config (mfaktc.ini).

4)

mfaktc v0.21 (64bit built)

Compiletime options
THREADS_PER_BLOCK 256
SIEVE_SIZE_LIMIT 32kiB
SIEVE_SIZE 193154bits
SIEVE_SPLIT 250
MORE_CLASSES enabled

Runtime options
SievePrimes 25000
SievePrimesAdjust 1
SievePrimesMin 5000
SievePrimesMax 100000
NumStreams 3
CPUStreams 3
GridSize 3
GPU Sieving enabled
GPUSievePrimes 82486
GPUSieveSize 64Mi bits
GPUSieveProcessSize 16Ki bits
Checkpoints enabled
CheckpointDelay 30s
WorkFileAddDelay 600s
Stages enabled
StopAfterFactor bitlevel
PrintMode full
V5UserID (none)
ComputerID (none)
AllowSleep no
TimeStampInResults no

CUDA version info
binary compiled for CUDA 8.0
CUDA runtime version 8.0
CUDA driver version 8.0

CUDA device info
name GeForce GTX 560 Ti
compute capability 2.1
max threads per block 1024
max shared memory per MP 49152 byte
number of multiprocessors 8
CUDA cores per MP 48
CUDA cores - total 384
clock rate (CUDA cores) 1800MHz
memory clock rate: 2004MHz
memory bus width: 256 bit

Automatic parameters
threads per grid 1048576
GPUSievePrimes (adjusted) 82486
GPUsieve minimum exponent 1055144

running a simple selftest...
Selftest statistics
number of tests 107
successfull tests 107

TheJudger 2017-12-31 16:37

Does the card really overheat or is it just bad (broken) hardware?

Oliver

moebius 2017-12-31 17:06

Yes it's because of overheating, The temperatures rise sometimes over 100°C and no i don't think the card is defect, I let run CUDALucas as well on it... also for LL double check.
At a certain temperature, the GRAKA(CUDA)-driver simply crashes. Thats all, not so dramatic...

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

kladner 2017-12-31 18:40

Out of curiosity, did the report of a factor have only one line in results.txt? I have found that a "single line factor" is always spurious and happens when pushing the overclock too hard.


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

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