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

SCM Repository

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

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

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

revision 3939, Tue Jun 7 18:06:23 2016 UTC revision 3940, Tue Jun 7 21:38:49 2016 UTC
# Line 200  Line 200 
200      ftemplate.close()      ftemplate.close()
201      f.close()      f.close()
202    
203  def writeDiderot(p_out, app,pos,output):  def runDiderot(p_out, app, pos, output, runtimepath, isVis):
204        if(isVis):
205            outSize = len(pos)
206            w_shape=" -s 1 "+str(outSize * outSize)
207        #   os.system("./"+p_out+"| unu save -f nrrd -o tmp.nrrd")
208        #os.system("unu reshape -i tmp.nrrd "+w_shape+" | unu save -f text -o "+p_out+".txt")
209        else:
210            os.system("./"+p_out)
211    
212    def writeDiderot(p_out, app, pos, output, runtimepath, isVis):
213      readDiderot(p_out,app,pos)      readDiderot(p_out,app,pos)
214      # compile and run diderot program      # compile and run diderot program
215        print runtimepath
216      os.system(" echo \"pout "+p_out+"\"")      os.system(" echo \"pout "+p_out+"\"")
217      os.system(" echo \"create diderot program "+p_out+".diderot \"")      os.system(" echo \"create diderot program "+p_out+".diderot \"")
218      os.system("/Users/chariseechiw/diderot/ein16/bin/diderotc "+p_out+".diderot")      os.system(runtimepath+" "+p_out+".diderot")
219      os.system("./"+p_out)      runDiderot(p_out, app, pos, output, runtimepath,isVis)
220      os.system("cp "+p_out+".txt "+output+".txt")      os.system("cp "+p_out+".txt "+output+".txt")
221      os.system("cp "+p_out+".diderot "+output+".diderot")      os.system("cp "+p_out+".diderot "+output+".diderot")
222      os.system("cp "+p_out+".c "+output+".c")      os.system("cp "+p_out+".c "+output+".c")

Legend:
Removed from v.3939  
changed lines
  Added in v.3940

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