Skip to content

Commit 4e024d3

Browse files
committed
New 2nd example
1 parent 2ba8c10 commit 4e024d3

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

work/titan/README.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
Use
3+
4+
----
5+
./workflow.sh hello.swift
6+
----
7+
8+
or
9+
10+
----
11+
./workflow.sh pyr.swift
12+
----
File renamed without changes.

work/titan/pyr.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import io;
3+
import python;
4+
import R;
5+
6+
i = python("print(\"python works\")",
7+
"repr(2+2)");
8+
printf("i: %s", i);
9+
10+
printf(R("", "\"R STRING OK\""));

work/titan/workflow.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/bash
22
set -eu
33

4+
if [[ ${#} != 1 ]]
5+
then
6+
echo "Specify a Swift script!"
7+
exit 1
8+
fi
9+
SCRIPT=$1
10+
411
LD_LIBRARY_PATH=/sw/xk6/r/3.3.2/sles11.3_gnu4.9.3x/lib64/R/lib:/opt/java/jdk1.8.0_51/jre/lib/amd64/server:/sw/xk6/r/3.3.2/sles11.3_gnu4.9.3/lib64/R/lib:/sw/xk6/curl/7.30.0/sles11.1_gnu4.3.4/lib:/opt/gcc/4.9.3/snos/lib64
512

613
SWIFT=/lustre/atlas2/csc249/proj-shared/sfw/swift-t/stc/bin/swift-t
@@ -13,4 +20,4 @@ PROCS=4
1320

1421
$SWIFT -m cray -n $PROCS \
1522
-e LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
16-
workflow.swift
23+
$SCRIPT

0 commit comments

Comments
 (0)