1
1
#! /bin/bash
2
- # Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions
2
+ # Copyright(C) 1999-2020, 2023, 2025 National Technology & Engineering Solutions
3
3
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4
4
# NTESS, the U.S. Government retains certain rights in this software.
5
5
#
@@ -46,6 +46,7 @@ Decomposition methods: Default is -l rib. [0..3] = speed ranking 0=fastest.
46
46
For example "--multikl" is the same as "-l multikl"
47
47
48
48
Other options:
49
+ --change_set <#> Read from the specified (1-based) change set index.
49
50
--help Print this message (-h)
50
51
--launch <cmd> Prefix nem_slice call with this command to run it.
51
52
The cmd argument must be quoted if it contains options
@@ -102,6 +103,7 @@ Decomposition methods: Default is -l rib. [0..3] = speed ranking 0=fastest.
102
103
-l zpinch [-] special decomposition method; not useful for general use.
103
104
104
105
Other options:
106
+ -C <#> Read from the specified (1-based) change set index.
105
107
-N Nodal Decomposition
106
108
-E Elemental Decomposition (default)
107
109
-n options Specify nem_slice options
@@ -157,6 +159,7 @@ function execute_loadbalance {
157
159
LAUNCH=$7
158
160
decomp_type=$8
159
161
weighting=$9
162
+ change_set_index=$1 0
160
163
161
164
nemesis=$basename .$suffix_mesh .nem
162
165
genesis=$basename .$suffix_mesh
@@ -174,6 +177,11 @@ function execute_loadbalance {
174
177
return -1
175
178
fi
176
179
180
+ change_set=" "
181
+ if [ " $change_set_index " != " 0" ]
182
+ then
183
+ change_set=" -C $change_set_index "
184
+ fi
177
185
date=$( date ' +%m/%d/%y' )
178
186
time=$( date ' +%H:%M:%S' )
179
187
prob_dir=$( pwd | sed " s/.*\///g" )
@@ -182,16 +190,16 @@ function execute_loadbalance {
182
190
then
183
191
echo ${txtblu}
184
192
echo " Executing:"
185
- echo " $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag -o $nemesis -m mesh=$processors -a $input $genesis "
193
+ echo " $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag $change_set -o $nemesis -m mesh=$processors -a $input $genesis "
186
194
echo ${txtrst}
187
- (${NOOP: +echo } $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag -o $nemesis -m mesh=$processors -a $input $genesis )
195
+ (${NOOP: +echo } $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag $change_set -o $nemesis -m mesh=$processors -a $input $genesis )
188
196
load_rc=$?
189
197
else
190
198
echo ${txtblu}
191
199
echo " Executing:"
192
- echo " $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag -o $nemesis -m mesh=$processors $genesis "
200
+ echo " $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag $change_set -o $nemesis -m mesh=$processors $genesis "
193
201
echo ${txtrst}
194
- (${NOOP: +echo } $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag -o $nemesis -m mesh=$processors $genesis )
202
+ (${NOOP: +echo } $LAUNCH $NEM_SLICE $decomp_type $spheres $do_viz $decomp_method $weighting $nem_slice_flag $change_set -o $nemesis -m mesh=$processors $genesis )
195
203
load_rc=$?
196
204
fi
197
205
return $load_rc
@@ -204,7 +212,8 @@ function execute_spread {
204
212
rootdir=$2
205
213
subdir=$3
206
214
numproc=$4
207
- NEM_SPREAD=$5
215
+ change_set_index=$5
216
+ NEM_SPREAD=$6
208
217
209
218
nemesis=$basename .$suffix_mesh .nem
210
219
genesis=$basename .$suffix_mesh
@@ -233,6 +242,12 @@ function execute_spread {
233
242
fi
234
243
fi
235
244
245
+ change_set=" "
246
+ if [ " $change_set_index " != " 0" ]
247
+ then
248
+ change_set=" -C $change_set_index "
249
+ fi
250
+
236
251
if [ -e $pexsh ]
237
252
then
238
253
/bin/rm -rf $pexsh
@@ -255,9 +270,9 @@ function execute_spread {
255
270
256
271
echo ${txtblu}
257
272
echo " Executing:"
258
- echo " $NEM_SPREAD $use64 $pexsh "
273
+ echo " $NEM_SPREAD $use64 $change_set $ pexsh"
259
274
echo ${txtrst}
260
- ${NOOP: +echo } $NEM_SPREAD $use64 $pexsh
275
+ ${NOOP: +echo } $NEM_SPREAD $use64 $change_set $ pexsh
261
276
}
262
277
263
278
# #######################################################################
@@ -302,6 +317,7 @@ spheres="-S"
302
317
do_viz=" "
303
318
curdir=$( pwd)
304
319
use64=" "
320
+ change_set_index=' 0'
305
321
306
322
ACCESSBIN=$( dirname " $0 " )
307
323
ACCESSBIN=$( cd " ${ACCESSBIN} " && pwd)
326
342
# #######################################################################
327
343
# decomp options:
328
344
if [ $OLDGETOPT -eq 1 ] ; then
329
- TEMP=$( getopt Hh6ENn :i:o:p:j:r:R:S:X:sl:vVd: " $@ " )
345
+ TEMP=$( getopt Hh6C:ENn :i:o:p:j:r:R:S:X:sl:vVd: " $@ " )
330
346
else
331
- TEMP=$( getopt -o Hh6ENn :i:o:p:j:r:R:S:X:sl:vVd:w: -a \
347
+ TEMP=$( getopt -o Hh6C:ENn :i:o:p:j:r:R:S:X:sl:vVd:w: -a \
332
348
--long input: \
333
349
--long launch: \
334
350
--long nolaunch \
335
351
--long noop \
336
352
--long help \
353
+ --long change_set: \
337
354
--long nem_slice_flag \
338
355
--long 64 \
339
356
--long processors: \
@@ -378,6 +395,8 @@ while true ; do
378
395
do_viz=" -y" ; shift ;;
379
396
(-d|--debug)
380
397
debug_level=" $2 " ; shift 2 ;;
398
+ (-C|--change_set)
399
+ change_set_index=" $2 " ; shift 2 ;;
381
400
(-n|--nem_slice_flag)
382
401
nem_slice_flag=" $2 " ; shift 2 ;;
383
402
(-N|--nodal)
539
558
fi
540
559
541
560
# #######################################################################
542
- execute_loadbalance " $basename " " $processors " " $decomp_method " " $nem_slice_flag " " $NEM_SLICE " " $input " " $LAUNCH " " $decomp_type " " $weighting "
561
+ execute_loadbalance " $basename " " $processors " " $decomp_method " " $nem_slice_flag " " $NEM_SLICE " " $input " " $LAUNCH " " $decomp_type " " $weighting " " $change_set_index "
543
562
if [ $? -ne 0 ]
544
563
then
545
564
echo ${txtred}
555
574
fi
556
575
557
576
# #######################################################################
558
- execute_spread " $basename " " $rootdir " " $subdir " " $processors " " $NEM_SPREAD "
577
+ execute_spread " $basename " " $rootdir " " $subdir " " $processors " " $change_set_index " " $ NEM_SPREAD"
559
578
if [ $? -ne 0 ]
560
579
then
561
580
echo ${txtred}
0 commit comments