stephenbrooks.orgForumMuon1GeneralOne Muon Folder, Many Machines
Username: Password:
Search site:
Subscribe to thread via RSS
[XS]riptide
2007-10-06 02:51:10
Can one effectively put the Muon1 program Folder on something like a shared network drive and have several networked PC's running the client from that folder?  (Obviously if the folder is visible to all said machines).  Will all the clients update the results file simultaneously, without any problems?  Also I'm speaking about running it in the "nonet" configuration.

Thanks
Stephen Brooks
2007-10-06 15:55:50
--[Will all the clients update the results file simultaneously,]--

Yes.

--[without any problems?]--

Errr... Use at your own risk.  You'll probably find it works fine except about once a month when two conflict and fill your results.txt/dat with zero bytes.  You better also switch auto-save off or they'll all be trying to save to the same file.

Basically, someone did this before and it didn't totally work.  You're better off having a script to take all the results.txt/dat and merge them into one file over the network share if you want them all in the same file for some reason.
[XS]riptide
2007-10-06 18:08:56
Ya.. what I wanted was One single DPAD folder and about 10-12 cores/clients working and to be able to manually upload a single results file... *sigh*... would save a lot of time on my side if that could be done.


About auto-save.. what does this do again?
[XS]riptide
2007-10-06 18:10:54
or maybe somthing in a .bat file that could look at all the DPAD folders and add the contents of results.txt to a master result.txt.  Also would there be much network overhead.  Does the client use much disk read/write to the client program?  i don't think it does.
Stephen Brooks
2007-10-06 19:44:32
DOS has commands for appending files onto each other.  You could just write a script (provided the network share was mounted on all the machines), which Task Scheduler calls regularly, appends that machine's results.txt into one on the share (deleting the local copy) and then you can do whatever you have to do from the share to send it (e.g. muon1 -s if the shared computer is net-connected).
[XS]riptide
2007-10-06 19:46:42
That sounds good.  I'll ask on the local forum.
Stephen Brooks
2007-10-06 19:47:43
You'd still have to have a muon1 folder on each local machine though.  Unless you created 12 on the share and ran those individually!  Running two instances in the same directory is not safe, and probably will never be, as they use the same output files.

Network overhead would be much reduced if you turn auto-save off.  Auto-save saves the simulation at regular intervals so if the computer is switched off you only lose 3-5 minutes of work instead of the whole simulation (up to 1 hour).  It's not so important on stable machines that are also fast so they do simulations quickly.
[XS]riptide
2007-10-06 20:14:57
ok.  Actually I have a program from RTsoftware called Slice and SAve.  Now when it 'sliced' a file into smaller ones it generated a bat file that could be run to put the slices back together again.  And also option built into the bat to hit a key if you wanted the 'slices' delted.  Hmm.. must look at that .bat.  Could use it on this. 
[XS]riptide
2007-10-06 20:20:03
Here goes.  I'll have to put in proper folder addresses.....

@echo off
set conti=start1
ic
goto %conti%
tart1
echo The file 'results.txt' will be restored.
echo.
echo Press Ctrl C to terminate the batch job or
pause
cls
set conti=res
goto pic
:res
if not exist "results.txt" goto file
echo The file 'results.txt' could not be restored
echo since it is already in the directory.
echo.
goto end
:file
echo The file 'results.txt' is being restored.
echo.
:file1
set file="results.1"
set conti=file2
goto check
:file2
set file="results.2"
set conti=finish
goto check
:check
if exist %file% goto copy
echo File %file% is not found.
echo Please make sure that the file %file% is present in the same directory.
echo.
echo Press Ctrl C to terminate the batch job or
pause
goto check
:copy
echo Restoring %file% ...
if %conti% == file2 goto firstfile
copy /B "results.txt" + %file% "results.txt" > nul
goto %conti%
:firstfile
copy /B %file% "results.txt" > nul
goto %conti%
:finish
cls
set conti=finish1
goto pic
:finish1
echo The file 'results.txt' has been restored.
echo.
:end
echo The slices will be deleted.
echo.
echo Press Ctrl C to keep them or
pause
del "results.1"
del "results.2"
echo.
echo Slices have been deleted...


[XS]riptide
2007-10-06 20:20:39
Seems yoiur smilie maker thinks my syntax is smily.
[XS]riptide
2007-10-06 20:27:53
This worked.....

@echo off
set conti=start1
ic
goto %conti%
tart1
echo The file 'results.txt' will be restored.
echo.
echo Press Ctrl C to terminate the batch job or
pause
cls
set conti=res
goto pic
:res
if not exist "results.txt" goto file
echo The file 'results.txt' could not be restored
echo since it is already in the directory.
echo.
goto end
:file
echo The file 'results.txt' is being restored.
echo.
:file1
set file="Cocuments and SettingsNeil.PRIMARY1.000DesktopDPADresults.txt"
set conti=file2
goto check
:file2
set file="Cocuments and SettingsNeil.PRIMARY1.000DesktopDPAD2results.txt"
set conti=finish
goto check
:check
if exist %file% goto copy
echo File %file% is not found.
echo Please make sure that the file %file% is present in the same directory.
echo.
echo Press Ctrl C to terminate the batch job or
pause
goto check
:copy
echo Restoring %file% ...
if %conti% == file2 goto firstfile
copy /B "results.txt" + %file% "results.txt" > nul
goto %conti%
:firstfile
copy /B %file% "results.txt" > nul
goto %conti%
:finish
cls
set conti=finish1
goto pic
:finish1
echo The file 'results.txt' has been restored.
echo.
:end
echo The slices will be deleted.
echo.
echo Press Ctrl C to keep them or
pause
del "Cocuments and SettingsNeil.PRIMARY1.000DesktopDPADresults.txt"
del "Cocuments and SettingsNeil.PRIMARY1.000DesktopDPAD2results.txt"
echo.
echo Slices have been deleted...
Stephen Brooks
2007-10-06 21:49:57

copy /B mallards.txt+bollards.txt out.txt
del mallards.txt bollards.txt


That script concatenates mallards.txt onto bollards.txt and makes the output out.txt, deleting the originals.  It's a bit simpler (may not have so much crud in as a repurposed script).
Stephen Brooks
2007-10-06 21:53:38
I'm not sure if the /B switch is even needed.  You can also add a /Z switch which "copies networked files in restartable mode", not sure what that means but it might make it more stable.
Stephen Brooks
2007-10-06 21:57:52
Appears you can even concatenate a file right onto the end of another, so you'd want to do something like
copy /B \\computer\share\muon1\results.txt+C:\muon1\results.txt \\computer\share\muon1\results.txt
del C:\muon1\results.txt
[XS]riptide
2007-10-06 22:02:22
Well I'll use these above when I get back at DPAD next week sometime.
: contact : - - -
E-mail: sbstrudel characterstephenbrooks.orgTwitter: stephenjbrooksMastodon: strudel charactersjbstrudel charactermstdn.io RSS feed

Site has had 26783976 accesses.