/[escript]/trunk/pyvisi/py_src/movie.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/movie.py

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

revision 2313 by gross, Tue Mar 17 03:41:17 2009 UTC revision 2314 by gross, Tue Mar 17 04:16:24 2009 UTC
# Line 125  class Movie: Line 125  class Movie:
125          # will be deleted automatically once the movie has been generated.          # will be deleted automatically once the movie has been generated.
126          # However, if a paramter file name was specified, the file will be          # However, if a paramter file name was specified, the file will be
127          # maintained.          # maintained.
128          if getMPIRankWorld():          if getMPIRankWorld() == 0:
129              ret = os.system('ppmtompeg ' + self.__parameter_file) / 256              ret = os.system('ppmtompeg ' + self.__parameter_file) / 256
130          else:          else:
131              ret=0              ret=0
# Line 134  class Movie: Line 134  class Movie:
134            raise RuntimeError, "Could not  generate movie %s"%'ppmtompeg ' + self.__parameter_file            raise RuntimeError, "Could not  generate movie %s"%'ppmtompeg ' + self.__parameter_file
135                    
136          if(self.__parameter_file == "make_movie"):          if(self.__parameter_file == "make_movie"):
137              if getMPIRankWorld():              if getMPIRankWorld() == 0:
138                  ret = os.system('rm ' + self.__parameter_file) / 256              ret = os.system('rm ' + self.__parameter_file) / 256
139              else:              else:
140                  ret=0                  ret=0
141              ret=getMPIWorldMax(ret)              ret=getMPIWorldMax(ret)
# Line 266  class Movie: Line 266  class Movie:
266                                         'FRAME_RATE 24')                                         'FRAME_RATE 24')
267                
268                    parameter_file.close()                    parameter_file.close()
269                    if os.name == 'nt' :                    if os.name == 'nt':
270                        tmp_name = self.__parameter_file.replace('\\','/')                        tmp_name = self.__parameter_file.replace('\\','/')
271                        os.system('dos2unix ' + tmp_name)                        ret = os.system('dos2unix ' + tmp_name) / 256
272                          if ret >0:
273                              raise RuntimeError,"execution of %s has failed."%('dos2unix ' + tmp_name)
274               except Exception, e:               except Exception, e:
275                   ret=1                   ret=1
276          ret=getMPIWorldMax(ret)          ret=getMPIWorldMax(ret)

Legend:
Removed from v.2313  
changed lines
  Added in v.2314

  ViewVC Help
Powered by ViewVC 1.1.26