Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/run.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/run.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4195, Wed Jul 13 03:26:15 2016 UTC revision 4196, Wed Jul 13 03:36:42 2016 UTC
# Line 31  Line 31 
31  branch = pathToString()  branch = pathToString()
32  if isVis15:  if isVis15:
33      runtimepath  = vispath      runtimepath  = vispath
34      fld="five"      fld="tues"
35  else:  else:
36      runtimepath  = einpath      runtimepath  = einpath
37      fld="five"      fld="tues"
38    
39  todo = sys.argv[2]  todo = sys.argv[2]
40    
# Line 44  Line 44 
44      os.system("rm *.pyc")      os.system("rm *.pyc")
45      os.system("rm *.h")      os.system("rm *.h")
46      os.system("rm *.nrrd")      os.system("rm *.nrrd")
47        os.system("rm *.cxx")
48        os.system("rm fs3d-vec2")
49        os.system("rm fs3d-vec2")
50    
51  def write(e):  def write(e):
52      print (e)      print (e)
# Line 66  Line 69 
69      if(rst_good==cnt):      if(rst_good==cnt):
70          x+="PASS:"          x+="PASS:"
71      else:      else:
72          x+="FAIL:"          x+="CHECK:"
73      x+= pre+" "+branch      x+= pre+" "+branch
74      if(rst_good>0):      if(rst_good>0):
75          x+=" A:"+str(rst_good)+"|"+str(cnt)          x+=" A:"+str(rst_good)+"|"+str(cnt)
# Line 127  Line 130 
130          (rtn_1, rst_good, rst_eh, rst_terrible, rst_compile) =  rtn          (rtn_1, rst_good, rst_eh, rst_terrible, rst_compile) =  rtn
131    
132    
133          if (rst_terrible==1):          if (rst_terrible!=1):
134              names= "t_"+str(ex_opr)+"_"+str(ex_num)+"_"+str(id)+"_"+str(app.oty.id)              names= "t_"+str(ex_opr)+"_"+str(ex_num)+"_"+str(id)+"_"+str(app.oty.id)
135              write2("\n\t-"+rtn_1+" "+names)              write2("\n\t-"+rtn_1+" "+names)
136              path = fld+"/"+names              path = fld+"/"+names
             if(app.oty.id==23):  
                 path = fld+"/23/"+names  
             elif(app.oty.id==33):  
                 path = fld+"/33/"+names  
   
137              os.system("mkdir "+path)              os.system("mkdir "+path)
138              os.system("cp data/output5_p_observ.diderot "+path+"/"+names+".diderot")              os.system("cp data/output5_p_observ.diderot "+path+"/"+names+".diderot")
139              os.system("cp output5_p_observ.diderot "+path+"/"+names+".diderot")              os.system("cp output5_p_observ.diderot "+path+"/"+names+".diderot")
140              os.system("cp data/inputfile_0.nrrd "+path+"/inputfile_0.nrrd")              os.system("cp data/inputfile_0.nrrd "+path+"/inputfile_0.nrrd")
141              os.system("cp data/inputfile_1.nrrd "+path+"/inputfile_1.nrrd")              os.system("cp data/inputfile_1.nrrd "+path+"/inputfile_1.nrrd")
142                os.system("cp data/inputfilecat_2.nrrd "+path+"/inputfilecat_2.nrrd")
143                os.system("cp data/inputfile_2.nrrd "+path+"/inputfile_2.nrrd")
144              a= "\n\nterrible-data"              a= "\n\nterrible-data"
145              b= "\n\nobserved data from python"+str(observed_data)              b= "\n\nobserved data from python"+str(observed_data)
146              c= "\n\ncorrect data from python"+str(correct_data)              c= "\n\ncorrect data from python"+str(correct_data)
# Line 286  Line 286 
286      rst_terrible = 0      rst_terrible = 0
287      rst_compile = 0      rst_compile = 0
288      for  ex_outer in range(n):      for  ex_outer in range(n):
289            print ("current_cat :"+str(ex_opr)+"_"+str(ex_num)+"_"+str(ex_outer))
290          (cnt1, rtn1, rst_good1, rst_eh1, rst_terrible1, rst_compile1) = embed2_apply_outer(ex_opr, ex_num, ex_outer, gty)          (cnt1, rtn1, rst_good1, rst_eh1, rst_terrible1, rst_compile1) = embed2_apply_outer(ex_opr, ex_num, ex_outer, gty)
291          rtn.append(rtn1)          rtn.append(rtn1)
292          cnt+=int(cnt1)          cnt+=int(cnt1)
# Line 462  Line 463 
463              rst_terrible2 += rst_terrible1              rst_terrible2 += rst_terrible1
464              rst_compile2 += rst_compile1              rst_compile2 += rst_compile1
465          pnt1("onerun:"+str(ex_opr)+","+str(ex_outer2)+","+str(ex_ty2),cnt, total,rst_good2,  rst_eh2, rst_terrible2, rst_compile2)          pnt1("onerun:"+str(ex_opr)+","+str(ex_outer2)+","+str(ex_ty2),cnt, total,rst_good2,  rst_eh2, rst_terrible2, rst_compile2)
466      pnt3("Final for " +str(ex_opr)+":", cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)      pnt2(str(ex_opr)+":", cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)
467  elif (n==-7):  elif (n==-7):
468      # run n examples      # run n examples
469      # with a specific operator,      # with a specific operator,
# Line 509  Line 510 
510                  rst_compile2 += rst_compile1                  rst_compile2 += rst_compile1
511      #       pnt1("onerun:"+str(ex_opr)+","+str(ex_outer2)+","+str(ex_ty2),cnt, total,rst_good2,  rst_eh2, rst_terrible2, rst_compile2)      #       pnt1("onerun:"+str(ex_opr)+","+str(ex_outer2)+","+str(ex_ty2),cnt, total,rst_good2,  rst_eh2, rst_terrible2, rst_compile2)
512      #pnt2("cumulative:"+str(ex_opr)+","+sstr(ex_outer2),cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)      #pnt2("cumulative:"+str(ex_opr)+","+sstr(ex_outer2),cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)
513      pnt3("Final for " +str(ex_opr)+"-i_opr#("+idToStr(ex_opr)+":", cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)      pnt2("-2 opr:"+str(ex_opr)+"("+get_exname(ex_opr)+")--", cnt, total,rst_good,  rst_eh, rst_terrible, rst_compile)
514  else:  else:
515    raise "unsupported"    raise "unsupported"

Legend:
Removed from v.4195  
changed lines
  Added in v.4196

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0