diff --git a/Source/smokeview/IOgeometry.c b/Source/smokeview/IOgeometry.c index 0405b7bcc9..902a137b14 100644 --- a/Source/smokeview/IOgeometry.c +++ b/Source/smokeview/IOgeometry.c @@ -2483,7 +2483,7 @@ FILE_SIZE ReadGeomData(patchdata *patchi, slicedata *slicei, int load_flag, int } if(FileExistsOrig(patchi->bound_file)==0){ - float *vals, valmin, valmax; + float *vals, valmin=0.0, valmax=1.0; vals = patchi->geom_vals; if(strcmp(patchi->label.shortlabel, "t_a") == 0){ @@ -2503,11 +2503,13 @@ FILE_SIZE ReadGeomData(patchdata *patchi, slicedata *slicei, int load_flag, int } } else{ - valmin = vals[0]; - valmax = valmin; - for(i = 1;i < nvals;i++){ - valmin = MIN(vals[i], valmin); - valmax = MAX(vals[i], valmax); + if(nvals > 0){ + valmin = vals[0]; + valmax = valmin; + for(i = 1; i < nvals; i++){ + valmin = MIN(vals[i], valmin); + valmax = MAX(vals[i], valmax); + } } } WriteFileBounds(patchi->bound_file, valmin, valmax); diff --git a/Verification/scripts/CheckFDSCases.bat b/Verification/scripts/CheckFDSCases.bat new file mode 100644 index 0000000000..08757a33a4 --- /dev/null +++ b/Verification/scripts/CheckFDSCases.bat @@ -0,0 +1,11 @@ +@echo off +setlocal + +set CURDIR=%CD% +cd ..\..\.. +set GITROOT=%CD% + +cd %CURDIR% +call FDSCases check fds + +cd %CURDIR% diff --git a/Verification/scripts/CheckSmvCases.bat b/Verification/scripts/CheckSmvCases.bat new file mode 100644 index 0000000000..ed2aee7461 --- /dev/null +++ b/Verification/scripts/CheckSmvCases.bat @@ -0,0 +1,11 @@ +@echo off +setlocal + +set CURDIR=%CD% +cd ..\..\.. +set GITROOT=%CD% + +cd %CURDIR% +call SMVCases check smv + +cd %CURDIR% diff --git a/Verification/scripts/FDS_Cases.bat b/Verification/scripts/FDSCases.bat similarity index 83% rename from Verification/scripts/FDS_Cases.bat rename to Verification/scripts/FDSCases.bat index a2b64ec3bc..e5d8f133d8 100644 --- a/Verification/scripts/FDS_Cases.bat +++ b/Verification/scripts/FDSCases.bat @@ -3,11 +3,16 @@ set exe=%1 set option=%2 setlocal +set allfinished=1 + cd ..\..\..\fds\Verification set verdir=%CD% cd ..\..\smv\Verification set smvverdir=%CD% +cd scripts\bin +set GREP=%CD%\grep.exe +set WC=%CD%\wc.exe cd %verdir% @@ -72,7 +77,7 @@ set run=call :runit %exe% %option% %run% WUI Bova_1b %run% WUI Bova_4a %run% WUI level_set_fuel_model_1 - +if %exe% == check if %allfinished% == 1 echo all cases finished goto eof :runit @@ -82,8 +87,21 @@ goto eof set input=%4 cd %verdir%\%casedir% + + set finished=0 + if exist %input%.out %GREP% -E only^|success %input%.out | %WC% -l > %input%.wc + set /p finished=<%input%.wc + if %finished% == 1 if x%runallcases% == x0 if %option% == fds exit /b + + if %prog% == check goto skip1 + if %option% == fds timeout /t 2 /nobreak & start "%input%" cmd /c "%smvverdir%\scripts\background.bat %prog% %input%.fds" if %option% == smv %prog% -runscript %input% exit /b -:eof +:skip1 + if %finished% == 0 echo %input% did not finish + if %finished% == 0 set allfinished=0 + exit /b + +:eof \ No newline at end of file diff --git a/Verification/scripts/MakeFDSPictures.bat b/Verification/scripts/MakeFDSPictures.bat index 3a8597e685..7d32484b93 100644 --- a/Verification/scripts/MakeFDSPictures.bat +++ b/Verification/scripts/MakeFDSPictures.bat @@ -17,5 +17,5 @@ if exist %SMVEXE% goto skip1 ::erase %GITROOT%\smv\Manuals\SMV_Verification_Guide\SCRIPT_FIGURES\*.png cd %CURDIR% -call FDS_Cases %SMVEXE% smv +call FDSCases %SMVEXE% smv cd %CURDIR% diff --git a/Verification/scripts/MakeSmvPictures.bat b/Verification/scripts/MakeSmvPictures.bat index e5d068afee..eccab3a7d5 100644 --- a/Verification/scripts/MakeSmvPictures.bat +++ b/Verification/scripts/MakeSmvPictures.bat @@ -30,6 +30,6 @@ erase %GITROOT%\smv\Manuals\SMV_User_Guide\SCRIPT_FIGURES\*.png erase %GITROOT%\smv\Manuals\SMV_Verification_Guide\SCRIPT_FIGURES\*.png cd %CURDIR% -call SMV_Cases %SMVEXE% smv +call SMVCases %SMVEXE% smv copy %GITROOT%\smv\Manuals\SMV_Verification_Guide\SCRIPT_FIGURES\fds_smv_version.png %GITROOT%\smv\Manuals\SMV_Summary\images cd %CURDIR% diff --git a/Verification/scripts/RunFDSCases.bat b/Verification/scripts/RunFDSCases.bat index ee85625cf7..514f7abf21 100644 --- a/Verification/scripts/RunFDSCases.bat +++ b/Verification/scripts/RunFDSCases.bat @@ -1,4 +1,5 @@ @echo off +set runallcases=%1 setlocal set CURDIR=%CD% @@ -15,7 +16,7 @@ if exist %FDSEXE% goto skip1 call fdsinit > Nul 2>&1 cd %CURDIR% -call FDS_Cases %FDSEXE% fds +call FDSCases %FDSEXE% fds %runallcases% cd %GITROOT%\fds git describe > %CURDIR%\fds_revision.txt diff --git a/Verification/scripts/RunFDSPictures.bat b/Verification/scripts/RunFDSPictures.bat new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Verification/scripts/RunSmvCases.bat b/Verification/scripts/RunSmvCases.bat index 4e19632884..1cd1d3b821 100644 --- a/Verification/scripts/RunSmvCases.bat +++ b/Verification/scripts/RunSmvCases.bat @@ -1,4 +1,5 @@ @echo off +set runallcases=%1 setlocal set CURDIR=%CD% @@ -15,7 +16,7 @@ if exist %FDSEXE% goto skip1 call fdsinit > Nul 2>&1 cd %CURDIR% -call SMV_Cases %FDSEXE% fds +call SMVCases %FDSEXE% fds %runallcases% cd %GITROOT%\fds git describe > %CURDIR%\fds_revision.txt diff --git a/Verification/scripts/SMV_Cases.bat b/Verification/scripts/SmvCases.bat similarity index 77% rename from Verification/scripts/SMV_Cases.bat rename to Verification/scripts/SmvCases.bat index cec1baee24..8e3b79ef4b 100644 --- a/Verification/scripts/SMV_Cases.bat +++ b/Verification/scripts/SmvCases.bat @@ -2,10 +2,16 @@ @echo off set exe=%1 set option=%2 +set runallcases=%3 setlocal +set allfinished=1 cd .. set verdir=%CD% +cd scripts\bin +set GREP=%CD%\grep.exe +set WC=%CD%\wc.exe +cd %verdir% set run=call :runit %exe% %option% @@ -53,7 +59,7 @@ set run=call :runit %exe% %option% %run% Visualization vcirctest %run% Visualization version %run% Visualization version2 - +if %exe% == check if %allfinished% == 1 echo all cases finished goto eof :runit @@ -63,8 +69,21 @@ goto eof set input=%4 cd %verdir%\%casedir% + + set finished=0 + if exist %input%.out %GREP% -E only^|success %input%.out | %WC% -l > %input%.wc + set /p finished=<%input%.wc + if %finished% == 1 if x%runallcases% == x0 if %option% == fds exit /b + + if %prog% == check goto skip1 + if %option% == fds timeout /t 2 /nobreak & start "%input%" cmd /c "%verdir%\scripts\background.bat %prog% %input%.fds" if %option% == smv %prog% -runscript %input% exit /b +:skip1 + if %finished% == 0 echo %input% did not finish + if %finished% == 0 set allfinished=0 + exit /b + :eof \ No newline at end of file