mersenneforum.org  

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

Reply
 
Thread Tools
Old 2017-12-12, 03:19   #2784
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

11·311 Posts
Default

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.
James Heinrich is offline   Reply With Quote
Old 2017-12-12, 12:03   #2785
bayanne
 
bayanne's Avatar
 
"Tony Gott"
Aug 2002
Yell, Shetland, UK

14C16 Posts
Default

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
to

Code:
CFLAGS = -Wall -Wextra -O2 $(CUDA_INCLUDE) CFLAGS_EXTRA_SIEVE =
You have to remove/comment the line which contains

Code:
NVCCFLAGS += --generate-code arch=compute_11,code=sm_11
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
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 www.GPU72.com. 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
bayanne is offline   Reply With Quote
Old 2017-12-22, 19:48   #2786
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11×101 Posts
Default

Quote:
Originally Posted by TheJudger View Post
Hi,

guess this won't hurt many users for now: mfaktc + CUDA 9.0 + Volta 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:
Originally Posted by TheJudger View Post
Currently I'm 99% sure it is the famous sub.cc/subc 0 bug again.
http://mersenneforum.org/showpost.ph...postcount=2549

Oliver
Yep, bug in CUDA 9.0 and 9.1 for Volta architecture....

Oliver
TheJudger is offline   Reply With Quote
Old 2017-12-31, 05:29   #2787
moebius
 
moebius's Avatar
 
Jul 2009
Germany

607 Posts
Thumbs down 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....
moebius is offline   Reply With Quote
Old 2017-12-31, 05:57   #2788
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·1,579 Posts
Default

The factor is not correct:

2332538901 - 1 = 36146327836316851267023636988 (mod 38814612911305349835664385407)
ATH is offline   Reply With Quote
Old 2017-12-31, 07:00   #2789
axn
 
axn's Avatar
 
Jun 2003

10011110110102 Posts
Default

That is a valid (composite) factor of M3321928619

38814612911305349835664385407 = 797262868561 x 48684837137044687

Mod(2,38814612911305349835664385407)^3321928619 == 1
axn is online now   Reply With Quote
Old 2017-12-31, 12:28   #2790
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

45716 Posts
Default

Hi moebius,
  • 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?

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
TheJudger is offline   Reply With Quote
Old 2017-12-31, 13:32   #2791
moebius
 
moebius's Avatar
 
Jul 2009
Germany

607 Posts
Default

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

Last fiddled with by moebius on 2017-12-31 at 13:33
moebius is offline   Reply With Quote
Old 2017-12-31, 16:37   #2792
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11×101 Posts
Default

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

Oliver
TheJudger is offline   Reply With Quote
Old 2017-12-31, 17:06   #2793
moebius
 
moebius's Avatar
 
Jul 2009
Germany

607 Posts
Default

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...

44714303
moebius is offline   Reply With Quote
Old 2017-12-31, 18:40   #2794
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

1015810 Posts
Default

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.
kladner is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
mfakto: an OpenCL program for Mersenne prefactoring Bdot GPU Computing 1676 2021-06-30 21:23
The P-1 factoring CUDA program firejuggler GPU Computing 753 2020-12-12 18:07
gr-mfaktc: a CUDA program for generalized repunits prefactoring MrRepunit GPU Computing 32 2020-11-11 19:56
mfaktc 0.21 - CUDA runtime wrong keisentraut Software 2 2020-08-18 07:03
World's second-dumbest CUDA program fivemack Programming 112 2015-02-12 22:51

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


Mon Aug 2 14:11:03 UTC 2021 up 10 days, 8:40, 0 users, load averages: 4.27, 3.89, 3.29

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.