/[escript]/trunk/pycad/py_src/gmsh.py
ViewVC logotype

Diff of /trunk/pycad/py_src/gmsh.py

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

revision 2868 by gross, Fri Jan 22 06:28:02 2010 UTC revision 2869 by gross, Mon Jan 25 05:11:28 2010 UTC
# Line 136  class Design(design.Design): Line 136  class Design(design.Design):
136          """          """
137          cmd = self.getCommandString()%self.getScriptHandler()          cmd = self.getCommandString()%self.getScriptHandler()
138          if getMPIRankWorld() == 0:          if getMPIRankWorld() == 0:
139              print cmd              ret = os.system(cmd) / 256
             i,o,e=os.popen3("/usr/bin/"+cmd,'r')  
             emsg=e.read()  
             omsg=o.read()  
             print omsg  
             print emsg  
             i.close()  
             o.close()  
             e.close()  
             if len(emsg)>0:  
                 ret=1  
             else:  
                 ret=0  
140          else:          else:
141              ret=0              ret=0
142          ret=getMPIWorldMax(ret)          ret=getMPIWorldMax(ret)
143          if ret > 0:          if ret > 0: raise RuntimeError, "Could not build mesh: %s"%cmd
           if getMPIRankWorld() == 0:  
               print "gmsh failed with "+emsg+"\n"+"gmsh messages:\n"+omsg  
           raise RuntimeError, "Could not build mesh: %s"%cmd  
         else:  
           if getMPIRankWorld() == 0:  
               print omsg  
         1/0  
144          return self.getMeshFileName()          return self.getMeshFileName()
145    
146                    

Legend:
Removed from v.2868  
changed lines
  Added in v.2869

  ViewVC Help
Powered by ViewVC 1.1.26