[Swift-commit] r6938 - in SwiftTutorials/CIC_2013-08-09: app doc part04 part05 scripts
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Thu Aug 22 08:58:51 CDT 2013
Author: wilde
Date: 2013-08-22 08:58:50 -0500 (Thu, 22 Aug 2013)
New Revision: 6938
Added:
SwiftTutorials/CIC_2013-08-09/part05/p5.swift
Removed:
SwiftTutorials/CIC_2013-08-09/part05/rensemble.swift
Modified:
SwiftTutorials/CIC_2013-08-09/app/simulate.sh
SwiftTutorials/CIC_2013-08-09/app/stats.sh
SwiftTutorials/CIC_2013-08-09/doc/TODO
SwiftTutorials/CIC_2013-08-09/part04/p4.swift
SwiftTutorials/CIC_2013-08-09/part05/apps
SwiftTutorials/CIC_2013-08-09/part05/bias.dat
SwiftTutorials/CIC_2013-08-09/part05/sites.xml
SwiftTutorials/CIC_2013-08-09/scripts/rensemble.swift
Log:
for cic
Modified: SwiftTutorials/CIC_2013-08-09/app/simulate.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/app/simulate.sh 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/app/simulate.sh 2013-08-22 13:58:50 UTC (rev 6938)
@@ -28,9 +28,11 @@
addsims() {
while read f1 ; do
read -u 3 f2
- if [ _$f1 = _ ]; then f1=0; fi
- if [ _$f2 = _ ]; then f2=0; fi
+ if [ _$f1 = _ ]; then f1=$lastf1; fi
+ if [ _$f2 = _ ]; then f2=$lastf2; fi
printf "%${width}d\n" $(($f1+$f2))
+ lastf1=$f1
+ lastf2=$f2
done <$1 3<$2
}
@@ -57,7 +59,6 @@
-B|--biasfile file of integer biases to add to results
-l|--log generate a log in stderr if not null
-n|--nvalues print this many values per simulation
- -p|--paramfile take these parameters (in form param=value) from this file
-r|--range range (limit) of generated results
-s|--seed use this integer [0..32767] as a seed
-S|--seedfile use this file (containing integer seeds [0..32767]) one per line
@@ -67,13 +68,16 @@
END
}
+# FIXME: NOT YET IMPLEMENTED:
+# -p|--paramfile take these parameters (in form param=value) from this file
+# -p|--paramfile) paramfile=$2 ;;
+
while [ $# -gt 0 ]; do
case $1 in
-b|--bias) bias=$2 ;;
-B|--biasfile) biasfile=$2 ;;
-l|--log) log=$2 ;;
-n|--nvalues) nvalues=$2 ;;
- -p|--paramfile) paramfile=$2 ;;
-s|--seed) initseed=$2 ;;
-S|--seedfile) seedfile=$2 ;;
-t|--timesteps) timesteps=$2 ;;
@@ -117,7 +121,6 @@
# process file of biases
if [ $biasfile != none ]; then
- printf "\nMerged:\n\n"
addsims $simout $biasfile
else
cat $simout
@@ -126,6 +129,6 @@
# log environmental data
-if [ $log != none ]; then
+if [ $log != off ]; then
log 1>&2
fi
Modified: SwiftTutorials/CIC_2013-08-09/app/stats.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/app/stats.sh 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/app/stats.sh 2013-08-22 13:58:50 UTC (rev 6938)
@@ -4,6 +4,6 @@
{ sum += $1}
-END { print sum/NR }
+END { printf("%d\n",sum/NR) }
' $*
Modified: SwiftTutorials/CIC_2013-08-09/doc/TODO
===================================================================
--- SwiftTutorials/CIC_2013-08-09/doc/TODO 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/doc/TODO 2013-08-22 13:58:50 UTC (rev 6938)
@@ -37,6 +37,7 @@
- run stats app locally
- installed vs transferred apps
- transferred programs vs transferred scripts
+- summarize things about the env from the .log files, ala stats.
Y-style dag: 2 sims and average
@@ -52,7 +53,9 @@
Test if OSGCOnnect works and account string (PorjectName) works OK for both!
+SHow how to handle long lists of files (eg writeData and other swift.properties)
+Expand arith to arb prec using bc
ISSUES
Modified: SwiftTutorials/CIC_2013-08-09/part04/p4.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part04/p4.swift 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/part04/p4.swift 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1,17 +1,18 @@
+
type file;
-# Application to be called by this script
+# Application program to be called by this script:
-file simulation_script <"simulate.sh">;
+file simulation_prog <"app/simulate.sh">;
-# app() functions for application programs to be called:
+# "app" function for the simulation application:
-app (file out) simulation (file script, int timesteps, int sim_range)
+app (file out, file log) simulation (file prog, int timesteps, int sim_range)
{
- sh @filename(script) timesteps sim_range stdout=@filename(out);
+ sh @prog "-t" timesteps "-r" sim_range stdout=@out stderr=@log;
}
-# Command line params to this script:
+# Command line parameters to this script:
int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run
int range = @toInt(@arg("range", "100")); # range of the generated random numbers
@@ -24,5 +25,7 @@
foreach i in [0:nsim-1] {
file simout <single_file_mapper; file=@strcat("output/sim_",i,".out")>;
- simout = simulation(simulation_script, steps, range);
+ file simlog <single_file_mapper; file=@strcat("output/sim_",i,".log")>;
+ (simout,simlog) = simulation(simulation_prog, steps, range);
}
+
Modified: SwiftTutorials/CIC_2013-08-09/part05/apps
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part05/apps 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/part05/apps 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1 +1 @@
-uc3 sh /bin/bash
+osg sh /bin/bash
Modified: SwiftTutorials/CIC_2013-08-09/part05/bias.dat
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part05/bias.dat 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/part05/bias.dat 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1 +1,1000 @@
-123
+ 301
+ 439
+ 591
+ 484
+ 300
+ 459
+ 395
+ 351
+ 375
+ 131
+ 144
+ 12
+ 465
+ 682
+ 245
+ 140
+ 862
+ 772
+ 52
+ 728
+ 696
+ 801
+ 487
+ 501
+ 273
+ 869
+ 976
+ 731
+ 634
+ 594
+ 944
+ 973
+ 521
+ 260
+ 997
+ 165
+ 240
+ 844
+ 30
+ 145
+ 29
+ 185
+ 19
+ 332
+ 932
+ 740
+ 750
+ 774
+ 882
+ 258
+ 64
+ 988
+ 980
+ 627
+ 114
+ 722
+ 522
+ 333
+ 201
+ 737
+ 773
+ 226
+ 99
+ 705
+ 435
+ 560
+ 311
+ 96
+ 538
+ 176
+ 831
+ 993
+ 761
+ 917
+ 311
+ 983
+ 259
+ 494
+ 713
+ 503
+ 580
+ 23
+ 687
+ 394
+ 935
+ 386
+ 420
+ 598
+ 424
+ 954
+ 92
+ 528
+ 43
+ 384
+ 531
+ 494
+ 335
+ 913
+ 140
+ 271
+ 817
+ 101
+ 996
+ 742
+ 36
+ 592
+ 321
+ 499
+ 579
+ 454
+ 333
+ 276
+ 360
+ 159
+ 909
+ 791
+ 913
+ 665
+ 862
+ 663
+ 455
+ 39
+ 415
+ 798
+ 222
+ 758
+ 178
+ 656
+ 144
+ 450
+ 182
+ 507
+ 269
+ 839
+ 911
+ 400
+ 506
+ 602
+ 69
+ 729
+ 697
+ 242
+ 39
+ 557
+ 756
+ 677
+ 403
+ 930
+ 660
+ 730
+ 974
+ 23
+ 227
+ 67
+ 465
+ 950
+ 819
+ 100
+ 858
+ 123
+ 979
+ 610
+ 428
+ 623
+ 12
+ 369
+ 96
+ 86
+ 531
+ 777
+ 809
+ 9
+ 589
+ 267
+ 957
+ 722
+ 352
+ 655
+ 145
+ 848
+ 232
+ 752
+ 958
+ 902
+ 206
+ 165
+ 52
+ 452
+ 185
+ 109
+ 676
+ 736
+ 803
+ 893
+ 163
+ 403
+ 573
+ 121
+ 992
+ 818
+ 571
+ 304
+ 822
+ 390
+ 192
+ 174
+ 571
+ 648
+ 924
+ 817
+ 334
+ 791
+ 561
+ 679
+ 457
+ 549
+ 339
+ 264
+ 316
+ 338
+ 726
+ 471
+ 144
+ 748
+ 778
+ 851
+ 432
+ 260
+ 731
+ 436
+ 376
+ 631
+ 373
+ 680
+ 223
+ 169
+ 916
+ 252
+ 236
+ 2
+ 565
+ 749
+ 206
+ 788
+ 801
+ 460
+ 730
+ 795
+ 17
+ 992
+ 847
+ 229
+ 187
+ 690
+ 111
+ 731
+ 754
+ 677
+ 845
+ 707
+ 815
+ 258
+ 526
+ 475
+ 559
+ 970
+ 440
+ 682
+ 471
+ 378
+ 560
+ 821
+ 851
+ 819
+ 106
+ 624
+ 766
+ 628
+ 362
+ 149
+ 523
+ 215
+ 207
+ 446
+ 783
+ 845
+ 556
+ 273
+ 921
+ 519
+ 81
+ 598
+ 440
+ 899
+ 218
+ 623
+ 861
+ 475
+ 789
+ 643
+ 165
+ 526
+ 705
+ 803
+ 907
+ 725
+ 814
+ 306
+ 39
+ 795
+ 144
+ 986
+ 79
+ 726
+ 664
+ 99
+ 71
+ 516
+ 948
+ 601
+ 67
+ 111
+ 856
+ 915
+ 747
+ 621
+ 360
+ 93
+ 787
+ 880
+ 694
+ 5
+ 982
+ 336
+ 426
+ 346
+ 639
+ 10
+ 427
+ 757
+ 981
+ 102
+ 325
+ 305
+ 691
+ 619
+ 398
+ 686
+ 922
+ 674
+ 349
+ 580
+ 165
+ 321
+ 492
+ 432
+ 329
+ 477
+ 894
+ 444
+ 57
+ 577
+ 323
+ 278
+ 179
+ 421
+ 614
+ 616
+ 436
+ 892
+ 432
+ 558
+ 140
+ 517
+ 975
+ 198
+ 805
+ 422
+ 745
+ 250
+ 482
+ 958
+ 538
+ 177
+ 791
+ 489
+ 932
+ 620
+ 138
+ 978
+ 689
+ 192
+ 742
+ 626
+ 946
+ 106
+ 31
+ 178
+ 205
+ 285
+ 576
+ 105
+ 179
+ 307
+ 830
+ 576
+ 679
+ 231
+ 454
+ 833
+ 116
+ 160
+ 616
+ 250
+ 760
+ 205
+ 74
+ 989
+ 576
+ 843
+ 931
+ 267
+ 849
+ 108
+ 850
+ 937
+ 746
+ 607
+ 35
+ 539
+ 550
+ 553
+ 886
+ 459
+ 786
+ 720
+ 650
+ 735
+ 126
+ 100
+ 297
+ 303
+ 921
+ 105
+ 46
+ 954
+ 663
+ 568
+ 478
+ 886
+ 817
+ 690
+ 261
+ 642
+ 511
+ 967
+ 727
+ 492
+ 4
+ 810
+ 320
+ 338
+ 498
+ 842
+ 454
+ 366
+ 316
+ 802
+ 641
+ 293
+ 544
+ 957
+ 768
+ 553
+ 692
+ 749
+ 944
+ 19
+ 762
+ 991
+ 234
+ 247
+ 556
+ 625
+ 189
+ 725
+ 818
+ 764
+ 636
+ 370
+ 138
+ 161
+ 853
+ 309
+ 613
+ 250
+ 75
+ 728
+ 230
+ 248
+ 562
+ 110
+ 879
+ 993
+ 626
+ 308
+ 124
+ 593
+ 169
+ 125
+ 304
+ 143
+ 312
+ 525
+ 639
+ 492
+ 377
+ 153
+ 97
+ 90
+ 1
+ 483
+ 139
+ 277
+ 7
+ 707
+ 977
+ 513
+ 458
+ 95
+ 208
+ 149
+ 293
+ 690
+ 456
+ 558
+ 245
+ 327
+ 500
+ 222
+ 776
+ 863
+ 322
+ 363
+ 892
+ 414
+ 442
+ 283
+ 627
+ 656
+ 785
+ 468
+ 371
+ 657
+ 840
+ 449
+ 500
+ 522
+ 337
+ 784
+ 475
+ 667
+ 345
+ 151
+ 541
+ 843
+ 285
+ 270
+ 684
+ 381
+ 608
+ 731
+ 492
+ 233
+ 540
+ 185
+ 975
+ 422
+ 199
+ 595
+ 242
+ 995
+ 892
+ 509
+ 916
+ 493
+ 549
+ 588
+ 203
+ 653
+ 276
+ 808
+ 245
+ 277
+ 827
+ 724
+ 118
+ 566
+ 406
+ 927
+ 498
+ 727
+ 309
+ 165
+ 412
+ 28
+ 937
+ 797
+ 556
+ 322
+ 59
+ 741
+ 675
+ 89
+ 877
+ 283
+ 518
+ 509
+ 6
+ 486
+ 421
+ 644
+ 258
+ 920
+ 623
+ 725
+ 859
+ 88
+ 773
+ 499
+ 973
+ 661
+ 947
+ 347
+ 679
+ 935
+ 717
+ 65
+ 265
+ 388
+ 740
+ 252
+ 249
+ 969
+ 26
+ 149
+ 338
+ 913
+ 605
+ 639
+ 649
+ 914
+ 890
+ 522
+ 621
+ 779
+ 470
+ 321
+ 171
+ 304
+ 425
+ 626
+ 378
+ 491
+ 925
+ 900
+ 705
+ 830
+ 631
+ 844
+ 274
+ 539
+ 511
+ 664
+ 777
+ 251
+ 190
+ 967
+ 569
+ 140
+ 327
+ 863
+ 525
+ 368
+ 540
+ 475
+ 716
+ 189
+ 442
+ 729
+ 112
+ 726
+ 505
+ 678
+ 323
+ 128
+ 983
+ 660
+ 853
+ 326
+ 312
+ 378
+ 544
+ 278
+ 127
+ 322
+ 360
+ 645
+ 233
+ 665
+ 3
+ 788
+ 698
+ 342
+ 93
+ 214
+ 976
+ 756
+ 677
+ 375
+ 947
+ 363
+ 999
+ 499
+ 139
+ 245
+ 745
+ 830
+ 798
+ 135
+ 83
+ 902
+ 779
+ 617
+ 636
+ 753
+ 867
+ 724
+ 743
+ 924
+ 480
+ 836
+ 409
+ 100
+ 73
+ 298
+ 711
+ 35
+ 289
+ 381
+ 361
+ 901
+ 640
+ 919
+ 708
+ 562
+ 592
+ 26
+ 471
+ 395
+ 728
+ 433
+ 69
+ 856
+ 550
+ 225
+ 714
+ 999
+ 936
+ 266
+ 81
+ 343
+ 123
+ 37
+ 740
+ 593
+ 905
+ 715
+ 481
+ 265
+ 357
+ 338
+ 150
+ 875
+ 938
+ 603
+ 98
+ 245
+ 721
+ 373
+ 901
+ 795
+ 325
+ 955
+ 448
+ 816
+ 753
+ 850
+ 462
+ 628
+ 220
+ 694
+ 423
+ 241
+ 718
+ 730
+ 682
+ 944
+ 408
+ 151
+ 10
+ 826
+ 26
+ 269
+ 439
+ 973
+ 842
+ 884
+ 103
+ 792
+ 435
+ 675
+ 442
+ 955
+ 992
+ 256
+ 206
+ 666
+ 637
+ 725
+ 52
+ 21
+ 108
+ 622
+ 943
+ 583
+ 919
+ 796
+ 80
+ 52
+ 678
+ 845
+ 155
+ 331
+ 909
+ 888
+ 945
+ 979
+ 967
+ 104
+ 446
+ 807
+ 572
+ 354
+ 639
+ 68
+ 813
+ 11
+ 129
+ 647
+ 743
+ 897
+ 600
+ 992
+ 20
+ 896
+ 398
+ 16
+ 434
+ 662
+ 86
+ 200
+ 211
+ 287
+ 485
+ 670
+ 446
+ 495
+ 407
+ 916
+ 395
+ 920
+ 959
+ 817
+ 524
+ 146
+ 378
+ 849
+ 457
+ 536
+ 582
+ 608
+ 686
+ 127
+ 346
+ 934
+ 950
+ 420
+ 294
+ 439
+ 688
+ 953
+ 66
+ 603
+ 875
+ 372
+ 355
+ 105
+ 405
+ 371
+ 246
+ 829
+ 146
+ 403
+ 811
+ 484
+ 266
+ 181
+ 496
+ 25
+ 189
+ 806
+ 1
+ 171
+ 737
+ 381
+ 720
+ 321
+ 862
+ 7
+ 177
+ 838
+ 502
+ 708
+ 819
+ 205
+ 256
+ 166
+ 712
+ 492
+ 716
+ 130
+ 562
+ 308
+ 365
+ 694
+ 372
+ 917
+ 165
+ 366
+ 412
+ 480
+ 681
+ 824
+ 306
+ 970
+ 160
+ 555
+ 336
+ 61
+ 816
+ 611
+ 432
+ 536
+ 830
+ 171
+ 793
+ 33
+ 364
+ 998
+ 814
+ 952
+ 89
+ 24
+ 653
+ 651
+ 8
+ 789
+ 807
+ 869
+ 332
+ 897
+ 499
+ 701
+ 354
+ 688
+ 339
+ 93
+ 822
+ 801
+ 758
+ 915
+ 546
+ 520
+ 469
+ 512
+ 911
+ 482
+ 387
+ 187
Copied: SwiftTutorials/CIC_2013-08-09/part05/p5.swift (from rev 6937, SwiftTutorials/CIC_2013-08-09/part05/rensemble.swift)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part05/p5.swift (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/part05/p5.swift 2013-08-22 13:58:50 UTC (rev 6938)
@@ -0,0 +1 @@
+link ../scripts/rensemble.swift
\ No newline at end of file
Deleted: SwiftTutorials/CIC_2013-08-09/part05/rensemble.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part05/rensemble.swift 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/part05/rensemble.swift 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1 +0,0 @@
-link ../scripts/rensemble.swift
\ No newline at end of file
Modified: SwiftTutorials/CIC_2013-08-09/part05/sites.xml
===================================================================
--- SwiftTutorials/CIC_2013-08-09/part05/sites.xml 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/part05/sites.xml 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1,5 +1,5 @@
<config>
- <pool handle="uc3">
+ <pool handle="osg">
<execution provider="coaster" jobmanager="local:condor"/>
<profile namespace="karajan" key="jobThrottle">5.00</profile>
<profile namespace="karajan" key="initialScore">10000</profile>
@@ -8,8 +8,8 @@
<profile namespace="globus" key="maxWalltime">00:01:00</profile>
<profile namespace="globus" key="highOverAllocation">10000</profile>
<profile namespace="globus" key="lowOverAllocation">10000</profile>
- <profile namespace="globus" key="internalHostname">128.135.158.243</profile>
- <profile namespace="globus" key="slots">1</profile>
+ <profile namespace="globus" key="internalHostname">128.135.158.243</profile> <!-- FIXME Make Dynamic from setup -->
+ <profile namespace="globus" key="slots">20</profile>
<profile namespace="globus" key="maxNodes">1</profile>
<profile namespace="globus" key="nodeGranularity">1</profile>
<!-- For UC3: -->
@@ -19,7 +19,7 @@
<profile namespace="globus" key="jobType">nonshared</profile>
<!-- UC3 --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("uc3-c*", Machine)</profile> -->
- <!-- UCIT --> <profile namespace="globus" key="condor.Requirements">regexp("appcloud[0-1][0-9].*", Machine)</profile>
+ <!-- UCIT --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("appcloud[0-1][0-9].*", Machine)</profile> -->
<!-- MWUC --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("uct2-c*", Machine)</profile> -->
<!-- MWIU --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("iut2-c*", Machine)</profile> -->
<!-- MWUI --> <!-- <profile namespace="globus" key="condor.Requirements">regexp("taub*", Machine)</profile> -->
Modified: SwiftTutorials/CIC_2013-08-09/scripts/rensemble.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/scripts/rensemble.swift 2013-08-22 03:59:19 UTC (rev 6937)
+++ SwiftTutorials/CIC_2013-08-09/scripts/rensemble.swift 2013-08-22 13:58:50 UTC (rev 6938)
@@ -1,15 +1,13 @@
type file;
-# Applications to be called by this script
+# Define external application programs to be invoked
file simulation_prog <"app/simulate.sh">;
file analysis_prog <"app/stats.sh">;
-# app() functions for application programs to be called:
-
-app (file out, file err) simulation (file prog, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
+app (file out, file log) simulation (file prog, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
{
- sh @filename(prog) timesteps sim_range @filename(bias_file) scale sim_count stdout=@filename(out) stderr=@filename(err);
+ sh @filename(prog) "-t" timesteps "-r" sim_range "-B" @bias_file "-x" scale "-n" sim_count stdout=@out stderr=@log;
}
app (file out) analyze (file prog, file s[])
@@ -17,14 +15,14 @@
sh @filename(prog) @filenames(s) stdout=@filename(out);
}
-# Command line params to this script:
+# Command line params to this script
int nsim = @toInt(@arg("nsim", "10")); # number of simulation programs to run
int steps = @toInt(@arg("steps", "1")); # number of "steps" each simulation (==seconds of runtime)
int range = @toInt(@arg("range", "100")); # range of the generated random numbers
int count = @toInt(@arg("count", "10")); # number of random numbers generated per simulation
-# Main script and data
+# Perform nsim "simulations"
tracef("\n*** Script parameters: nsim=%i steps=%i range=%i count=%i\n\n", nsim, steps, range, count);
@@ -38,5 +36,7 @@
sims[i] = simout;
}
-file stats<"output/stats.out">; # Final output file: average of all "simulations"
+# Generate "analysis" file containing average of all "simulations"
+
+file stats<"output/stats.out">;
stats = analyze(analysis_prog,sims);
More information about the Swift-commit
mailing list