Hi Phillip,
Thought this might interest you - a batch file that allows you to set the maximum number of models that can be run at one time.
Essentially it goes into an infinite loop when there are less Tuflow executables running than the maximum specified (denoted by CPU_Cores in the batch file below). When an executable becomes available, it returns control to the for loops.
Cheers,
Ben
@ echo off
Set A=Current PropZone PropZoneMitigation
Set B=20yr 200yr
set /a CPU_Cores=2
FOR %%a in (%A%) DO (
FOR %%b in (%B%) DO (
call :do_while_loop_start
Start "TUFLOW" "C:\Program Files\SMS 11.0\models\TUFLOW\64bit\TUFLOW_iSP_w64.exe" -b -s1 %%a -e1 %%b Avoca_Heathcote.tcf
)
)
Pause
:do_while_loop_start
set /a count=0
or /f "skip=3" %%x in ('tasklist /FI "IMAGENAME eq TUFLOW_iSP_w64.exe"') do set /a count=count+1
if %count% geq %CPU_Cores% (
PING 1.1.1.1 -n 1 -w 60000 >NUL
goto do_while_loop_start
)