mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU to 72 (https://www.mersenneforum.org/forumdisplay.php?f=95)
-   -   GPU to 72 status... (https://www.mersenneforum.org/showthread.php?t=16263)

chalsall 2012-05-07 19:53

[QUOTE=Bdot;298708]Chalsall, that's an interesting way to get localized web pages, cool![/QUOTE]

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=Bdot;298708]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?).[/QUOTE]

No, it wasn't intended. Someone put it in.

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

[QUOTE=Bdot;298708]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.)[/QUOTE]

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! :smile:

[QUOTE=Bdot;298708]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.[/QUOTE]

An excellent idea. And relatively easy to implement. Consider it added to the "Todo List" (near the top).

[QUOTE=Bdot;298708]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.[/QUOTE]

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.

Bdot 2012-05-07 21:23

[QUOTE=chalsall;298712]
May I suggest a slight variant?
[/QUOTE]
Of course you may :grin:
[QUOTE=chalsall;298712]
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.[/QUOTE]
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 :smile:

chalsall 2012-05-07 21:36

[QUOTE=Bdot;298721]Atomically. I found that all relevant OSes and their file systems including NFS and Samba support this operation.[/QUOTE]

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=Bdot;298721]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 :smile:[/QUOTE]

I agree. Your proposed solution seems sane and reasonable. :smile:

LaurV 2012-05-08 03:27

[QUOTE=Bdot;298708] "GPU to the power of 72"[/QUOTE]
Cool! I will use it like that from now on! :smile:

petrw1 2012-05-08 14:47

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[/CODE]

The heading don't all line up; a pair of triple 6's in the latter columns.

Redarm 2012-05-08 14:56

[QUOTE=Bdot;298708] 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?).
[/QUOTE]

The "Gespeichert" was my fault because i didn't see the context :blush:
"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 :/

chalsall 2012-05-08 15:10

[QUOTE=Redarm;298788]The "Gespeichert" was my fault because i didn't see the context :blush:
"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 :/[/QUOTE]

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.

chris2be8 2012-05-08 17:26

[QUOTE=Bdot;298721]
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 :smile:[/QUOTE]

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);
}
[/code]
The freelock routine just contains:
rmdir "$NAME.lockdir" or die "Could not delete $NAME.lockdir $!";

Chris

kladner 2012-05-09 00:56

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

Sorry for the trivia, but Oliver's charge up the chart is remarkable. The only recent entry to come anywhere close is GrunwalderGIMP.

James Heinrich 2012-05-09 01:22

[QUOTE=kladner;298846]Oliver's charge up the chart is remarkable. The only recent entry to come anywhere close is GrunwalderGIMP.[/QUOTE]On the [url=http://v5www.mersenne.org/report_top_500_P-1/]P-1 Top 500[/url], Axon is blazing up the rankings and has found 3193 P-1 factors in the past year (probably less). :surprised

Dubslow 2012-05-09 02:20

[QUOTE=James Heinrich;298848]On the [url=http://v5www.mersenne.org/report_top_500_P-1/]P-1 Top 500[/url], Axon is blazing up the rankings and has found 3193 P-1 factors in the past year (probably less). :surprised[/QUOTE]

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.


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.