mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet > GPU to 72

Reply
 
Thread Tools
Old 2012-03-01, 20:37   #23
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

Quote:
Originally Posted by Dubslow View Post
I had seen that, but the name made me think there was something more to it and that I shouldn't mess with it. (What happened to 0.2?)
It's .2 right now... updated some time ago. I came across it, probably, by mistake.
flashjh is offline   Reply With Quote
Old 2012-03-01, 20:50   #24
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Oh whoops, the website still says 0.1. What were the changes for 0.2?

Also, a few more changes:
Code:
# Your PrimeNet password. # Not changed, just showing context for below
my $PNPassword = " ";

# Your time zone offest from UTC. (Only supports hour offsets.)
my $TimeZone = -6; # Default should be zero, but I'm UTC-6 :)
Code:
sub UTCString {
   my ($sec,$min,$hour,$mday,$mon,$year) = gmtime(time);

   $hour += $TimeZone;
   if($hour < 0 ) {
      $mday --;
      $hour += 24;
   } elsif( $hour > 23 ) {
      $mday ++;
      $hour -= 24;
   }

   return sprintf("%04d-%02d-%02d_%02d:%02d.%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec);
}
Does the above work? (That is to say, is midnight 00:00 or 24:00 ?)
Edit: Nope, but hopefully you get the idea. I'll try and see where Google can get me.
Edit2: The elsif syntax is fixed, and now it does work for me, at least without having to change the date it worked. It just printed
Code:
2012-03-01_15:01.41 INFO:  Submission spider starting...
2012-03-01_15:01.41 WARN:  No results.txt file exists or it is empty.  Exiting.
a minute ago. For me it's 15:01, and obviously UTC it's 21:01.

Last fiddled with by Dubslow on 2012-03-01 at 21:07 Reason: found one bug: sed -i -e s/else if/elsif/, reporting success
Dubslow is offline   Reply With Quote
Old 2012-03-01, 21:19   #25
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

973010 Posts
Default

Quote:
Originally Posted by Dubslow View Post
Does the above work? (That is to say, is midnight 00:00 or 24:00 ?)
Edit: Nope, but hopefully you get the idea. I'll try and see where Google can get me.
You're right -- the code is stupid. Thanks for pointing that out. Will fix for 0.3.

Please keep in mind the entire spider was written in two hours.
chalsall is online now   Reply With Quote
Old 2012-03-01, 21:38   #26
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

I wasn't saying it was stupid, just something to fix.

And that's why we're here -- and that's why Stallman made the GPL -- so you (hopefully) don't have to spend much more than the time you've already put into it
Dubslow is offline   Reply With Quote
Old 2012-03-01, 22:03   #27
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2×5×7×139 Posts
Default

Quote:
Originally Posted by Dubslow View Post
I wasn't saying it was stupid, just something to fix.
I know you weren't saying it was stupid. I was. And it is...

The TimeZone delta should scaled to seconds, and then be applied to the result of the time() function before being passed into the gmtime() function.

What I did doesn't always work.
chalsall is online now   Reply With Quote
Old 2012-03-02, 05:52   #28
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Regarding the submission spider and logging in:
Code:
sub LogIntoPrimeNet {
   my ($UN, $PW) = @_;
   my ($Success, $Text);

   Log(1, "Attempting to log into PrimeNet.  This can take a little while...");

   if (TalkToPrimeNet("account/\?user_login=${UN}&user_password=${PW}&B1=GO")) {
      ($Success, $Text) = TalkToPrimeNet("manual_result/");

      if ($Success) {
         if ($Text =~ /${UN} logged-in/) {
            Log(1, "Successfully logged into PrimeNet.");
         } else {
            Log(3, "Didn't find our username in the response; not logged in.  Exiting.");
            Log(0, "Response was:\n${Text}\n\n.");
            $Success = 0;
         }
      } else {
         Log(3, "PrimeNet returned a bad response; not logged in.  Exiting.");
         Log(0, "Response was:\n${Text}\n\n.");
      }
   }

   return $Success;
}
chalsall said somewhere in this mess of a forum () that being a good coder means catching all the errors, not just getting the 'usual' case right; more than half of the spider is error catching. It's a thorough(ly awesome) piece of code.
Edit: To beat a dead horse, I just changed my password in the file, and it told me this:
Code:
2012-03-02_00:03.05 INFO:  Submission spider starting...
2012-03-02_00:03.05 INFO:  Attempting to log into PrimeNet.  This can take a little while...
2012-03-02_00:03.10 ERR :  Didn't find our username in the response; not logged in.  Exiting.
2012-03-02_00:03.10 INFO:  Spider has finished.  Exiting.

Last fiddled with by Dubslow on 2012-03-02 at 06:04
Dubslow is offline   Reply With Quote
Old 2012-03-02, 07:55   #29
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

@James (not chalsall):

The submit spider is really nice, but it causes a slight issue with your site:
http://mersenne-aries.sili.net/expon...tails=49820581
When it's submitted by spidey, but I upload the expo after your site observes it, then it's in twice, once as unknown and once by me.
Dubslow is offline   Reply With Quote
Old 2012-03-03, 04:47   #30
bcp19
 
bcp19's Avatar
 
Oct 2011

7×97 Posts
Default

I've noticed on the submission spider that I don't get proper credit for factors found. The server thinks they are P-1 results instead of TF. Is there a way to remedy this?
bcp19 is offline   Reply With Quote
Old 2012-03-03, 05:53   #31
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

100011000112 Posts
Default

Quote:
Originally Posted by bcp19 View Post
I've noticed on the submission spider that I don't get proper credit for factors found. The server thinks they are P-1 results instead of TF. Is there a way to remedy this?
No. We've all been discussing this for quite some time. I've tested many ways, and nothing works.

As far as I know (now), PrimeNet gives P-1 credit for almost all mfakt* work because it doesn't understand the submission. James said PrimeNet will give F credit for smaller factors, but when the factor is outside what PrimeNet expects for a TF exponent, it gives PM1.

I had one show up correctly last night and thought it was fixed, but it's not... the factor was small enough for F credit.

See here and here (any may other places for more info)

Last fiddled with by flashjh on 2012-03-03 at 05:53
flashjh is offline   Reply With Quote
Old 2012-03-03, 15:59   #32
bcp19
 
bcp19's Avatar
 
Oct 2011

2A716 Posts
Default

Quote:
Originally Posted by flashjh View Post
No. We've all been discussing this for quite some time. I've tested many ways, and nothing works.

As far as I know (now), PrimeNet gives P-1 credit for almost all mfakt* work because it doesn't understand the submission. James said PrimeNet will give F credit for smaller factors, but when the factor is outside what PrimeNet expects for a TF exponent, it gives PM1.

I had one show up correctly last night and thought it was fixed, but it's not... the factor was small enough for F credit.

See here and here (any may other places for more info)
I'm wondering if this could be due to how the spider submits the data. No factor lines are single lines, but factor lines are 2 lines long. If you upload your results, the server gets both lines at once and gives proper credit, the spider (unless I am wrong) seems to send one line at a time.
bcp19 is offline   Reply With Quote
Old 2012-03-03, 16:30   #33
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

Quote:
Originally Posted by bcp19 View Post
I'm wondering if this could be due to how the spider submits the data. No factor lines are single lines, but factor lines are 2 lines long. If you upload your results, the server gets both lines at once and gives proper credit, the spider (unless I am wrong) seems to send one line at a time.
You're on the right track, as this was discussed before. I just haven't found a way to get the spider to do it correctly.
flashjh is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU to 72 spider poaching exponents? ixfd64 GPU to 72 2 2014-07-27 20:38
It Seems The Great Spider ... Dubslow Forum Feedback 13 2012-06-01 13:39
Automatic temperature control TObject Software 13 2012-04-27 19:33
Went from 8 workers to 4 workers on v26.6 upgrade dmoran Software 13 2011-05-23 12:36
Manual submission of automatic assignment result tichy PrimeNet 4 2010-12-17 09:57

All times are UTC. The time now is 15:24.


Fri Jul 16 15:24:09 UTC 2021 up 49 days, 13:11, 1 user, load averages: 1.73, 1.73, 1.73

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.