View Single Post
Old 2020-03-09, 06:14   #28
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

134448 Posts
Default

Quote:
Originally Posted by ewmayer View Post
I revisited the currently-disabled checkpointing code yesterday ...
4. X closes both files, renames <filename.tmp> to <filename>, thus overwriting the now-obsolete
version of the latter;
5. X releases the file lock and resumes processing factor candidates.
*/[/code]
index and pass seem to be synonymous.
In #4, "renames <filename.tmp> to <filename>, thus overwriting the now-obsolete
version of the latter" may cause some trouble on Windows. IIRC Preda did something similar in gpuowl at times, and the rename failed on Windows but worked in linux. Windows refused to do what amounts to an implied delete.
A quick demo at the command line:
Code:
C:\Users\kkrie\documents\starfish>copy con: test.txt
asdf this is the file I want to delete by renaming something else onto it.
^Z
        1 file(s) copied.

C:\Users\kkrie\documents\starfish>copy con: testnew.txt
asdf this is the file I want to replace test.txt via the rename.
^Z
        1 file(s) copied.

C:\Users\kkrie\documents\starfish>rename testnew.txt test.txt
A duplicate file name exists, or the file
cannot be found.

C:\Users\kkrie\documents\starfish>type test.txt
asdf this is the file I want to delete by renaming something else onto  it.
Create new, save new, check save succeeded, delete old, rename new to old.
kriesel is offline   Reply With Quote