/[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 2866 by gross, Wed Oct 14 03:41:20 2009 UTC revision 2867 by gross, Fri Jan 22 06:28:02 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              ret = os.system(cmd) / 256              print cmd
140                i,o,e=os.popen3("/usr/bin/"+cmd,'r')
141                emsg=e.read()
142                omsg=o.read()
143                print omsg
144                print emsg
145                i.close()
146                o.close()
147                e.close()
148                if len(emsg)>0:
149                    ret=1
150                else:
151                    ret=0
152          else:          else:
153              ret=0              ret=0
154          ret=getMPIWorldMax(ret)          ret=getMPIWorldMax(ret)
155          if ret > 0:          if ret > 0:
156              if getMPIRankWorld() == 0:
157                  print "gmsh failed with "+emsg+"\n"+"gmsh messages:\n"+omsg
158            raise RuntimeError, "Could not build mesh: %s"%cmd            raise RuntimeError, "Could not build mesh: %s"%cmd
159          else:          else:
160            return self.getMeshFileName()            if getMPIRankWorld() == 0:
161                  print omsg
162            1/0
163            return self.getMeshFileName()
164    
165                    
166      def getScriptString(self):      def getScriptString(self):

Legend:
Removed from v.2866  
changed lines
  Added in v.2867

  ViewVC Help
Powered by ViewVC 1.1.26