airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject airavata git commit: testing multi experiments within a for loop
Date Mon, 29 Jun 2015 19:18:43 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 73a2de037 -> 2bab70875


testing multi experiments within a for loop


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/2bab7087
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/2bab7087
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/2bab7087

Branch: refs/heads/airavata-0.15-release-branch
Commit: 2bab70875e3a29c76de209323fda83f8e642bd06
Parents: 73a2de0
Author: Suresh Marru <smarru@apache.org>
Authored: Mon Jun 29 15:18:35 2015 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Mon Jun 29 15:18:35 2015 -0400

----------------------------------------------------------------------
 .../conf/airavata-client-properties.ini         |  45 ++++---
 .../resources/conf/app-catalog-identifiers.ini  |  41 ++++---
 .../tmp_test_multiple_experiments.php           | 122 +++++++++++++++++++
 3 files changed, 166 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2bab7087/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
index 2052d67..7d81637 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
@@ -1,23 +1,21 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
+;
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements.  See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership.  The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License.  You may obtain a copy of the License at
+;
+;   http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied.  See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
 
 ; The is the configuration file with properties needed by Airavata Clients.
 ;   Key properties specify location of Airavata Services, Ports and Such.
@@ -29,12 +27,13 @@ THRIFT_LIB_DIR = "../lib/Thrift/"
 AIRAVATA_PHP_STUBS_DIR = "../lib/Airavata/"
 
 ; Host which runs the Airavata Server
-AIRAVATA_SERVER = "gw111.iu.xsede.org"
+;AIRAVATA_SERVER = "gw111.iu.xsede.org"
+AIRAVATA_SERVER = "gw154.iu.xsede.org"
 ;AIRAVATA_SERVER = "localhost"
 
 ; Airavata Server thrift port
-AIRAVATA_PORT = 9930
-;AIRAVATA_PORT = 8930
+;AIRAVATA_PORT = 9930
+AIRAVATA_PORT = 8930
 
 ; Time out value to give enough breathing room for client to get synchronous responses back
 AIRAVATA_TIMEOUT = 50000

http://git-wip-us.apache.org/repos/asf/airavata/blob/2bab7087/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini
index a080c5d..5e7d63b 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/app-catalog-identifiers.ini
@@ -1,22 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+;
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements.  See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership.  The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License.  You may obtain a copy of the License at
+;
+;   http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied.  See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
 
-#Apache Airavata Gateway to Airavata Deployment Identifiers
-#Wed Jul 23 10:48:34 EDT 2014
+
+;Apache Airavata Gateway to Airavata Deployment Identifiers
+;Wed Jul 23 10:48:34 EDT 2014
 espressoInterfaceId=ESPRESSO_fcc4ab64-94f8-40f1-9811-f919b7ee4cd9
 amberInterfaceId=Amber_0489ef37-1184-4f5d-93c8-5f42fdd559ad
 gromacsInterfaceId=GROMACS_9a9dd63b-598b-45d7-8277-b66e76032b95
@@ -28,5 +31,5 @@ wrfInterfaceId=WRF_a390e041-cae3-4b85-9bb9-e03df666deb9
 autoDockInterfaceId=
 nwChemInterfaceId=NWChem_bdc7b97a-dd39-49cb-b203-6d779781d5c8
 lammpsInterfaceId=LAMMPS_f43520e2-b77a-4f11-b3b7-98693349fcd0
-#echoInterfaceId=Echo_271e6d47-a5db-434e-8453-e27985b7ea59
+;echoInterfaceId=Echo_271e6d47-a5db-434e-8453-e27985b7ea59
 echoInterfaceId=Echo_c6e6aaac-7d9d-44fc-aba2-63b5100528e8

http://git-wip-us.apache.org/repos/asf/airavata/blob/2bab7087/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/tmp_test_multiple_experiments.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/tmp_test_multiple_experiments.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/tmp_test_multiple_experiments.php
new file mode 100755
index 0000000..480f6d8
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/tmp_test_multiple_experiments.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache V2
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+use Airavata\Model\Workspace\Project;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\AppCatalog\AppInterface\InputDataObjectType;
+
+try {
+    /* User provides input values */
+    $gatewayId = 'ultrascan';
+    $userName = 'us3';
+    $projectId = 'ultrascan_cd0900d4-2b4d-4919-9aa2-b7649ea1f391';
+    $applicationId = 'Ultrascan_856df1d5-944a-49d3-a476-d969e57a8f37';
+    $credStoreToken = '00409bfe-8e5f-4e50-b8eb-138bf0158e90';
+
+//  $hostId = 'stampede.tacc.xsede.org_28c4bf70-ed52-4f87-b481-31a64a1f5808';
+//  $hostId = 'lonestar.tacc.utexas.edu_6d62fa0c-a9b1-4414-a76a-a4e2cbd9d290';
+    $hostId = 'alamo.uthscsa.edu_a591c220-345b-4f67-9337-901b76360df6';
+    $queueName = 'batch';
+//  $hostId = 'comet-ln1.sdsc.edu_0bb9bd78-b5e7-40cf-a5dd-fd6f8bd6b537';
+//    $queueName = 'compute';
+//  $hostId = 'gordon.sdsc.edu_9ee43a5a-cee7-4efd-996b-4fc11662a726';
+
+    $scheduling = new ComputationalResourceScheduling();
+    $scheduling->resourceHostId = $hostId;
+    $scheduling->queueName = $queueName;
+    $scheduling->totalCPUCount = 1;
+    $scheduling->nodeCount = 1;
+    $scheduling->wallTimeLimit = 15;
+
+    $userConfigurationData = new UserConfigurationData();
+    $userConfigurationData->airavataAutoSchedule = 0;
+    $userConfigurationData->overrideManualScheduledParams = 0;
+    $userConfigurationData->computationalResourceScheduling = $scheduling;
+
+    for ($expCount = 1; $expCount <= 2; $expCount++) {
+
+        $experimentName = "Experiment$expCount";
+
+        $applicationInputs = $airavataclient->getApplicationInputs($applicationId);
+        foreach ($applicationInputs as $applicationInput){
+            if($applicationInput->name =='input'){
+                $applicationInput->value = "test_dummy_app_input$expCount";
+            } else if($applicationInput->name =='walltime'){
+                $applicationInput->value = "-walltime=" . 10;
+            } else if($applicationInput->name =='mgroupcount'){
+                $applicationInput->value = "-mgroupcount=" . 1;
+            }
+        }
+        $experimentInputs = $applicationInputs;
+
+        $experiment = new Experiment();
+        $experiment->projectID = $projectId;
+        $experiment->userName = $userName;
+        $experiment->name = $experimentName;
+        $experiment->applicationId = $applicationId;
+        $experiment->userConfigurationData = $userConfigurationData;
+        $experiment->experimentInputs = $experimentInputs;
+
+        $experimentId = $airavataclient->createExperiment($gatewayId, $experiment);
+
+        if ($experimentId) {
+            //var_dump($experiment);
+            echo "Experiment$expCount is successfully created with id  $experimentId    "."\n";
+        } else {
+            echo "Failed to create experiment. \n"."\n";
+        }
+
+        $airavataclient->launchExperiment($experimentId, $credStoreToken);
+        echo "Launched Experiment$expCount Successfully \n";
+    }
+
+
+} catch (InvalidRequestException $ire) {
+    print 'Invalid Request Exception: ' . $ire->getMessage() . "\n";
+} catch (AiravataClientException $ace) {
+    print 'Airavata System Exception: ' . $ace->getMessage() . "\n";
+} catch (AiravataSystemException $ase) {
+    print 'Airavata System Exception: ' . $ase->getMessage() . "\n";
+}
+
+$transport->close();
+
+?>


Mime
View raw message