-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconvert_script_s2b
executable file
·596 lines (507 loc) · 22.1 KB
/
convert_script_s2b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
#!/bin/bash
##############################################################
# SpineML to BRAHMS platform specific wrapper ('NIX) #
# Alex Cope 2012 /Updated 2013. Updates 2014: Seb James #
# #
# convert_script_s2b is used to process a SpineML model into #
# Brahms-compatible executable components. #
# #
# It makes use of spineml_preflight to "preprocess" the #
# model first, so you'll need to have installed #
# SpineML_Preflight. #
# #
# Note that this script uses bash features. #
##############################################################
function usage () {
cat <<EOF
usage: $0 [options]
convert_script_s2b is used to process a model in \$SPINEML_2_BRAHMS_DIR/model/.
It creates executable components from the SpineML descriptions provided in
\$SPINEML_2_BRAHMS_DIR/model/ (or your model dir) using XSL transformations. It
outputs source code and executable code into a working directory, which
defaults to \$HOME/spineml-2-brahms
It can use pre-compiled components from /usr/lib/spineml-2-brahms and pre-
installed XSL files from /usr/share/spineml-2-brahms if it has been correctly
installed on a Unix or Linux system, or it can be executed in-place using the
source code as downloaded. In the case the working directory is the downloaded
directory, SpineML_2_BRAHMS.
Options are:
-w dirpath Set the working directory - SPINEML_2_BRAHMS_DIR. If left un-set
this will default either to SpineML_2_BRAHMS in the current
working directory, \$HOME/SpineML_2_BRAHMS (if it already exists)
or to \$HOME/spineml-2-brahms.
-s DON'T rebuild sys.xml and sys-exe.xml (The BRAHMS SystemML
description of the SpineML model). This prevents the calls to
xsltproc which create temp/sys(-exe).xml, as long as
temp/sys(-exe).xml exists. Added to speed up development when
the same experiment is being called repeatedly. If sys.xml
doesn't exist, the xsltproc calls DO go ahead, despite the
presence of this option.
-r DO rebuild the BRAHMS components, even if they already exist.
-A ASSUME that the BRAHMS components exist; don't do any checking.
This is intended for running a large model many times over in a
batch where the component check may add significantly to the run
time.
-g No GUI. Prevent BRAHMS from displaying its progress window.
-m modeldir Set the model directory - the location of the experiment xml
files. Defaults to: \$SPINEML_2_BRAHMS_DIR/model
(\$SPINEML_2_BRAHMS_DIR can be set with the -w option.)
This is copied into the output directory and "preflighted" by
spineml_preflight before the simulation starts.
-o outdir Set the output directory for temporary files and data output.
Defaults to \$SPINEML_2_BRAHMS_DIR/temp.
-e expt Choose the experiment to run. Each model may have several
experiments, numbers 0, 1, 2, etc. Here, you can pass the number
of the experiment to run. E.g. -e 0. Defaults to 0.
-p "option" Property change option. This modifies the experiment.xml file to
add a change to a parameter or the initial value of a state
variable. The population or projection name must be given, along
with the parameter/variable property name and the new value.
These three elements are separated with the colon character. The
new value can have its dimensions given after the value.
E.g.: -p "Striatum_D1:tau:45ms" - change param "tau" to 45 ms
for the population "Striatum_D1".
The value can be a special string to specify a number drawn from
a random uniform or random normal distribution. For random
uniform with min=2, max=10 and seed=123, use something like:
-p "STN_spk to GPeTI Synapse 0 weight_update:S:UNI(2,10,123)"
To specify a normal distribution with mean 8, variance 2 and seed
123, use:
-p "STN_spk to GPeTI Synapse 0 weight_update:S:NORM(8,2,123)"
As with fixed value property changes, a dimension can be appended
to the UNI() or NORM() string.
Multiple instances of this option may be given. The content of
each option is passed unmodified to spineml_preflight.
-d "option" Delay change option. Change a delay on a projection or generic
connection. For projections, provide an argument like
"PopA:PopB:0:45" to set a delay of 45 ms to the projection from
PopA to PopB on synapse 0.
For generic connections the argument should be
"PopA:PortA:PopB:PortB:45" to set a 45 ms delay to the connection
from PortA on PopA to PortB on PopB. It is only possible to set
fixed delays using this argument.
Multiple instances of this option may be given. The content of
each option is passed unmodified to spineml_preflight.
-f "option" FixedProbability change option. Change a probability on a
projection or generic
connection. For projections, provide an argument like
"PopA:PopB:0:0.3" to set a probability of 0.3 to the projection
from PopA to PopB on synapse 0.
For generic connections the argument should be
"PopA:PortA:PopB:PortB:0.3" to set a 0.3 prob. to the connection
from PortA on PopA to PortB on PopB.
Multiple instances of this option may be given. The content of
each option is passed unmodified to spineml_preflight.
-c "option" Constant current option. This modifies the experiment.xml file,
adding a ConstantInput element to the Experiment node. The
population or projection name must be given, along with the port
name and the new constant current value. As with the property
change option, the three elements are separated with the colon
character.
E.g.: -c "STN:I:10" - Set a constant current of 10 for the I
port for population "STN".
Multiple instances of this option may be given. The content of
each option is passed unmodified to spineml_preflight.
-t "option" Time varying current option. This modifies the experiment.xml file,
adding a TimeVaryingInput element to the Experiment node. The
population or projection name must be given, along with the port
name and a comma separated value list of the times and values.
As with the property change option, the three elements are
separated with the colon character. The value list uses a comma
separator and should be given in the form:
"time1,current1,time2,current2,..."
E.g.: -t "STN:I:0,0,100,20,200,0" - Set a time varying current
for the I port for population "STN". The current is 0 at 0 ms.
The current changes to 20 at 100 ms and then back to 0 at 200 ms.
Multiple instances of this option may be given. The content of
each option is passed unmodified to spineml_preflight.
-n nodes Use Sun Grid Engine: Provide the number of nodes on which to
launch brahms instances. NB: Currently, only IPv4 TCP/IP is used
to transfer data between nodes, not MPI/Infiniband.
-a arch Request specific architecture for each node (amd or intel). Only
takes effect when using Sun Grid Engine mode (-n)
-v Make brahms output verbose debugging information (by passing the
--d brahms option)
-V Make brahms output very verbose debugging information (by
passing the --dd brahms option)
-D Call brahms-gdb instead of brahms to debug the system. For use
when the simulation is crashing.
EOF
exit 0
}
# A function to convert a relative path into an absolute path.
function abspath {
# NB: Don't do any echos to stdout in here!
if [[ -d "$1" ]]; then
pushd "$1" >/dev/null
pwd
popd >/dev/null
elif [[ -e $1 ]]; then
pushd "$(dirname "$1")" >/dev/null
echo "$(pwd)/$(basename "$1")"
popd >/dev/null
else
echo "$1" does not exist! >&2
return 127
fi
}
# The directory which actually contains convert_script_s2b
CVRT_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Called from: ${CVRT_SCRIPT_DIR}"
# The default location for the spineml-2-brahms temporary files and input model(s)
SPINEML_2_BRAHMS_DIR=$HOME"/spineml-2-brahms"
# User may have SpineML_2_BRAHMS in the current working directory, or
# in the their home directory, in which case use that instead (this is
# for developers to use a localised version of SpineML_2_BRAHMS, and
# for Mac)
PWD=`pwd`
if [ $(basename $PWD) = "SpineML_2_BRAHMS" ]; then
# Really in-place style
SPINEML_2_BRAHMS_DIR=$PWD
echo "in-place style; SPINEML_2_BRAHMS_DIR: $SPINEML_2_BRAHMS_DIR"
elif [ -d "$PWD/SpineML_2_BRAHMS" ]; then
# Working with SpineML_2_BRAHMS in current working directory - "in-place" style.
SPINEML_2_BRAHMS_DIR="$PWD/SpineML_2_BRAHMS"
echo "Just outside in-place style; SPINEML_2_BRAHMS_DIR: $SPINEML_2_BRAHMS_DIR"
elif [ -d "$HOME/SpineML_2_BRAHMS" ]; then
# Working with a $HOME/SpineML_2_BRAHMS installation - "in-home-dir" style.
SPINEML_2_BRAHMS_DIR="$HOME/SpineML_2_BRAHMS"
echo "in-home-dir style SPINEML_2_BRAHMS_DIR: $SPINEML_2_BRAHMS_DIR"
else
echo "Working with SPINEML_2_BRAHMS_DIR as $SPINEML_2_BRAHMS_DIR"
fi
# Rebuild temp/sys(-exe).xml? Defaults to "true". Ideally, this would
# check a timestamp on the experiment/model.xml etc, and determine if
# the rebuild needs to go ahead.
REBUILD_SYSTEMML="true"
REBUILD_COMPONENTS="false"
ASSUME_COMPONENTS_PRESENT=""
# Input directory containing the model.
MODEL_DIR="_unknown_model"
# The output directory for temporary files and output logs.
OUTPUT_DIR="temp"
# Number of nodes
NODES=""
NODEARCH=""
VERBOSE_BRAHMS="no"
BRAHMS_DEBUG="no"
# Should we display the BRAHMS progress GUI? If not, make this equal to "--nogui"
BRAHMS_NOGUI=""
EXPT_NUM=""
# Test for arrays
test_arr=FAIL
Array=( FAIL PASS )
test_arr=${Array[1]}
if [ "$test_arr" = xFAIL ]; then
echo "This script requires the bash shell as it uses bash arrays."
exit -1
fi
# Declare an array for the property change options
declare -a PROPERTY_CHANGES
declare -a DELAY_CHANGES
declare -a FP_CHANGES
declare -a CONSTANT_CURRENTS
declare -a TVARYING_CURRENTS
PCI=0 # Property Change Iterator
DCI=0 # Delay Change Iterator
FPCI=0 # Fixed Prob Change Iterator
CCI=0 # Constant Current Iterator
TVCI=0
# Parse cmd line options
while getopts w:srAgm:o:e:p:d:f:c:t:n:a:vVD\? opt
do
case "$opt" in
w) SPINEML_2_BRAHMS_DIR="$OPTARG"
echo "Set SPINEML_2_BRAHMS_DIR from command line argument to ${SPINEML_2_BRAHMS_DIR}"
;;
s) REBUILD_SYSTEMML="false"
;;
r) REBUILD_COMPONENTS="true"
;;
A) ASSUME_COMPONENTS_PRESENT="true"
;;
g) BRAHMS_NOGUI="--par-ShowGUI=0"
;;
m) MODEL_DIR="$OPTARG"
;;
o) OUTPUT_DIR="$OPTARG"
#OUTPUT_DIR=`echo $OUTPUT_DIR | sed 's/ /\\ /g'`
;;
e) EXPT_NUM="$OPTARG"
;;
p) PROPERTY_CHANGES[$PCI]="--property_change=$OPTARG"
PCI=$((PCI+1))
;;
d) DELAY_CHANGES[$DCI]="--delay_change=$OPTARG"
DCI=$((DCI+1))
;;
f) FP_CHANGES[$FPCI]="--fp_change=$OPTARG"
FPCI=$((FPCI+1))
;;
c) CONSTANT_CURRENTS[$CCI]="--constant_current=$OPTARG"
CCI=$((CCI+1))
;;
t) TVARYING_CURRENTS[$TVCI]="--tvarying_current=$OPTARG"
TVCI=$((TVCI+1))
;;
n) NODES="$OPTARG"
;;
a) NODEARCH="$OPTARG"
;;
v) VERBOSE_BRAHMS="--d"
;;
V) VERBOSE_BRAHMS="--dd"
;;
D) BRAHMS_DEBUG="yes"
;;
\?) usage
;;
esac
done
shift `expr $OPTIND - 1`
echo "BRAHMS_DEBUG: $BRAHMS_DEBUG"
# Check NODES is a number:
if [[ "x$NODES" -ne "x" ]]; then # user provided -n option.
re='^[0-9]+$'
if ! [[ $NODES =~ $re ]] ; then
echo "Please enter a positive integer for the number of processing nodes." >&2
exit -1
fi
echo "Submitting execution on $NODES nodes."
echo "Node architecture requested: $NODEARCH"
fi
# Do we have the ~/spineml-2-brahms directory in place? If not, create
# it.
if [ ! -d "$SPINEML_2_BRAHMS_DIR" ]; then
mkdir -p "$SPINEML_2_BRAHMS_DIR"
if [ "$?" -ne "0" ]; then
echo "Failed to create directory $SPINEML_2_BRAHMS_DIR. Exiting." >&2
exit -1
fi
fi
# Check we have spineml_preflight
which spineml_preflight >/dev/null
spfrtn=$?
if [ "$spfrtn" -ne 0 ]; then
echo "Please ensure you installed SpineML_Preflight for the spineml_preflight"
echo "binary which should be installed somewhere in your \$PATH"
exit -1
fi
# Make up the experiment file name
EXPERIMENT="experiment"$EXPT_NUM".xml"
echo "Experiment is: $EXPERIMENT"
#
# A word on directories.
#
# The MODEL_DIR passed in is the location of the origin model, which
# we will make a copy of. We copy it into our output directory, and
# then "preflight" it, using spineml_preflight to "fix" certain
# connection types, such as stochastic connection maps, and stochastic
# delays (spineml_preflight replaces these with explicit lists,
# generated according to the specification in the model). This copied
# model then becomes the "final state" model - all final values of the
# state variables are copied into this model directory.
#
# Make sure we have both model and temp directories.
if [ "x$OUTPUT_DIR" = "xtemp" ]; then
OUTPUT_DIR="$SPINEML_2_BRAHMS_DIR/temp"
fi
mkdir -p "$OUTPUT_DIR"
OUTPUT_DIR=$(abspath "$OUTPUT_DIR")
echo "OUTPUT_DIR: $OUTPUT_DIR"
if [ "$?" -ne "0" ]; then
echo "Failed to create temp/output directory" >&2
exit -1
fi
# Clear out the model subdir of the OUTPUT_DIR so that no stale state is used
if [ -d "${OUTPUT_DIR}/model" ]; then
rm -rf "${OUTPUT_DIR}/model/*"
fi
# Set a default value for MODEL_DIR if necessary:
if [ "x$MODEL_DIR" = "x_unknown_model" ]; then
MODEL_DIR="$SPINEML_2_BRAHMS_DIR/model"
fi
echo "MODEL_DIR: $MODEL_DIR"
# Our output model dir lives in our output dir:
OUTPUT_MODEL_DIR="$OUTPUT_DIR"/model
mkdir -p "$OUTPUT_MODEL_DIR"
if [ "$?" -ne "0" ]; then
echo "Failed to create output model directory" >&2
exit -1
fi
echo "OUTPUT_MODEL_DIR: $OUTPUT_MODEL_DIR"
# We make a COPY of the model dir, copying it into
# OUTPUT_MODEL_DIR. We'll then "preflight" this copy of the model and
# use this as the working input model.
cp -Ra "$MODEL_DIR"/* "$OUTPUT_MODEL_DIR"/
if [ "$?" -ne "0" ]; then
echo "Failed to make a copy of the input model directory" >&2
exit -1
fi
# Preflight the model - note we're outputting the contents of the PROPERTY_CHANGES
# array which contains --property_change=a:b:3 type options.
spineml_preflight -e "${OUTPUT_MODEL_DIR}/${EXPERIMENT}" "${PROPERTY_CHANGES[@]}" "${DELAY_CHANGES[@]}" "${FP_CHANGES[@]}" "${CONSTANT_CURRENTS[@]}" "${TVARYING_CURRENTS[@]}"
if [ "$?" -ne "0" ]; then
echo "Failed to preflight the model." >&2
exit -1
fi
# What OS are we?
if [ $(uname) = 'Linux' ]; then
if [ $(uname -i) = 'i686' ]; then
OS='Linux32'
else
OS='Linux64'
fi
elif [ $(uname) = 'Windows_NT' ] || [ $(uname) = 'MINGW32_NT-6.1' ]; then
OS='Windows'
else
OS='OSX'
fi
echo "OS: ${OS}"
# Now to test to see if we have a pre-compiled/package managed
# toolspace? If NOT then we check if we need to compile using the
# build scripts.
if [ -d /usr/lib/spineml-2-brahms ]; then
# We have a pre-compiled spineml-2-brahms
echo "You have a pre-compiled spineml-2-brahms namespace installed."
echo "Copying this into your spineml-2-brahms dir (${SPINEML_2_BRAHMS_DIR}/Namespace)"
set -e
mkdir -p "${SPINEML_2_BRAHMS_DIR}/Namespace"
cp -Ra /usr/lib/spineml-2-brahms/* "${SPINEML_2_BRAHMS_DIR}/Namespace/"
set +e
else
# Check whether we need to build the spineml-2-brahms namespace
COS=$(cat "${SPINEML_2_BRAHMS_DIR}"/current_os)
set -e # This tells bash to exit on any unsuccessful command (reverse with set +e)
if [ "x$COS" = "x$OS" ]; then
echo "Tools compiled correctly"
else
echo "OS change detected, recompiling tools..."
pwd
if [ ! -d "${SPINEML_2_BRAHMS_DIR}/tools" ]; then
# cp tools from origin to working dir then compile
cp -Ra "${CVRT_SCRIPT_DIR}/tools" "${SPINEML_2_BRAHMS_DIR}/"
cp -Ra "${CVRT_SCRIPT_DIR}/include" "${SPINEML_2_BRAHMS_DIR}/"
fi
pushd "${SPINEML_2_BRAHMS_DIR}"/tools
pushd allToAll/brahms/0/
./build
popd
pushd fixedProbability/brahms/0/
./build
popd
pushd explicitList/brahms/0/
./build
popd
pushd AnalogConstantInput/brahms/0/
./build
popd
pushd AnalogTimeVaryingInput/brahms/0/
./build
popd
pushd EventConstantInput/brahms/0/
./build
popd
pushd EventTimeVaryingInput/brahms/0/
./build
popd
pushd externalInput/brahms/0/
./build
popd
pushd externalOutput/brahms/0/
./build
popd # leaving us in tools/dev/SpineML/tools/
popd
pushd "$SPINEML_2_BRAHMS_DIR"
echo $OS &> current_os
popd
fi
set +e # Back to explicitly checking return values of commands
fi
# Check if we have local xsl script which overrides the packaged/pre-installed xsl scripts:
XSL_SCRIPT_PATH="/usr/share/spineml-2-brahms/xsl/SpineML_2_BRAHMS_write_script.xsl"
if [ -f "${CVRT_SCRIPT_DIR}/xsl/SpineML_2_BRAHMS_write_script.xsl" ]; then
echo "Using local version of the SpineML to BRAHMS xsl scripts because they exist."
XSL_SCRIPT_PATH="${CVRT_SCRIPT_DIR}/xsl/"
else
XSL_SCRIPT_PATH="/usr/share/spineml-2-brahms/xsl/"
fi
# First check we have an experiment.xml file to work from.
# Could use cmd-line arg $INPUT here for the experiment file.
if [ ! -f "${OUTPUT_MODEL_DIR}/${EXPERIMENT}" ]; then
echo "No experiment description to work from in ${OUTPUT_MODEL_DIR}/${EXPERIMENT}" >&2
echo "Exiting." >&2
exit -1
fi
# Check we have xsltproc
XSLTPROC_BIN=`which xsltproc`
if [ "x${XSLTPROC_BIN}" = "x" ]; then
echo "Couldn't find the xsltproc binary, exiting." >&2
exit -1
fi
# Clean up any old reports (MOVE?)
rm "${OUTPUT_DIR}/rep*xml*" >/dev/null 2>&1
rm "${OUTPUT_DIR}/sys*" >/dev/null 2>&1
rm "${OUTPUT_DIR}/output_script" >/dev/null 2>&1
# create the output script using an xsl translation and the experiment.xml file
echo xsltproc -o "${OUTPUT_DIR}/output.script" --stringparam hostos "${OS}" \
"${XSL_SCRIPT_PATH}/SpineML_2_BRAHMS_write_script.xsl" \
"${OUTPUT_MODEL_DIR}/${EXPERIMENT}"
xsltproc -o "${OUTPUT_DIR}/output.script" --stringparam hostos "${OS}" \
"${XSL_SCRIPT_PATH}/SpineML_2_BRAHMS_write_script.xsl" \
"${OUTPUT_MODEL_DIR}/${EXPERIMENT}"
if [ "$?" -ne "0" ]; then
echo "Failed to run xsltproc to produce the output script from your model. Exiting." >&2
exit -1;
fi
# script permissions
if [ -e "${OUTPUT_DIR}/output.script" ]; then
chmod +x "${OUTPUT_DIR}/output.script"
else
echo "ERROR: conversion script not created - is xsltproc installed?" >&2
exit -1
fi
# Configure environment variables for brahms
if [ -z "${BRAHMS_NS}" ]; then
echo "Using defaults for BRAHMS_NS and SYSTEMML_INSTALL_PATH."
if [ $OS = 'Linux32' ] || [ $OS = 'Linux64' ]; then
if [ -f /usr/bin/brahms ]; then
# packaged brahms
echo "Setting BRAHMS_NS, REBUILD and SYSTEMML_INSTALL_PATH to suit packaged brahms"
export SYSTEMML_INSTALL_PATH="" # this should be empty
BRAHMS_NS="/var/SystemML/Namespace"
else
# non-packaged brahms, assume SystemML folder in home directory.
export SYSTEMML_INSTALL_PATH="${HOME}/SystemML"
BRAHMS_NS="${HOME}/SystemML/Namespace"
fi
fi
if [ $OS = 'OSX' ]; then
if [ -d ${HOME}/SystemML ]; then
# Use Brahms in home.
export SYSTEMML_INSTALL_PATH="${HOME}/SystemML"
BRAHMS_NS="${HOME}/SystemML/Namespace"
# Poss: elif [ -d /Applications/SystemML ]; then
# Use installed Brahms
else
# Assume User has installed SpineCreator and has the bundled Brahms
export SYSTEMML_INSTALL_PATH="/Applications/SystemML"
# This is the SpineCreator-bundled path to Namespace:
# /Applications/spinecreator.app/Contents/MacOS/SystemML/Namespace/
BRAHMS_NS="/Applications/SystemML/Namespace"
fi
fi
fi
# run the script
pushd "$OUTPUT_DIR"
echo "In directory: " `pwd`
echo "Execute: ./output.script $REBUILD_COMPONENTS $REBUILD_SYSTEMML $OUTPUT_MODEL_DIR $EXPERIMENT $BRAHMS_NS $SPINEML_2_BRAHMS_DIR $OUTPUT_DIR $XSL_SCRIPT_PATH $VERBOSE_BRAHMS $NODES $NODEARCH $BRAHMS_NOGUI $ASSUME_COMPONENTS_PRESENT $BRAHMS_DEBUG"
./output.script "${REBUILD_COMPONENTS}" "${REBUILD_SYSTEMML}" "${OUTPUT_MODEL_DIR}" "${EXPERIMENT}" "${BRAHMS_NS}" "${SPINEML_2_BRAHMS_DIR}" "${OUTPUT_DIR}" "${XSL_SCRIPT_PATH}" "${VERBOSE_BRAHMS}" "${ASSUME_COMPONENTS_PRESENT}" "${BRAHMS_DEBUG}" "${BRAHMS_NOGUI}" "${NODES}" "${NODEARCH}"
if [ "$?" -ne "0" ]; then
echo "Failed to run output.script on ${EXPERIMENT}. Falling at the last hurdle." >&2
exit -1;
fi
popd
# Success!
exit 0
#Execute: ./output.script false true /home/seb/src/SpineML_2_BRAHMS/temp/model experiment0.xml /home/seb/SystemML/Namespace /home/seb/src/SpineML_2_BRAHMS /home/seb/src/SpineML_2_BRAHMS/temp /home/seb/src/SpineML_2_BRAHMS/xsl/ no yes