mersenneforum.org  

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

Reply
 
Thread Tools
Old 2012-07-12, 19:44   #1805
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×32×419 Posts
Default Build problems - help

I installed 64-bit Ubuntu 10.04, Cuda version 5, and mfaktc-0.18.tar.gz. I did a make. Running the built mfaktc fails all the self-tests. Where do I go from here?

BTW, I built CUDALucas 2.0.1 and it works just fine on my GTX 460.
Prime95 is online now   Reply With Quote
Old 2012-07-12, 19:47   #1806
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

722110 Posts
Default

Isn't CUDA 5 still in preview? Perhaps there's something CUDA 5 doesn't like about mfaktc. (I assume CUDALucas was built with CUDA 5? I know that it automatically targets arch_1.3, which would force CUDA < 5, so that may be why it avoided issues.)

Last fiddled with by Dubslow on 2012-07-12 at 19:47 Reason: which would...
Dubslow is offline   Reply With Quote
Old 2012-07-12, 19:58   #1807
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2·32·419 Posts
Default

A more general question from a Linux and CUDA neophyte.

What is the recommended development environment for GPU programming? Is there a Linux IDE that is integrated with CUDA debugging and profiling tools?
Prime95 is online now   Reply With Quote
Old 2012-07-12, 20:18   #1808
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2·67·73 Posts
Default

Quote:
Originally Posted by Prime95 View Post
Is there a Linux IDE that is integrated with CUDA debugging and profiling tools?
http://ydl.net/eclipse_cuda_plugin/

For those who use IDEs, Eclipse is your (Open Source) friend....
chalsall is online now   Reply With Quote
Old 2012-07-13, 08:36   #1809
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

45716 Posts
Default

Quote:
Originally Posted by Prime95 View Post
I installed 64-bit Ubuntu 10.04, Cuda version 5, and mfaktc-0.18.tar.gz. I did a make. Running the built mfaktc fails all the self-tests. Where do I go from here?

BTW, I built CUDALucas 2.0.1 and it works just fine on my GTX 460.
So it builds without much warnings (usually there are some warning in sieve.c about signed/unsigned variable mismatch)?
I guess you're using CUDA 5.0.7 (preview release), right?
Fails all the selftest -> missing factors (no factor found) or wrong factors?
I guess you're using default src/params.c and mfaktc.ini, right?

You can try to enable some debugging code in src/params.h:
  • If you enable RAW_GPU_BENCH the effect is basically that you disable the sieve code (ofcouse this slows down the application)
  • you can try to enable CHECKS_MODBASECASE and USE_DEVICE_PRINTF, this will enable debug code in the long integer division code, if something is really screwed the USE_DEVICE_PRINTF will cause overflows because of too much printfs in GPU context.

Another option to test: add -malign-double to the CFLAGS in the Makefile (default in mfaktc-0.19...). There are some known issues with CUDA/gcc about alignment of 64bit variables.

Can you provide me some lines of ./mfaktc.exe -v 2 -st? (just start it and stop after a few seconds by pressing <Ctrl>+C) and send me the screen output.

I'll try CUDA 5.0.7 later on my system.

Oliver

P.S. at least it is good to know that the selftest works...

Last fiddled with by TheJudger on 2012-07-13 at 08:37
TheJudger is offline   Reply With Quote
Old 2012-07-13, 15:33   #1810
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×32×419 Posts
Default

Quote:
Originally Posted by TheJudger View Post
So it builds without much warnings (usually there are some warning in sieve.c about signed/unsigned variable mismatch)?
I guess you're using CUDA 5.0.7 (preview release), right?
Fails all the selftest -> missing factors (no factor found) or wrong factors?
I guess you're using default src/params.c and mfaktc.ini, right?

Can you provide me some lines of ./mfaktc.exe -v 2 -st? (just start it and stop after a few seconds by pressing <Ctrl>+C) and send me the screen output.
Correct - a simple install and make without modifying anything. I'll try your debug suggestions later. Here is the output you wanted:

Code:
mfaktc v0.18 (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
  NumStreams                3
  CPUStreams                3
  GridSize                  3
  WorkFile                  worktodo.txt
  Checkpoints               enabled
  CheckpointDelay           30s
  Stages                    enabled
  StopAfterFactor           bitlevel
  PrintMode                 full
  AllowSleep                no

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

CUDA device info
  name                      GeForce GTX 460
  compute capability        2.1
  maximum threads per block 1024
  number of multiprocessors 7 (336 shader cores)
  clock rate                1502MHz

Automatic parameters
  threads per grid          917504

########## testcase 1/1557 ##########
Starting trial factoring M50804297 from 2^67 to 2^68
 k_min = 1599999998520
 k_max = 1900000000000
Using GPU kernel "71bit_mul24"
    class | candidates |    time |    ETA | avg. rate | SievePrimes | CPU wait
3387/4620 |     14.68M |  0.213s |   n.a. |  68.92M/s |       25000 |   13.45%
no factor for M50804297 from 2^67 to 2^68 [mfaktc 0.18 71bit_mul24]
ERROR: selftest failed for M50804297
  no factor found
tf(): total time spent:  0.219s

Starting trial factoring M50804297 from 2^67 to 2^68
 k_min = 1599999998520
 k_max = 1900000000000
Using GPU kernel "75bit_mul32"
    class | candidates |    time |    ETA | avg. rate | SievePrimes | CPU wait
3387/4620 |     14.68M |  0.145s |   n.a. | 101.24M/s |       28125 |    0.38%
no factor for M50804297 from 2^67 to 2^68 [mfaktc 0.18 75bit_mul32]
ERROR: selftest failed for M50804297
  no factor found
tf(): total time spent:  0.151s

Starting trial factoring M50804297 from 2^67 to 2^68
 k_min = 1599999998520
 k_max = 1900000000000
Using GPU kernel "95bit_mul32"
    class | candidates |    time |    ETA | avg. rate | SievePrimes | CPU wait
3387/4620 |     14.68M |  0.164s |   n.a. |  89.51M/s |       24609 |    0.34%
no factor for M50804297 from 2^67 to 2^68 [mfaktc 0.18 95bit_mul32]
ERROR: selftest failed for M50804297
  no factor found
tf(): total time spent:  0.170s

Starting trial factoring M50804297 from 2^67 to 2^68
 k_min = 1599999998520
 k_max = 1900000000000
Using GPU kernel "barrett79_mul32"
    class | candidates |    time |    ETA | avg. rate | SievePrimes | CPU wait
3387/4620 |     14.68M |  0.123s |   n.a. | 119.35M/s |       21532 |    0.49%
no factor for M50804297 from 2^67 to 2^68 [mfaktc 0.18 barrett79_mul32]
ERROR: selftest failed for M50804297
  no factor found
tf(): total time spent:  0.128s
Prime95 is online now   Reply With Quote
Old 2012-07-13, 15:44   #1811
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

165668 Posts
Default

Quote:
Originally Posted by TheJudger View Post
[*]If you enable RAW_GPU_BENCH the effect is basically that you disable the sieve code (ofcouse this slows down the application)[*]you can try to enable CHECKS_MODBASECASE and USE_DEVICE_PRINTF, this will enable debug code in the long integer division code
Another option to test: add -malign-double to the CFLAGS in the Makefile (default in mfaktc-0.19...).
None of these helped or diagnosed any problems.
Prime95 is online now   Reply With Quote
Old 2012-07-13, 18:16   #1812
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11×101 Posts
Default

OK, next step: I'll try CUDA 5.0.7 on my system. I'm not sure if this will happen today.

Oliver
TheJudger is offline   Reply With Quote
Old 2012-07-13, 19:05   #1813
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×32×419 Posts
Default

Quote:
Originally Posted by TheJudger View Post
OK, next step: I'll try CUDA 5.0.7 on my system. I'm not sure if this will happen today.
Thanks. No rush, I'm primarily playing with gpusieve.

BTW, my bigger problem is NVidia's developer web site is down thanks to hackers.

Last fiddled with by Prime95 on 2012-07-13 at 19:08
Prime95 is online now   Reply With Quote
Old 2012-07-14, 10:39   #1814
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11×101 Posts
Default

I'm able to reproduce this issue with mfaktc 0.18 + CUDA toolkit 5.0.7-preview on openSUSE 12.1.

CUDA 5.0 driver + CUDA toolkit 4.2 -> OK
CUDA 5.0 driver + CUDA toolkit 5.0.7 -> fail

Oliver

Last fiddled with by TheJudger on 2012-07-14 at 10:40
TheJudger is offline   Reply With Quote
Old 2012-07-14, 12:04   #1815
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11·101 Posts
Default

first impressions:
  • floatingpoint approximation for divisions seems to be OK
  • data transfer seems to be OK
I see issue with carrys (using carry flag) in e.g. tf_barrett96.cu: mod_simple_96(). WTF?

So for now I can only say to everyone: Don't use CUDA Toolkit 5.0.7 for mfaktc!

Oliver
TheJudger is offline   Reply With Quote
Reply

Thread Tools


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 01:04.


Fri Aug 6 01:04:20 UTC 2021 up 13 days, 19:33, 1 user, load averages: 2.06, 2.40, 2.33

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.