This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example works, but needs checking as to why monitorJob does not wait
for job to finish executing. Some weird Mina thing Signed-off-by: Joe Osborn <osbornjd@ornl.gov>
- Loading branch information
Joe Osborn
committed
Feb 20, 2020
1 parent
d067265
commit f67a5ee
Showing
4 changed files
with
132 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletion
17
org.eclipse.ice.demo/src/org/eclipse/ice/demo/commands/remoteCommand.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
#!/bin/bash | ||
|
||
echo "Hello World" | ||
script="test_code_execution.sh" | ||
inputFile="someInputFile.txt" | ||
userhostname=$1 | ||
hostCdirectory=$2 | ||
keypath=$3 | ||
|
||
# Make a directory to work in on the server | ||
ssh -i $keypath $userhostname "mkdir $2" | ||
|
||
# scp the files to that directory | ||
scp -i $keypath $inputFile $userhostname:$2 | ||
scp -i $keypath $script $userhostname:$2 | ||
|
||
|
||
# run the script which executes the job | ||
ssh -i $keypath $userhostname "cd $2; chmod 700 $script; ./$script $inputFile;" |
49 changes: 49 additions & 0 deletions
49
org.eclipse.ice.demo/src/org/eclipse/ice/demo/commands/test_code_execution.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#******************************************************************************* | ||
# * Copyright (c) 2019- UT-Battelle, LLC. | ||
# * All rights reserved. This program and the accompanying materials | ||
# * are made available under the terms of the Eclipse Public License v1.0 | ||
# * which accompanies this distribution, and is available at | ||
# * http://www.eclipse.org/legal/epl-v10.html | ||
# * | ||
# * Contributors: | ||
# * Initial API and implementation and initial documentation - | ||
# * Joe Osborn | ||
# ***************************************************************************** | ||
|
||
|
||
|
||
# This is a test executable shell script for running a job locally. | ||
# It is for testing the LocalCommand chain of execution. | ||
# The script takes some input from a dummy text file and prints it | ||
# to the screen. It is in no way intended to be robust, just to show | ||
# basic usage of an executable command functioning. | ||
|
||
|
||
# Print a boring string out to the console screen | ||
STRING="This is a hello world executable" | ||
echo $STRING | ||
|
||
# list the contents of this directory | ||
ls -lrt | ||
|
||
# Read in a dummy file | ||
echo "I will read from files "$1 "and "$2 | ||
|
||
# Set a variable to the argument value | ||
input=$1 | ||
otherinput=$2 | ||
|
||
# Read in the data | ||
#while IFS= read -r lineA | ||
#do | ||
# echo "$lineA" | ||
#done < "$input" | ||
|
||
paste $input $otherinput | while IFS="$(printf '\t')" read -r f1 f2 | ||
do | ||
printf 'first file: %s\n' "$f1" | ||
printf 'second file: %s\n' "$f2" | ||
done | ||
|
||
|