diff options
Diffstat (limited to 'sourcecodes')
| -rw-r--r-- | sourcecodes/bn_file_load_gom.php | 5 | ||||
| -rw-r--r-- | sourcecodes/execute_bn_gom.php | 9 | ||||
| -rw-r--r-- | sourcecodes/executionprogress_default.php | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/sourcecodes/bn_file_load_gom.php b/sourcecodes/bn_file_load_gom.php index a09c8bf0..4f5945e2 100644 --- a/sourcecodes/bn_file_load_gom.php +++ b/sourcecodes/bn_file_load_gom.php @@ -11,6 +11,8 @@ include("header_new.inc"); include("header_batchsearch.inc"); include("runtime_check.php"); include("input_validate.php"); +require("terminal_commands.php"); + $searchID=""; $UploadValue="NO"; @@ -147,7 +149,8 @@ if($searchID!="") } } $keyval = valid_keyval($keyval); - shell_exec('./run_scripts/run_prep_input '.$keyval); + runTerminalCommand(// assumes /tmp/bnw exists + [realpath(__DIR__.'/run_scripts/run_prep_input'), $keyval]); $parent_number=4; $k_number=1; $runtime=exe_time($keyval,$parent_number,$k_number); diff --git a/sourcecodes/execute_bn_gom.php b/sourcecodes/execute_bn_gom.php index 93d46309..920c3747 100644 --- a/sourcecodes/execute_bn_gom.php +++ b/sourcecodes/execute_bn_gom.php @@ -1,6 +1,8 @@ <?php include("input_validate.php"); +require("terminal_commands.php"); + $keyval=valid_keyval($_GET["My_key"]); //////////////execute c codes for local score/////////////////// @@ -25,10 +27,7 @@ $thr=file_get_contents("$thrfile"); //$thr=valid_input($thr); $thr=trim($thr); - -//$cmd="./run.sh $keyval $maxp $maxk"; -//system($cmd); -shell_exec('./run.sh '.$keyval.' '.$maxp.' '.$maxk.' '.$thr); +runTerminalCommand([realpath(__DIR__).'/run.sh', $keyval, $maxp, $maxk, $thr]); /////////////////////////////////structure matrix////////////////////////////////////////////////////////// @@ -93,7 +92,7 @@ if ($fout !== false) { } -shell_exec('./run_scripts/run_octave '.$keyval); +runTerminalCommand([realpath(__DIR__.'/run_scripts/run_octave'), $keyval]); ?> <script> diff --git a/sourcecodes/executionprogress_default.php b/sourcecodes/executionprogress_default.php index e609bfa4..88d877ac 100644 --- a/sourcecodes/executionprogress_default.php +++ b/sourcecodes/executionprogress_default.php @@ -4,6 +4,7 @@ include("header_new.inc"); include("runtime_check.php"); include("input_validate.php"); +require("terminal_commands.php"); $keyval=valid_keyval($_GET["My_key"]); //$dir="./data/"; @@ -24,7 +25,7 @@ $k_number=trim($k_number); //////////////////Check execution time/////////////////////////////////////////////// $runtime=exe_time($keyval,$parent_number,$k_number); -shell_exec('./run_scripts/run_settings '.$keyval); +runTerminalCommand([realpath(__DIR__.'/run_scripts/run_settings'), $keyval]); ?> <div id="execute_div"> |
