예제 #1
0
<?php

include "airavata.php";
$projId = createProject("admin", "test");
echo var_dump($projId);
$expId = createExperiment("admin", "exp5", $projId, "test", "{\"input1\":\"13\",\"input2\":\"3\",\"input3\":\"true\"}");
// $expId =  "exp5_e7b826cf-a429-4b3e-b519-28d859fe4b64";
echo var_dump($expId);
$res = launchExperiment($expId);
echo var_dump($res);
while (($status = get_experiment_status($expId)) != "COMPLETED") {
    echo "{$status}\n";
    sleep(1);
}
$results = getOutput($expId);
echo var_dump($results);
예제 #2
0
파일: create.php 프로젝트: nickavv/iSENSE
     $name = safeString($_POST['experiment_name']);
 }
 if ($name == "") {
     array_push($errors, 'Experiment name can not be blank.');
 }
 $values['name'] = $name;
 $desc = "";
 if (isset($_POST['experiment_description'])) {
     $desc = safeString($_POST['experiment_description']);
 }
 if ($desc == "") {
     array_push($errors, 'Experiment description can not be blank.');
 }
 $values['description'] = $desc;
 if (count($errors) == 0) {
     if ($exp = createExperiment($session->generateSessionToken(), $name, $desc, "")) {
         $tag_list = array();
         // Add tags from description and title
         $auto_added = array();
         $auto_tags = explode(' ', $name . ' ' . $desc);
         foreach ($auto_tags as $t) {
             if (!in_array($t, $auto_added)) {
                 $val = safeString(str_replace(",", "", $t));
                 if (strlen($val) > 0) {
                     $tag_list[] = array('value' => $val, 'weight' => 1);
                 }
             }
         }
         // Add user specified tags to experiment
         $user_tags = explode(' ', safeString($_POST['experiment_tags']));
         foreach ($user_tags as $t) {