![]() |
Thanks. I have added your script to my [url=http://www.mersenne.ca/tf1G.php?available_assignments=0]page[/url].
If anyone has suggestions for improving it please let me know. |
1 Attachment(s)
I found a bug in curl failure check.
If there is no internet connection, the exit status is 6, not 1. I don't know if it is the same for your "errorlevel" variable. Otherwise it moves results.txt entries to mfaktc-results-submitted.txt, but they are not really submitted. Maybe it should be better the condition "the exit status is not equal to 0". _____ I have finally implemented ramdisk option. Now if ctrl-C is pressed, it copies worktodo.txt and it tries to send results.txt. If it fails, it copies results.txt to mfaktc original directory too. If curl failed to submit results, then upload and delete results.txt manually before running the script again. To exit: 1) Press ctrl-C once while mfaktc is running (script will exit because worktodo.txt is not empty; it is always empty if mfaktc finishes its work) 2) Press ctrl-C once while script is sleeping 10 seconds before downloading more work (script will exit because it received signal SIGINT) Do not press ctrl-C otherwise. I'm not sure what it happens, but it's not good. |
[QUOTE=Luis;473064]I found a bug in curl failure check. If there is no internet connection, the exit status is 6, not 1. I don't know if it is the same for your "errorlevel" variable. Maybe it should be better the condition "the exit status is not equal to 0".[/QUOTE]The Windows batch version uses "if errorlevel 1" which actually means "if errorlevel >= 1" (not "if errorlevel == 1"), so it will still trigger with errorlevel 6.
I have updated the bash script. Also, 100MB is excessive for the RAM drive, I'd say 10MB is plenty (you might even get away with 5MB, but 10MB gives some safety buffer). |
If you change "$? -ne 0" (not equal) with "$? -ge 1" (greater or equal), the conditions would be identical.
About ramdisk space, I thought the same thing. :) We could add a tip: when you use ramdisk, it should be better to set maxAssignments equal to a number of assignments that are completed in 1-2 hours. So data lost would be acceptable. |
Done and done, thanks.
|
Hi,
guess this won't hurt many users for now: mfaktc + CUDA [B][U]9[/U][/B].0 + [B][U]Volta[/U][/B] architecture doesn't work. (CUDA 9.0 + Pascal seems to work fine, didn't test older architectures). For now it is unclear whether this is a bug within mfaktc or in CUDA. Oliver |
[QUOTE=James Heinrich;473058]Thanks. I have added your script to my [URL="http://www.mersenne.ca/tf1G.php?available_assignments=0"]page[/URL].
If anyone has suggestions for improving it please let me know.[/QUOTE] Has anyone considered a PowerShell script? |
[QUOTE=storm5510;473513]Has anyone considered a PowerShell script?[/QUOTE]I haven't, but if you care to write one feel free and I can post it.
I know basically nothing about PowerShell, so I'm not sure what advantage it would have over the extant batch file. |
please, not again!
[QUOTE=TheJudger;473504]Hi,
guess this won't hurt many users for now: mfaktc + CUDA [B][U]9[/U][/B].0 + [B][U]Volta[/U][/B] architecture doesn't work. (CUDA 9.0 + Pascal seems to work fine, didn't test older architectures). For now it is unclear whether this is a bug within mfaktc or in CUDA. Oliver[/QUOTE] Currently I'm 99% sure it is the famous sub.cc/subc 0 bug [B][COLOR="Red"]again[/COLOR][/B]. [URL="http://mersenneforum.org/showpost.php?p=402488&postcount=2549"]http://mersenneforum.org/showpost.php?p=402488&postcount=2549[/URL] Oliver |
[QUOTE=James Heinrich;473514]I haven't, but if you care to write one feel free and I can post it.
I know basically nothing about PowerShell, so I'm not sure what advantage it would have over the extant batch file.[/QUOTE] I probably know less about [I]PowerShell[/I] than anyone here. I only know how to get it into command mode. It would be nice to have something that would not need [I]Wget[/I] and [I]CURL[/I]. [I]Wget[/I] did not work for me on Windows 10. Actually, there are a lot of things that do not work with Windows 10. |
I wish we had a MISFIT for James' site.
|
| All times are UTC. The time now is 23:09. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.