[Swift-commit] r8188 - SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Thu Aug 14 12:02:39 CDT 2014


Author: wozniak
Date: 2014-08-14 12:02:39 -0500 (Thu, 14 Aug 2014)
New Revision: 8188

Modified:
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift
Log:
Update for new args


Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh	2014-08-14 16:59:32 UTC (rev 8187)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh	2014-08-14 17:02:39 UTC (rev 8188)
@@ -1,6 +1,7 @@
 #!/bin/zsh -eu
 
-A=( SIMULATIONS STEPS NP ND MASS DT SEED )
+A=( SIMULATIONS NP ND STEP_NUM STEP_PRINT_NUM DT MASS PRINTINFO
+    SCALE_FACTOR SCALE_OFFSET SEED )
 
 if [[ ${#*} != ${#A} ]]
 then
@@ -8,10 +9,11 @@
   exit 1
 fi
 
+set -x
 # Scan argv
 for a in ${A}
 do
-  eval ${a}=$1
+  eval "${a}='$1'"
   shift
 done
 
@@ -20,11 +22,15 @@
 
 PROGRAM=run-mds
 stc     ${PROGRAM}.swift
-turbine -n 2 ${PROGRAM}.tcl    \
-  --simulations=${SIMULATIONS} \
-  --steps=${STEPS}             \
-  --np=${NP}                   \
-  --nd=${ND}                   \
-  --mass=${MASS}               \
-  --dt=${DT}                   \
+turbine -n 2 ${PROGRAM}.tcl          \
+  --simulations=${SIMULATIONS}       \
+  --np=${NP}                         \
+  --nd=${ND}                         \
+  --step_num=${STEP_NUM}             \
+  --step_print_num=${STEP_PRINT_NUM} \
+  --dt=${DT}                         \
+  --mass=${MASS}                     \
+  --printinfo=${PRINTINFO}           \
+  --scale_factor=${SCALE_FACTOR}     \
+  --scale_offset=${SCALE_OFFSET}     \
   --seed=${SEED}

Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift	2014-08-14 16:59:32 UTC (rev 8187)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift	2014-08-14 17:02:39 UTC (rev 8188)
@@ -7,17 +7,22 @@
 main
 {
   int simulations = toint(argv("simulations"));
-  int steps = toint(argv("steps"));
   int np = toint(argv("np"));
   int nd = toint(argv("nd"));
+  int step_num = toint(argv("step_num"));
+  int step_print_num = toint(argv("step_print_num"));
+  float dt = tofloat(argv("dt"));
   float mass = tofloat(argv("mass"));
-  float dt = tofloat(argv("dt"));
+  string printinfo = argv("printinfo");
+  float scale_factor = tofloat(argv("scale_factor"));
+  float scale_offset = tofloat(argv("scale_offset"));
   int seed = toint(argv("seed"));
   foreach i in [0:simulations-1]
   {
     file out_txt<sprintf("out-%i.txt",i)>;
     file out_trj<sprintf("out-%i.trj",i)>;
     (out_txt, out_trj) =
-      simulate(steps, 10, 0, 0, np, nd, mass, dt, seed);
+      simulate(np, nd, step_num, step_print_num, dt, mass,
+               printinfo, scale_factor, scale_offset, seed);
   }
 }




More information about the Swift-commit mailing list