mersenneforum.org  

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

Reply
 
Thread Tools
Old 2012-06-05, 15:14   #1376
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by Dubslow View Post
The signal() code is identical to previous versions of CUDALucas except for the string printed.
You may want to do some research on the sigaction() function (although there is no direct Windows equivalent). signal() is a portability nightmare.
chalsall is offline   Reply With Quote
Old 2012-06-05, 15:15   #1377
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Quote:
Originally Posted by chalsall View Post
You may want to do some research on the sigaction() function (although there is no direct Windows equivalent). signal() is a portability nightmare.
:shrug: It's what msft has been using, and no one's complained so far. (I'm guessing it's been in there a long time, since at least 1.2 in all likelihood.)
Dubslow is offline   Reply With Quote
Old 2012-06-05, 15:38   #1378
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by Dubslow View Post
:shrug: It's what msft has been using, and no one's complained so far. (I'm guessing it's been in there a long time, since at least 1.2 in all likelihood.)
:shrug: Just because it's being used doesn't necessarily mean it's correct in every environment. Once a month bug anyone?

Quoting the man page for signal(2):
Quote:
The only portable use of signal() is to set a signal’s disposition to SIG_DFL or SIG_IGN. The semantics when using signal() to establish a signal handler vary across systems (and POSIX.1 explicitly permits this variation); do not use it for this purpose.
chalsall is offline   Reply With Quote
Old 2012-06-05, 16:11   #1379
Redarm
 
Redarm's Avatar
 
Apr 2012
Berlin Germany

3·17 Posts
Default

Quote:
Originally Posted by Dubslow View Post
I didn't change a thing math-wise. Perhaps you chose a better FFT length? Edit: Could be new drivers, the 680 is still rather new. Or, if previously you were using arch>=2.0 but are now using arch=1.3, you might see some performance gains.

PS: Are you in Windows, and if so, does it crash for you like above?

i used the compiled versions for windows by flashjh, without the worktodo-file

edit: with worktodo.txt it will crash

Last fiddled with by Redarm on 2012-06-05 at 16:13
Redarm is offline   Reply With Quote
Old 2012-06-05, 16:42   #1380
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by Redarm View Post
i used the compiled versions for windows by flashjh, without the worktodo-file

edit: with worktodo.txt it will crash
Okay, well if you read the intermediate posts, that bug has been fixed and now we're just waiting for flash to recompile.
Dubslow is offline   Reply With Quote
Old 2012-06-05, 17:04   #1381
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

72×197 Posts
Default

Found my issue. In v2.02 you have:

Code:
enum ASSIGNMENT_ERRORS clear_assignment(char *filename, int exponent)
{
  <snip>
  
#ifdef linux  
  f_in = fopen(filename, "r");
  if (NULL == f_in)
    return CANT_OPEN_WORKFILE;
  
  f_out = fopen("__worktodo__.tmp", "w");
  if (NULL == f_out)
  {
    fclose(f_in);
    return CANT_OPEN_TEMPFILE;
  }
#else
  errno_t err;
  err = fopen_s(&f_in, filename, "r");
  if (err)
    return CANT_OPEN_WORKFILE;
  
  err=0; err = fopen_s(&f_out, "__worktodo.tmp", "w");
  if (err)
  {
    fclose(f_in);
    return CANT_OPEN_TEMPFILE;
  }
#endif
This seems to be fixed in v2.03, I saw you made a new "_fopen()" and moved the OS-specific inside. Waiting for binaries of v2.03 (don't want to complicate the things even more by attempting a compilation by myself, I let flash do it, he has more experience :P). Meantime 2.02 produced first correct residues, two DCs (all switches in command line, no ini used).

Last fiddled with by LaurV on 2012-06-05 at 17:06 Reason: colored :D
LaurV is offline   Reply With Quote
Old 2012-06-05, 17:20   #1382
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

160658 Posts
Default

Quote:
Originally Posted by LaurV View Post
Found my issue. In v2.02 you have:

Code:
enum ASSIGNMENT_ERRORS clear_assignment(char *filename, int exponent)
{
  <snip>
  
#ifdef linux  
  f_in = fopen(filename, "r");
  if (NULL == f_in)
    return CANT_OPEN_WORKFILE;
  
  f_out = fopen("__worktodo__.tmp", "w");
  if (NULL == f_out)
  {
    fclose(f_in);
    return CANT_OPEN_TEMPFILE;
  }
#else
  errno_t err;
  err = fopen_s(&f_in, filename, "r");
  if (err)
    return CANT_OPEN_WORKFILE;
  
  err=0; err = fopen_s(&f_out, "__worktodo.tmp", "w");
  if (err)
  {
    fclose(f_in);
    return CANT_OPEN_TEMPFILE;
  }
#endif
This seems to be fixed in v2.03, I saw you made a new "_fopen()" and moved the OS-specific inside. Waiting for binaries of v2.03 (don't want to complicate the things even more by attempting a compilation by myself, I let flash do it, he has more experience :P). Meantime 2.02 produced first correct residues, two DCs (all switches in command line, no ini used).
Ah. In that case, it was probably just a transcription error on flash's part when he inserted the fopen_s. When I redefined all that crap under _fopen, I deleted all the Windows #ifdefs and used the Linux ones, and apparently I deleted the error as well.

By the way throughout this mess I think I've had 3 for 3 with my hacks.

By the other way, was I correct about you wanting print_time_from_seconds to always pad the ETA with zeros to a constant length?

PS Try hitting the ^C yourself.
___________________________________________________________________

PPS
Quote:
Originally Posted by LaurV View Post
No idea what that means till I will see it in action
The "err=" and "ms/iter" is what I was thinking of. The ETA looks good as it is in v2.02. If you pad it with zeroes or better spaces up to 3:2:2 digits (in case is shorter) it would be perfect. But this is just nitpicking...
Quote:
Originally Posted by LaurV View Post
edit2: next cosmetic thing would be to use a fixed format (6, 5, even 4 decimals would be enough) for error display, and 4 decimals for ETA.
The ms/iter was already at a steady field width; like I said in my original response, err is also now at a fixed field width. ETA would look like
15 hrs: "15:42:24"
5 hrs: "05:42:24"
0 hrs 42 mns: "00:42:24"
7 mins "00:07:24"
24 seconds "00:00:24"
4 seconds "00:00:04"

I personally think 3:2:2 is a bit excessive, since the vast majority of users do DCs.
___________________________________________________________________

PPPS
Quote:
Originally Posted by LaurV View Post
Remember I am still running v2.02 :P
Most probably it will say "caught. Bla Bla" without "^C". I don't want to interrupt the work right now only for that.

edit: could not resist... I was right. Maybe you have done some changes in v2.03, but they didn't reach me yet...
Hmm... it should be "^C caught. ..." because when you hit ^C yourself, it appears on the terminal, then " caught..." makes it look like one print. (And no, I haven't changed that part since I initially made 2.00a.)
___________________________________________________________________

PPPPS
Quote:
Originally Posted by LaurV View Post
ETA is already 2:2:2, so if you think 3:2:2 is too much, then there is nothing to do here. For me it looks ok either way.
Well if it gets below an hour, the hour field isn't printed at all and we get a 2:2, not a 2:2:2. That's what I was wondering about.
Code:
//From apsen
void
print_time_from_seconds (int sec)
{
  if (sec > 3600)
    {
      printf ("%d", sec / 3600);
      sec %= 3600;
      printf (":%02d", sec / 60);
    }
  else
    printf ("%d", sec / 60);
  sec %= 60;
  printf (":%02d", sec);
}
Reattaching 2.03 from previous page.
Attached Files
File Type: bz2 CUDALucas-2.03.tar.bz2 (20.4 KB, 69 views)

Last fiddled with by Dubslow on 2012-06-05 at 18:11
Dubslow is offline   Reply With Quote
Old 2012-06-05, 17:40   #1383
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

72·197 Posts
Default

Quote:
Originally Posted by Dubslow View Post
By the other way, was I correct about you wanting print_time_from_seconds to always pad the ETA with zeros to a constant length?
No idea what that means till I will see it in action
The "err=" and "ms/iter" is what I was thinking of. The ETA looks good as it is in v2.02. If you pad it with zeroes or better spaces up to 3:2:2 digits (in case is shorter) it would be perfect. But this is just nitpicking...

Thanks for the PM, my post count is inflated too, but who cares :D, I saw your reply, I wrongly wrote ETA there. I was thinking to ms/iter with 4 decimals, fixed. ETA is already 2:2:2, so if you think 3:2:2 is too much, then there is nothing to do here. For me it looks ok either way.

Last fiddled with by LaurV on 2012-06-05 at 17:57
LaurV is offline   Reply With Quote
Old 2012-06-05, 17:45   #1384
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

226658 Posts
Default

Quote:
Originally Posted by Dubslow View Post
PS Try hitting the ^C yourself.
Remember I am still running v2.02 :P
Most probably it will say "caught. Bla Bla" without "^C". I don't want to interrupt the work right now only for that.

edit: could not resist... I was right. Maybe you have done some changes in v2.03, but they didn't reach me yet...

Last fiddled with by LaurV on 2012-06-05 at 17:45
LaurV is offline   Reply With Quote
Old 2012-06-05, 18:52   #1385
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default CUDALucas 2.03 x64 Binaries

Attached CUDALucas 2.03 x64 binaries - Tested


- I was able to run with or without .ini file
- Worktodo.txt works fine.
- Command line still takes precedence
- Test=XXXXXXXX in worktodo.txt works fine
- Test=N/A,XXXXXXXX,XX,X works fine
- Test=AID,XXXXXXXX,XX,X works fine
- I tested DoubleCheck with all these also, they work fine

@Dubslow - everything compiled straight out, but the makefile.win needed a small change OUT = NAME -> OUT = $(NAME) on line 6 and I still need /Tp for now

This is CUDA 4.0 | sm20 & sm_21 (see next posts for CUDA 3.2 & source)

Edit: With .ini and worktodo.txt in directory, I can run just CUDALucas.exe and it works fine.

BTW - Thanks for all the hard work everyone!

Edit2:

I just edited my worktodo.txt with M86243 and restarted with CUDALucas.exe:

Code:
 
M( 86243 )P, n = 4608, CUDALucas v2.03
Continuing work from a partial result of M26105XXX fft length = 1572864 iteration = 13559297
It successfully found the Prime, cleared the exponent from worktodo.txt and continued with my current exponent - awesome!
Attached Files
File Type: zip CUDALucas2.03.4.0x64.zip (166.6 KB, 81 views)

Last fiddled with by flashjh on 2012-06-05 at 19:16
flashjh is offline   Reply With Quote
Old 2012-06-05, 18:54   #1386
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default CUDALucas 2.03 x64 Binaries

CUDALucas 2.03 x64 CUDA 3.2 | sm_13
Attached Files
File Type: zip CUDALucas2.03.3.2x64.zip (85.0 KB, 81 views)
flashjh is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't DC/LL them with CudaLucas LaurV Data 131 2017-05-02 18:41
CUDALucas / cuFFT Performance on CUDA 7 / 7.5 / 8 Brain GPU Computing 13 2016-02-19 15:53
CUDALucas: which binary to use? Karl M Johnson GPU Computing 15 2015-10-13 04:44
settings for cudaLucas fairsky GPU Computing 11 2013-11-03 02:08
Trying to run CUDALucas on Windows 8 CP Rodrigo GPU Computing 12 2012-03-07 23:20

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


Mon Aug 2 07:23:13 UTC 2021 up 10 days, 1:52, 0 users, load averages: 1.04, 1.23, 1.47

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.