|
1 | 1 | @echo off |
| 2 | +Setlocal EnableDelayedExpansion |
| 3 | + |
2 | 4 | for /r "." %%a in (build\bin\*_omp.exe) do ( |
3 | 5 | echo ------------------------------------- |
4 | 6 | echo %%~na |
5 | 7 | echo ------------------------------------- |
| 8 | + set start=!time! |
6 | 9 | %%~fa --gtest_repeat=10 |
| 10 | + set end=!time! |
| 11 | + |
| 12 | + set options="tokens=1-4 delims=:.," |
| 13 | + for /f %options% %%a in ("!start!") do ( |
| 14 | + set start_h=%%a |
| 15 | + set /a start_m=100%%b %% 100 |
| 16 | + set /a start_s=100%%c %% 100 |
| 17 | + set /a start_ms=100%%d %% 100 |
| 18 | + ) |
| 19 | + for /f %options% %%a in ("!end!") do ( |
| 20 | + set end_h=%%a |
| 21 | + set /a end_m=100%%b %% 100 |
| 22 | + set /a end_s=100%%c %% 100 |
| 23 | + set /a end_ms=100%%d %% 100 |
| 24 | + ) |
| 25 | + |
| 26 | + set /a hours=!end_h!-!start_h! |
| 27 | + set /a mins=!end_m!-!start_m! |
| 28 | + set /a secs=!end_s!-!start_s! |
| 29 | + set /a ms=!end_ms!-!start_ms! |
| 30 | + |
| 31 | + if !ms! lss 0 set /a secs = !secs! - 1 & set /a ms = 100!ms! |
| 32 | + if !secs! lss 0 set /a mins = !mins! - 1 & set /a secs = 60!secs! |
| 33 | + if !mins! lss 0 set /a hours = !hours! - 1 & set /a mins = 60!mins! |
| 34 | + if !hours! lss 0 set /a hours = 24!hours! |
| 35 | + if 1!ms! lss 100 set ms=0!ms! |
| 36 | + set /a totalsecs = !hours!*3600 + !mins!*60 + !secs! |
| 37 | + if !totalsecs! gtr 5 ( |
| 38 | + echo Alert: runtime greater then 5 sec. |
| 39 | + echo runtime = !totalsecs! sec. |
| 40 | + exit /b 1 |
| 41 | + ) |
7 | 42 | ) |
8 | 43 |
|
9 | 44 | for /r "." %%a in (build\bin\*_tbb.exe) do ( |
10 | 45 | echo ------------------------------------- |
11 | 46 | echo %%~na |
12 | 47 | echo ------------------------------------- |
| 48 | + set start=!time! |
13 | 49 | %%~fa --gtest_repeat=10 |
| 50 | + set end=!time! |
| 51 | + |
| 52 | + set options="tokens=1-4 delims=:.," |
| 53 | + for /f %options% %%a in ("!start!") do ( |
| 54 | + set start_h=%%a |
| 55 | + set /a start_m=100%%b %% 100 |
| 56 | + set /a start_s=100%%c %% 100 |
| 57 | + set /a start_ms=100%%d %% 100 |
| 58 | + ) |
| 59 | + for /f %options% %%a in ("!end!") do ( |
| 60 | + set end_h=%%a |
| 61 | + set /a end_m=100%%b %% 100 |
| 62 | + set /a end_s=100%%c %% 100 |
| 63 | + set /a end_ms=100%%d %% 100 |
| 64 | + ) |
| 65 | + |
| 66 | + set /a hours=!end_h!-!start_h! |
| 67 | + set /a mins=!end_m!-!start_m! |
| 68 | + set /a secs=!end_s!-!start_s! |
| 69 | + set /a ms=!end_ms!-!start_ms! |
| 70 | + |
| 71 | + if !ms! lss 0 set /a secs = !secs! - 1 & set /a ms = 100!ms! |
| 72 | + if !secs! lss 0 set /a mins = !mins! - 1 & set /a secs = 60!secs! |
| 73 | + if !mins! lss 0 set /a hours = !hours! - 1 & set /a mins = 60!mins! |
| 74 | + if !hours! lss 0 set /a hours = 24!hours! |
| 75 | + if 1!ms! lss 100 set ms=0!ms! |
| 76 | + set /a totalsecs = !hours!*3600 + !mins!*60 + !secs! |
| 77 | + if !totalsecs! gtr 5 ( |
| 78 | + echo Alert: runtime greater then 5 sec. |
| 79 | + echo runtime = !totalsecs! sec. |
| 80 | + exit /b 1 |
| 81 | + ) |
14 | 82 | ) |
15 | 83 |
|
16 | 84 | for /r "." %%a in (build\bin\*_std.exe) do ( |
17 | 85 | echo ------------------------------------- |
18 | 86 | echo %%~na |
19 | 87 | echo ------------------------------------- |
| 88 | + set start=!time! |
20 | 89 | %%~fa --gtest_repeat=10 |
| 90 | + set end=!time! |
| 91 | + |
| 92 | + set options="tokens=1-4 delims=:.," |
| 93 | + for /f %options% %%a in ("!start!") do ( |
| 94 | + set start_h=%%a |
| 95 | + set /a start_m=100%%b %% 100 |
| 96 | + set /a start_s=100%%c %% 100 |
| 97 | + set /a start_ms=100%%d %% 100 |
| 98 | + ) |
| 99 | + for /f %options% %%a in ("!end!") do ( |
| 100 | + set end_h=%%a |
| 101 | + set /a end_m=100%%b %% 100 |
| 102 | + set /a end_s=100%%c %% 100 |
| 103 | + set /a end_ms=100%%d %% 100 |
| 104 | + ) |
| 105 | + |
| 106 | + set /a hours=!end_h!-!start_h! |
| 107 | + set /a mins=!end_m!-!start_m! |
| 108 | + set /a secs=!end_s!-!start_s! |
| 109 | + set /a ms=!end_ms!-!start_ms! |
| 110 | + |
| 111 | + if !ms! lss 0 set /a secs = !secs! - 1 & set /a ms = 100!ms! |
| 112 | + if !secs! lss 0 set /a mins = !mins! - 1 & set /a secs = 60!secs! |
| 113 | + if !mins! lss 0 set /a hours = !hours! - 1 & set /a mins = 60!mins! |
| 114 | + if !hours! lss 0 set /a hours = 24!hours! |
| 115 | + if 1!ms! lss 100 set ms=0!ms! |
| 116 | + set /a totalsecs = !hours!*3600 + !mins!*60 + !secs! |
| 117 | + if !totalsecs! gtr 5 ( |
| 118 | + echo Alert: runtime greater then 5 sec. |
| 119 | + echo runtime = !totalsecs! sec. |
| 120 | + exit /b 1 |
| 121 | + ) |
21 | 122 | ) |
22 | 123 |
|
23 | 124 | for /r "." %%a in (build\bin\*_mpi.exe) do ( |
24 | 125 | echo ------------------------------------- |
25 | 126 | echo %%~na |
26 | 127 | echo ------------------------------------- |
| 128 | + set start=!time! |
27 | 129 | for /l %%x in (1, 1, 10) do ( |
28 | 130 | mpiexec -np 4 %%~fa || exit /b 1 |
29 | 131 | ) |
| 132 | + set end=!time! |
| 133 | + |
| 134 | + set options="tokens=1-4 delims=:.," |
| 135 | + for /f %options% %%a in ("!start!") do ( |
| 136 | + set start_h=%%a |
| 137 | + set /a start_m=100%%b %% 100 |
| 138 | + set /a start_s=100%%c %% 100 |
| 139 | + set /a start_ms=100%%d %% 100 |
| 140 | + ) |
| 141 | + for /f %options% %%a in ("!end!") do ( |
| 142 | + set end_h=%%a |
| 143 | + set /a end_m=100%%b %% 100 |
| 144 | + set /a end_s=100%%c %% 100 |
| 145 | + set /a end_ms=100%%d %% 100 |
| 146 | + ) |
| 147 | + |
| 148 | + set /a hours=!end_h!-!start_h! |
| 149 | + set /a mins=!end_m!-!start_m! |
| 150 | + set /a secs=!end_s!-!start_s! |
| 151 | + set /a ms=!end_ms!-!start_ms! |
| 152 | + |
| 153 | + if !ms! lss 0 set /a secs = !secs! - 1 & set /a ms = 100!ms! |
| 154 | + if !secs! lss 0 set /a mins = !mins! - 1 & set /a secs = 60!secs! |
| 155 | + if !mins! lss 0 set /a hours = !hours! - 1 & set /a mins = 60!mins! |
| 156 | + if !hours! lss 0 set /a hours = 24!hours! |
| 157 | + if 1!ms! lss 100 set ms=0!ms! |
| 158 | + set /a totalsecs = !hours!*3600 + !mins!*60 + !secs! |
| 159 | + if !totalsecs! gtr 5 ( |
| 160 | + echo Alert: runtime greater then 5 sec. |
| 161 | + echo runtime = !totalsecs! sec. |
| 162 | + exit /b 1 |
| 163 | + ) |
30 | 164 | ) |
0 commit comments