mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet > MISFIT

Closed Thread
 
Thread Tools
Old 2012-08-05, 16:52   #12
swl551
 
swl551's Avatar
 
Aug 2012
New Hampshire

2×401 Posts
Default

Sorry, I'd have to customize mfakt-app to support your configuration. I'll wait for other feedback before I change any functionality. I didn't want to be opening mfaktX.ini files since I didn't want to risk a compatibility issue if they change their code.
swl551 is offline  
Old 2012-08-05, 17:08   #13
kracker
ἀβουλία
 
kracker's Avatar
 
"Mr. Meeseeks"
Jan 2012
California, USA

86816 Posts
Default

Quote:
Originally Posted by swl551 View Post
Sorry, I'd have to customize mfakt-app to support your configuration. I'll wait for other feedback before I change any functionality. I didn't want to be opening mfaktX.ini files since I didn't want to risk a compatibility issue if they change their code.
Ah, ic. thanks!
kracker is offline  
Old 2012-08-05, 21:06   #14
swl551
 
swl551's Avatar
 
Aug 2012
New Hampshire

2·401 Posts
Default Image of mfaktX helper

Screenshot of latest version.
Attached Thumbnails
Click image for larger version

Name:	1.0.7.PNG
Views:	185
Size:	29.5 KB
ID:	8410  
swl551 is offline  
Old 2012-08-06, 02:27   #15
kladner
 
kladner's Avatar
 
"Kieren, ktony"
Jul 2011

9,547 Posts
Default

This seems to be a useful utility. I appreciate your making it available.

That said, I have a feature request. Would it be possible for the work balancing option to take file dates into consideration so that the oldest would be as near to the top of each worktodo.txt?

Thanks.

EDIT: I just realized that what I asked for concerned the dates assigned rather than file dates. I am rather spoiled by chalsall's charts and graphs and forgot that the request above would require a similar database, or access to his.

Last fiddled with by kladner on 2012-08-06 at 02:43
kladner is offline  
Old 2012-08-06, 03:06   #16
swl551
 
swl551's Avatar
 
Aug 2012
New Hampshire

2×401 Posts
Default

kladner,
It is a simple tweak to improve the "balance" so that oldest work (top-to-bottom of a workToDo.txt) is redistributed more evenly across all the workToDoz. The key would be to ensure you always add new work to the bottom of any files, which is what "add work" does. (appends new lines to end of file). I won't maintain any state tables so exact fifo is not possible.
swl551 is offline  
Old 2012-08-06, 03:33   #17
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

229D16 Posts
Default

Quote:
Originally Posted by swl551 View Post
The key would be to ensure you always add new work to the bottom of any files, which is what "add work" does. (appends new lines to end of file).
Just wondering... How are you handling file locking and race conditions?
chalsall is offline  
Old 2012-08-06, 03:59   #18
swl551
 
swl551's Avatar
 
Aug 2012
New Hampshire

2×401 Posts
Default

I don't lock any files. I open for append. If the OS throws an exception indicating a file is locked by some other application my code just shows error dialog and the I/O is aborted safely. mfaktO/C always gets work from the top of the file. I alway add to the end of the file. If timing is a concern the operator can stop the mfaktO/C instances before performing any file operations. Probably what you'd do if you didn't have this new utility. mfaktO/C rarely executes file IO so the window of concern is very small. (in my opinion anyway).
swl551 is offline  
Old 2012-08-06, 04:10   #19
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

8,861 Posts
Default

Quote:
Originally Posted by swl551 View Post
mfaktO/C always gets work from the top of the file.
Yes. But when work is completed, it will completely re-write the file. Does your program take this into consideration?

Quote:
Originally Posted by swl551 View Post
mfaktO/C rarely executes file IO so the window of concern is very small. (in my opinion anyway).
Just wondering... Are you familiar with the term "once a month bug"?
chalsall is offline  
Old 2012-08-06, 04:44   #20
swl551
 
swl551's Avatar
 
Aug 2012
New Hampshire

2×401 Posts
Default

chalsall,
Sorry, I don't see a specific question regarding mfaktO/C rewriting its files and how that may impact my utility or visa-versa. However, as previously stated: If I encounter a locked file I fail my IO. I'm happy to support my code if someone reports a specific problem where I can formulate a solution.
swl551 is offline  
Old 2012-08-06, 05:15   #21
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

886110 Posts
Default

Quote:
Originally Posted by swl551 View Post
I'm happy to support my code if someone reports a specific problem where I can formulate a solution.
Let me be explicit then... Your program introduces what is referred to as "race condition". mfaktc doesn't lock its files -- it assumes it is the sole reader and writer. mfakto does, but only in the very latest version.

Your program could cause work to be "lost". And, perhaps even worse, duplicated.

The only solution with mfaktc is to stop the program before running your program, and then restarting it. Unless your program offers that as an option, the human is back in the loop....
chalsall is offline  
Old 2012-08-06, 05:26   #22
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 swl551 View Post
If the OS throws an exception indicating a file is locked by some other application my code just shows error dialog and the I/O is aborted safely.
Seems to me that he means Windows itself automatically locks files, so that fopen() would return NULL (in C or whatever language/API function) when the OS says another program (such as mfaktc) has the file open.
Dubslow is offline  
Closed Thread

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MfaktX Controller (Windows) Mini-Geek Software 52 2014-02-18 18:27
MISFIT for MFAKTx swl551 MISFIT 186 2014-02-05 23:27
File Splitting Utility Antonio Software 5 2013-04-18 14:22
MFAKTx speed menu (windows) swl551 Software 8 2013-03-07 00:16
Multiple Installations. A_Pryme Software 35 2005-02-16 05:51

All times are UTC. The time now is 21:43.

Thu Apr 9 21:43:30 UTC 2020 up 15 days, 19:16, 0 users, load averages: 1.61, 2.03, 1.95

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.