[cig-commits] r11789 - seismo/3D/SPECFEM3D_GLOBE/trunk
leif at geodynamics.org
leif at geodynamics.org
Wed Apr 9 13:30:22 PDT 2008
Author: leif
Date: 2008-04-09 13:30:21 -0700 (Wed, 09 Apr 2008)
New Revision: 11789
Modified:
seismo/3D/SPECFEM3D_GLOBE/trunk/pyspecfem3D
Log:
Replicate mineos.py output redirection.
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/pyspecfem3D
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/pyspecfem3D 2008-04-09 18:40:28 UTC (rev 11788)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/pyspecfem3D 2008-04-09 20:30:21 UTC (rev 11789)
@@ -3,7 +3,7 @@
from pyre.applications import Script
from os.path import dirname, exists, isdir, join
-import os, sys, shutil
+import os, sys, stat, shutil
SPECFEM3D_GLOBE = dirname(__file__)
@@ -46,6 +46,13 @@
def onLoginNode(self, *args, **kwds):
+ # Redirect all output -- our journal output, and the output of
+ # our children -- to a file.
+ fd = os.open("output_build.txt", os.O_CREAT | os.O_WRONLY, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
+ os.dup2(fd, 1)
+ os.dup2(fd, 2)
+ os.close(fd)
+
self.prepareFiles()
self.build()
self.schedule(*args, **kwds)
More information about the cig-commits
mailing list