You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/07/13 14:08:42 UTC
git commit: Updating the slurm script within the gsissh resources
Repository: airavata
Updated Branches:
refs/heads/master 6a4b162fb -> 16d2d38f0
Updating the slurm script within the gsissh resources
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/16d2d38f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/16d2d38f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/16d2d38f
Branch: refs/heads/master
Commit: 16d2d38f01f67435469287aa375fce80c57255c4
Parents: 6a4b162
Author: Suresh Marru <sm...@apache.org>
Authored: Sun Jul 13 08:08:34 2014 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Sun Jul 13 08:08:34 2014 -0400
----------------------------------------------------------------------
.../php-cli-samples/updateExperiment.php | 57 ++++++--------------
.../src/main/resources/SLURMTemplate.xslt | 4 +-
2 files changed, 17 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/16d2d38f/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
index 7a39418..d451c21 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
@@ -20,12 +20,9 @@ use Thrift\Transport\TBufferedTransport;
use Thrift\Transport\TSocket;
use Airavata\API\AiravataClient;
-if ($argc != 2)
-{
+if ($argc != 2) {
echo 'php updateExperiment.php <experiment_id>';
-}
-else
-{
+} else {
update_experiment($argv[1]);
}
@@ -41,32 +38,19 @@ function get_experiment($expId)
{
global $airavataclient;
- try
- {
+ try {
return $airavataclient->getExperiment($expId);
- }
- catch (InvalidRequestException $ire)
- {
+ } catch (InvalidRequestException $ire) {
echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
- }
- catch (ExperimentNotFoundException $enf)
- {
+ } catch (ExperimentNotFoundException $enf) {
echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
- }
- catch (AiravataClientException $ace)
- {
+ } catch (AiravataClientException $ace) {
echo 'AiravataClientException!<br><br>' . $ace->getMessage();
- }
- catch (AiravataSystemException $ase)
- {
+ } catch (AiravataSystemException $ase) {
echo 'AiravataSystemException during get!<br><br>' . $ase->getMessage();
- }
- catch (TTransportException $tte)
- {
+ } catch (TTransportException $tte) {
echo 'TTransportException!<br><br>' . $tte->getMessage();
- }
- catch (\Exception $e)
- {
+ } catch (\Exception $e) {
echo 'Exception!<br><br>' . $e->getMessage();
}
@@ -81,8 +65,7 @@ function update_experiment($expId)
{
global $airavataclient;
- try
- {
+ try {
//create new experiment to receive the clone
$experiment = $airavataclient->getExperiment($expId);
$experiment->name .= time();
@@ -93,25 +76,15 @@ function update_experiment($expId)
echo "Experiment $experiment->name updated:\n\n";
var_dump($updatedExperiment);
- }
- catch (InvalidRequestException $ire)
- {
+ } catch (InvalidRequestException $ire) {
echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
- }
- catch (ExperimentNotFoundException $enf)
- {
+ } catch (ExperimentNotFoundException $enf) {
echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
- }
- catch (AiravataClientException $ace)
- {
+ } catch (AiravataClientException $ace) {
echo 'AiravataClientException!<br><br>' . $ace->getMessage();
- }
- catch (AiravataSystemException $ase)
- {
+ } catch (AiravataSystemException $ase) {
echo 'AiravataSystemException during update!<br><br>' . $ase->getMessage();
- }
- catch (TTransportException $tte)
- {
+ } catch (TTransportException $tte) {
echo 'TTransportException!<br><br>' . $tte->getMessage();
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/16d2d38f/tools/gsissh/src/main/resources/SLURMTemplate.xslt
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/resources/SLURMTemplate.xslt b/tools/gsissh/src/main/resources/SLURMTemplate.xslt
index 4597476..a752608 100644
--- a/tools/gsissh/src/main/resources/SLURMTemplate.xslt
+++ b/tools/gsissh/src/main/resources/SLURMTemplate.xslt
@@ -20,12 +20,12 @@
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:nodes">
-#SBATCH -n <xsl:value-of select="ns:nodes"/>
+#SBATCH -N <xsl:value-of select="ns:nodes"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:cpuCount">
-#SBATCH -N <xsl:value-of select="ns:cpuCount"/>
+#SBATCH -n <xsl:value-of select="ns:cpuCount"/>
</xsl:when>
</xsl:choose>
<xsl:choose>