Created
February 5, 2016 16:16
-
-
Save ftessier/a4e5d0ee255ba4f6f338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM ################################################################################# | |
REM | |
REM usage: | |
REM egs-parallel.bat (or double-click on this file) | |
REM | |
REM ################################################################################# | |
REM # ask about command and number of processes | |
echo. | |
set /p egscommand=Enter the EGSnrc command you want to run: | |
set /p nstr=Enter number of parallel jobs: | |
set /a n=%nstr% | |
REM # Ready? | |
echo. | |
choice /N /M "Ready to run %egscommand% using %n% jobs [YN] ? " | |
if errorlevel 2 exit /b | |
REM ### launch $n EGSnrc jobs in parallel, in the background | |
echo. | |
for /l %%j in (1,1,%n%) do ( | |
echo LAUNCHING job %%j of %n%: %egscommand% -b -P %n% -j %%j -f 1 | |
start /b %egscommand% -b -P %n% -j %%j -f 1 >NUL 2>&1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I answered myself, I just had to add a delay after each command call, I added:
timeout /t 2 /nobreak > NUL
after line 25 (start /b ...)
have a nice day!.