mersenneforum.org  

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

Reply
Thread Tools
Old 2012-05-07, 19:53   #1200
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

978210 Posts
Default

Quote:
Originally Posted by Bdot View Post
Chalsall, that's an interesting way to get localized web pages, cool!
Thanks. It's an interesting experiment in "crowd sourcing". I'm about to start building a big web presence for an international NGO, and multilingual ability will be critical. I figured this would be a good place to experiment with how to implement such a thing.

Quote:
Originally Posted by Bdot View Post
Sometimes it is hard to pick the correct one of several possible translations if you only have the phrase without context. Such as "Saved" (GHz-Days) that is now "Gespeichert" (which means you saved it to hard disk, for instance) instead of "Gespart" in German. Is there a way to object to some of the translations? Also, translating "GPU to 72" at all is questionable, but "GPU hoch 72" means "GPU to the power of 72", which is kind of funny (was that intended?).
No, it wasn't intended. Someone put it in.

And, yes, being able to "object" to / correct translations is planned for.

Quote:
Originally Posted by Bdot View Post
For me personally, localization has a rather low priority (I have US-English keyboards, and sometimes have difficulties understanding German error messages of the Operating system at friend's PCs.)
You're lucky. As a mono-language speaker myself, I resonate with those who have difficulty working in a language other than their own.

And if it results in someone signing up and using the system who might not have otherwise, so much the better!

Quote:
Originally Posted by Bdot View Post
Therefore, if you're really looking for ideas what to implement, I have one:

I'd find it helpful if I had a single comments field on the "Get Assignments" pages that would save the entered comment for each of the assigned tasks, and display it on the "View Assignments" pages. I would use that field to enter the machine names that I requested the assignment for, making it much easier to check why there are still some old ones hanging around. If the "View Assignments" were sortable by the comments, this feature could also be used to check if machines are running dry without logging in to them.
An excellent idea. And relatively easy to implement. Consider it added to the "Todo List" (near the top).

Quote:
Originally Posted by Bdot View Post
BTW, for portability reasons I now decided to implement the file locking using an empty .lck file (worktodo.txt.lck and results.txt.lck). As long as it exists, mfakto will not touch the corresponding txt file.
May I suggest a slight variant?

Check for a file like "worktodo.txt.ext". If it doesn't exist, then create a file called "worktodo.txt.lck" and wait a second or two. Then check again. If it exists then delete "worktodo.txt.lck" and go away for a while. If it doesn't then make your modifications and delete it. (Same for "results.txt.ext".)

Another program (e.g. a fetching or returning spider) then does the reciprical -- it looks for "worktodo.txt.lck". If it doesn't exist it creates "worktodo.txt.ext", waits one or two seconds, looks for "worktodo.txt.lck" again, etc.

It's a rather primative, but effective, file-system based semaphore.
chalsall is offline   Reply With Quote
Old 2012-05-07, 21:23   #1201
Bdot
 
Bdot's Avatar
 
Nov 2010
Germany

3·199 Posts
Default

Quote:
Originally Posted by chalsall View Post
May I suggest a slight variant?
Of course you may
Quote:
Originally Posted by chalsall View Post
Check for a file like "worktodo.txt.ext". If it doesn't exist, then create a file called "worktodo.txt.lck" and wait a second or two. Then check again. If it exists then delete "worktodo.txt.lck" and go away for a while. If it doesn't then make your modifications and delete it. (Same for "results.txt.ext".)

Another program (e.g. a fetching or returning spider) then does the reciprical -- it looks for "worktodo.txt.lck". If it doesn't exist it creates "worktodo.txt.ext", waits one or two seconds, looks for "worktodo.txt.lck" again, etc.

It's a rather primative, but effective, file-system based semaphore.
Even though it would not happen very often I really dislike the "wait a second or two" part. And I'm not sure that this is really needed (but I'm not fluent in Perl ...):

I'm using the built-in file-system-semaphore for files, like
lockfd = open(lock_filename, O_EXCL | O_CREAT, MODE)

This will either create the desired file if it did not exist, or fail if it existed. Atomically. I found that all relevant OSes and their file systems including NFS and Samba support this operation.

I think in perl you'd use
sysopen (lockfd, lock_filename, O_RDWR|O_EXCL|O_CREAT, mode);
for the same.

This would also avoid the scenario of both programs creating their files, checking the other files' existence, saying oops, deleting their files and starting over for the next decade
Bdot is offline   Reply With Quote
Old 2012-05-07, 21:36   #1202
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

978210 Posts
Default

Quote:
Originally Posted by Bdot View Post
Atomically. I found that all relevant OSes and their file systems including NFS and Samba support this operation.
Not NFS version 2 nor 3. Although I admit I'm probably being overly paranoid about race conditions which would be rare.

Also, I mis-understood your intention. I didn't apprecaite that you would be using file locking in addition to the lock file itself.

Quote:
Originally Posted by Bdot View Post
This would also avoid the scenario of both programs creating their files, checking the other files' existence, saying oops, deleting their files and starting over for the next decade
I agree. Your proposed solution seems sane and reasonable.
chalsall is offline   Reply With Quote
Old 2012-05-08, 03:27   #1203
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

25BF16 Posts
Default

Quote:
Originally Posted by Bdot View Post
"GPU to the power of 72"
Cool! I will use it like that from now on!
LaurV is offline   Reply With Quote
Old 2012-05-08, 14:47   #1204
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

10010010101112 Posts
Default Doubly Devilish stats.

Code:
Overall	 	DC TF	LL TF	P-1	LL	DC	 	GHz Days
 #	Worker	Out	68	69	70	71	72	73	>73	                        	Facts	Saved	Done
1	Craig Meyers	2,286	3,639	11,513	15,072	9,329	15,964	738		460		35	666	94,666	281,344
The heading don't all line up; a pair of triple 6's in the latter columns.
petrw1 is offline   Reply With Quote
Old 2012-05-08, 14:56   #1205
Redarm
 
Redarm's Avatar
 
Apr 2012
Berlin Germany

3·17 Posts
Post

Quote:
Originally Posted by Bdot View Post
Such as "Saved" (GHz-Days) that is now "Gespeichert" (which means you saved it to hard disk, for instance) instead of "Gespart" in German. Is there a way to object to some of the translations? Also, translating "GPU to 72" at all is questionable, but "GPU hoch 72" means "GPU to the power of 72", which is kind of funny (was that intended?).
The "Gespeichert" was my fault because i didn't see the context
"GPU hoch 72" is also my creation, intended to sounds funny, but i know that letting the phrase "GPU to 72" as it is, is more appealing :/
Redarm is offline   Reply With Quote
Old 2012-05-08, 15:10   #1206
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2×67×73 Posts
Default

Quote:
Originally Posted by Redarm View Post
The "Gespeichert" was my fault because i didn't see the context
"GPU hoch 72" is also my creation, intended to sounds funny, but i know that letting the phrase "GPU to 72" as it is, is more appealing :/
No problem. I appreciate your putting in translations. I knew mistakes would sometimes be made, and that a system would have to be built to allow people to make corrections and suggest alternatives.

Because that ability is not yet enabled, I have taken the liberty of making the two changes suggested by Bdot manually.

Any additional translation work you'd like to do would be most welcomed. And there is now a list of all pages where a phrase appears, so the context should be easier to determine.
chalsall is offline   Reply With Quote
Old 2012-05-08, 17:26   #1207
chris2be8
 
chris2be8's Avatar
 
Sep 2009

24·131 Posts
Default

Quote:
Originally Posted by Bdot View Post
I'm using the built-in file-system-semaphore for files, like
lockfd = open(lock_filename, O_EXCL | O_CREAT, MODE)

This will either create the desired file if it did not exist, or fail if it existed. Atomically. I found that all relevant OSes and their file systems including NFS and Samba support this operation.

I think in perl you'd use
sysopen (lockfd, lock_filename, O_RDWR|O_EXCL|O_CREAT, mode);
for the same.

This would also avoid the scenario of both programs creating their files, checking the other files' existence, saying oops, deleting their files and starting over for the next decade
Another option is to use a lock directory. mkdir either creates it or fails with a non-zero rc. In factMsieve.pl I wrote the following routine:
Code:
######################################################
sub getlock {
######################################################
# Get the lock directory
  return if (!$USE_LOCKDIR);
  my $res=0;
  my $count=0;
  while ($res ==0) {
    $res=mkdir "$NAME.lockdir";
    last if ($res==1);
    sleep 1;
    $count++;
    die "Can't get lock dir $NAME.lockdir\n" if ($count>120);
  }
  logwrite("Waited $count times for lock") if ($count);
}
The freelock routine just contains:
rmdir "$NAME.lockdir" or die "Could not delete $NAME.lockdir $!";

Chris
chris2be8 is offline   Reply With Quote
Old 2012-05-09, 00:56   #1208
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2×3×1,693 Posts
Default

Anyone care to bet on just how high in the rankings The Judger will go in P-1?

Sorry for the trivia, but Oliver's charge up the chart is remarkable. The only recent entry to come anywhere close is GrunwalderGIMP.
kladner is offline   Reply With Quote
Old 2012-05-09, 01:22   #1209
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

342710 Posts
Default

Quote:
Originally Posted by kladner View Post
Oliver's charge up the chart is remarkable. The only recent entry to come anywhere close is GrunwalderGIMP.
On the P-1 Top 500, Axon is blazing up the rankings and has found 3193 P-1 factors in the past year (probably less). :surprised
James Heinrich is offline   Reply With Quote
Old 2012-05-09, 02:20   #1210
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 James Heinrich View Post
On the P-1 Top 500, Axon is blazing up the rankings and has found 3193 P-1 factors in the past year (probably less). :surprised
But those aren't actually P-1; there's a thread somewhere here about the low TF work he's doing. This will disappear when PrimeNet's credit assignment system is fixed.
Dubslow is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Status Primeinator Operation Billion Digits 5 2011-12-06 02:35
62 bit status 1997rj7 Lone Mersenne Hunters 27 2008-09-29 13:52
OBD Status Uncwilly Operation Billion Digits 22 2005-10-25 14:05
1-2M LLR status paulunderwood 3*2^n-1 Search 2 2005-03-13 17:03
Status of 26.0M - 26.5M 1997rj7 Lone Mersenne Hunters 25 2004-06-18 16:46

All times are UTC. The time now is 06:48.


Fri Aug 6 06:48:07 UTC 2021 up 14 days, 1:17, 1 user, load averages: 3.10, 2.83, 2.77

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.