Commits

stevejb committed 352c3ba

made some small, essential changes. STD ERRORS in progress

Comments (0)

Files changed (1)

partial_derivative/numerical_diff_fps_runner.py

 import os
 import optparse
 import uuid
-from collections import OrderedDict
-import subprocess
+from OrderedDict import * 
+##import subprocess
+import subprocess32 as subprocess
 import numpy as np
 
 ##################################################
 ##################################################
 ## generate the exec base string
 
-exec_base_str = "./" + EXECNAME + " " + "--moments='" + momentList + "' "
+#exec_base_str = "./" + EXECNAME + " " + "--moments='" + momentList + "' "
+#exec_base_str = EXECNAME + " " + "--momentlist='" + momentList + "' "
+exec_base_str = EXECNAME + " "
 guid = str(uuid.uuid4())
 execStrDict = OrderedDict()
 ugkey_list = []
 
+OUTFOLDER = os.path.join(UUID_PREFIX, guid)
+if not os.path.exists(OUTFOLDER):
+    os.makedirs(OUTFOLDER)
+    print "CREATED FOLDER: " + OUTFOLDER
+
 ### perturb each parameter in the following way and see how it affects
 ### each moment
 for pp in range(len(paramAry)):
 
 ## now, for every line in execStrDict.values(), subprocess that
 ## then, get the results back from the csv file
+count = 0        
 for run_this_string in execStrDict.values():
-    print("About to run: " + run_this_string)
+    print(str(count) + ":  About to run: " + run_this_string)
     subprocess.check_output(run_this_string, shell=True)
 
+exit
 
 
 ##