@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | // |
| 97 | 97 | function unzip_batch_file($user, $batch_file) { |
| 98 | 98 | @mkdir("../../buda_batches"); |
| 99 | - for ($i=0; $i<1000; $i++) { |
|
| 99 | + for ($i = 0; $i < 1000; $i++) { |
|
| 100 | 100 | $batch_dir = "../../buda_batches/$i"; |
| 101 | 101 | $batch_dir_name = $i; |
| 102 | 102 | $ret = @mkdir($batch_dir); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | $job_files = []; |
| 149 | 149 | $cmdline = ''; |
| 150 | - foreach(scandir("$batch_dir/$fname") as $f2) { |
|
| 150 | + foreach (scandir("$batch_dir/$fname") as $f2) { |
|
| 151 | 151 | if ($f2[0] == '.') continue; |
| 152 | 152 | if ($f2 == 'cmdline') { |
| 153 | 153 | $cmdline = trim(file_get_contents("$batch_dir/$fname/cmdline")); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | function stage_input_files($batch_dir, $batch_desc, $batch_id) { |
| 202 | 202 | $n = count($batch_desc->shared_files); |
| 203 | 203 | $batch_desc->shared_files_phys_names = []; |
| 204 | - for ($i=0; $i<$n; $i++) { |
|
| 204 | + for ($i = 0; $i < $n; $i++) { |
|
| 205 | 205 | $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]); |
| 206 | 206 | [$md5, $size] = $batch_desc->shared_file_infos[$i]; |
| 207 | 207 | $phys_name = sprintf('batch_%d_%s', $batch_id, $md5); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | foreach ($batch_desc->jobs as $job) { |
| 212 | 212 | $n = count($batch_desc->unshared_files); |
| 213 | 213 | $job->phys_names = []; |
| 214 | - for ($i=0; $i<$n; $i++) { |
|
| 214 | + for ($i = 0; $i < $n; $i++) { |
|
| 215 | 215 | $path = sprintf('%s/%s/%s', |
| 216 | 216 | $batch_dir, $job->dir, $batch_desc->unshared_files[$i] |
| 217 | 217 | ); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | $job_cmds .= "$job_cmd\n"; |
| 251 | 251 | } |
| 252 | 252 | $wrapper_cmdline = sprintf('"%s %s"', |
| 253 | - $wrapper_verbose?'--verbose':'', |
|
| 253 | + $wrapper_verbose ? '--verbose' : '', |
|
| 254 | 254 | $cmdline |
| 255 | 255 | ); |
| 256 | 256 | $cmd = sprintf( |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | if ($max_runtime_days <= 0) error_page('bad runtime limit'); |
| 302 | 302 | if ($max_runtime_days > 100) error_page('bad runtime limit'); |
| 303 | 303 | |
| 304 | - $max_fpops = $max_runtime_days * AVG_CPU_FPOPS * 86400; |
|
| 304 | + $max_fpops = $max_runtime_days*AVG_CPU_FPOPS*86400; |
|
| 305 | 305 | |
| 306 | 306 | $exp_runtime_days = get_str('exp_runtime_days'); |
| 307 | 307 | if (!is_numeric($exp_runtime_days)) error_page('bad expected runtime'); |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | if ($exp_runtime_days > $max_runtime_days) { |
| 312 | 312 | error_page('exp must be < max runtime'); |
| 313 | 313 | } |
| 314 | - $exp_fpops = $exp_runtime_days * AVG_CPU_FPOPS * 86400; |
|
| 314 | + $exp_fpops = $exp_runtime_days*AVG_CPU_FPOPS*86400; |
|
| 315 | 315 | |
| 316 | 316 | $app_desc = get_buda_app_desc($app); |
| 317 | 317 | |