#! /bin/bash global ORIG_DIR := $1 global SMOOTH_DIR := "$(ORIG_DIR)_smooth" mkdir $(SMOOTH_DIR) global AXPY_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep axpy] for FILE in [$(AXPY_FILE)] { echo $FILE global BASE := $(FILE##*/) ./smooth $(ORIG_DIR)/$(BASE) 4 $(SMOOTH_DIR)/$(BASE)_tmp ./regularize $(SMOOTH_DIR)/$(BASE)_tmp 2500 15000 $(SMOOTH_DIR)/$(BASE) rm -f $(SMOOTH_DIR)/$(BASE)_tmp } global MATRIX_VECTOR_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep matrix_vector] for FILE in [$(MATRIX_VECTOR_FILE)] { echo $FILE global BASE := $(FILE##*/) ./smooth $(ORIG_DIR)/$(BASE) 4 $(SMOOTH_DIR)/$(BASE)_tmp ./regularize $(SMOOTH_DIR)/$(BASE)_tmp 50 180 $(SMOOTH_DIR)/$(BASE) rm -f $(SMOOTH_DIR)/$(BASE)_tmp } global MATRIX_MATRIX_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep matrix_matrix] for FILE in [$(MATRIX_MATRIX_FILE)] { echo $FILE global BASE := $(FILE##*/) ./smooth $(ORIG_DIR)/$(BASE) 4 $(SMOOTH_DIR)/$(BASE) } global AAT_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep _aat] for FILE in [$(AAT_FILE)] { echo $FILE global BASE := $(FILE##*/) ./smooth $(ORIG_DIR)/$(BASE) 4 $(SMOOTH_DIR)/$(BASE) } global ATA_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep _ata] for FILE in [$(ATA_FILE)] { echo $FILE global BASE := $(FILE##*/) ./smooth $(ORIG_DIR)/$(BASE) 4 $(SMOOTH_DIR)/$(BASE) } ### no smoothing for tinyvector and matrices libs global TINY_BLITZ_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep tiny_blitz] for FILE in [$(TINY_BLITZ_FILE)] { echo $FILE global BASE := $(FILE##*/) cp $(ORIG_DIR)/$(BASE) $(SMOOTH_DIR)/$(BASE) } global TVMET_FILE := $[find $(ORIG_DIR) -name "*.dat" | grep tvmet] for FILE in [$(TVMET_FILE)] { echo $FILE global BASE := $(FILE##*/) cp $(ORIG_DIR)/$(BASE) $(SMOOTH_DIR)/$(BASE) } (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ORIG_DIR) op:Equal rhs:{($ VSub_Number "$1")} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SMOOTH_DIR) op: Equal rhs: {(${ VSub_Name ORIG_DIR) (_smooth)} spids: [6] ) ] spids: [6] ) (C {(mkdir)} {(${ VSub_Name SMOOTH_DIR)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AXPY_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(axpy)}) ] negated: False ) ] ) left_token: spids: [20 38] ) } spids: [19] ) ] spids: [19] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name AXPY_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [59 64] ) } spids: [58] ) ] spids: [58] ) (C {(./smooth)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(4)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)} ) (C {(./regularize)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)} {(2500)} {(15000)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) (C {(rm)} {(-f)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)}) ] spids: [50 126] ) spids: [45 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MATRIX_VECTOR_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(matrix_vector)}) ] negated: False ) ] ) left_token: spids: [131 149] ) } spids: [130] ) ] spids: [130] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name MATRIX_VECTOR_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [170 175] ) } spids: [169] ) ] spids: [169] ) (C {(./smooth)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(4)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)} ) (C {(./regularize)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)} {(50)} {(180)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) (C {(rm)} {(-f)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE) (_tmp)}) ] spids: [161 237] ) spids: [156 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MATRIX_MATRIX_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(matrix_matrix)}) ] negated: False ) ] ) left_token: spids: [241 259] ) } spids: [240] ) ] spids: [240] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name MATRIX_MATRIX_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [280 285] ) } spids: [279] ) ] spids: [279] ) (C {(./smooth)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(4)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) ] spids: [271 308] ) spids: [266 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AAT_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(_aat)}) ] negated: False ) ] ) left_token: spids: [312 330] ) } spids: [311] ) ] spids: [311] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name AAT_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [351 356] ) } spids: [350] ) ] spids: [350] ) (C {(./smooth)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(4)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) ] spids: [342 379] ) spids: [337 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ATA_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(_ata)}) ] negated: False ) ] ) left_token: spids: [384 402] ) } spids: [383] ) ] spids: [383] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name ATA_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [423 428] ) } spids: [422] ) ] spids: [422] ) (C {(./smooth)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(4)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) ] spids: [414 451] ) spids: [409 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TINY_BLITZ_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(tiny_blitz)}) ] negated: False ) ] ) left_token: spids: [459 477] ) } spids: [458] ) ] spids: [458] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name TINY_BLITZ_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [498 503] ) } spids: [497] ) ] spids: [497] ) (C {(cp)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) ] spids: [489 524] ) spids: [484 -1] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TVMET_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name ORIG_DIR)} {(-name)} {(DQ ("*.dat"))}) (C {(grep)} {(tvmet)}) ] negated: False ) ] ) left_token: spids: [528 546] ) } spids: [527] ) ] spids: [527] ) (ForEach iter_name: FILE iter_words: [{(${ VSub_Name TVMET_FILE)}] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {($ VSub_Name "$FILE")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [567 572] ) } spids: [566] ) ] spids: [566] ) (C {(cp)} {(${ VSub_Name ORIG_DIR) (/) (${ VSub_Name BASE)} {(${ VSub_Name SMOOTH_DIR) (/) (${ VSub_Name BASE)} ) ] spids: [558 593] ) spids: [553 -1] ) ] )