[cig-commits] r8074 - cs/portal/trunk
leif at geodynamics.org
leif at geodynamics.org
Tue Oct 2 19:56:39 PDT 2007
Author: leif
Date: 2007-10-02 19:56:39 -0700 (Tue, 02 Oct 2007)
New Revision: 8074
Modified:
cs/portal/trunk/daemon.py
Log:
Changes corresponding to r1826 in the other repository (mesher/solver
split).
Modified: cs/portal/trunk/daemon.py
===================================================================
--- cs/portal/trunk/daemon.py 2007-10-02 22:50:08 UTC (rev 8073)
+++ cs/portal/trunk/daemon.py 2007-10-03 02:56:39 UTC (rev 8074)
@@ -321,21 +321,8 @@
def __call__(self, jm):
try:
- # build
- job = self.newBuildJob()
- self.job = job
- jm.runJob(job)
-
- self.setStatus(self.STATUS_PREPARING)
- while job.isAlive():
- job.statusChanged.wait()
-
- if job.status == job.STATUS_FAILED:
- self.setStatus(self.STATUS_ERROR)
- raise RuntimeError("build failed")
-
# run
- job = self.newRunJob()
+ job = self.newJob()
self.job = job
jm.runJob(job)
@@ -343,6 +330,7 @@
while job.isAlive():
job.statusChanged.wait()
if job.status == job.STATUS_ACTIVE:
+ #self.setStatus(self.STATUS_PREPARING)
self.setStatus(self.STATUS_RUNNING)
# while
@@ -366,59 +354,25 @@
def isAlive(self):
return not self.status in self.deadCodes
- def newBuildJob(self):
- self.buildDir = "%s/runs/%05d" % (TG_CLUSTER_SCRATCH, self.id)
+ def newJob(self):
job = Job(
- "build",
+ "run",
jobType = "single",
count = 1,
executable = SPECFEM_3D_GLOBE + "/xspecfem3D",
- arguments = [self.simulation.parameters, "--scheduler.dry", "--output-dir=" + self.buildDir],
+ arguments = [self.simulation.parameters,
+ '--solver.cmt-solution=' + self.simulation.events,
+ '--solver.stations=' + self.simulation.stations,
+ "--scheduler.wait=True",
+ "--job.name=run%05d" % self.id,
+ #"--job.walltime=2*hour",
+ "--output-dir=.", # Globus scratch dir
+ "--job.stdout=stdout.txt",
+ "--job.stderr=stderr.txt",
+ ],
)
job.inputFileURLs = self.inputFileURLs
- return job
-
- def newRunJob(self):
- from os.path import join
-
- pythonPath = ':'.join([
- SPECFEM_3D_GLOBE + "/merlin-1.3.egg",
- SPECFEM_3D_GLOBE,
- SPECFEM_3D_GLOBE + "/python/pythia-0.8.1.4-py2.4.egg",
- SPECFEM_3D_GLOBE + "/python/Cheetah-2.0rc8-py2.4-linux-x86_64.egg",
- ])
-
- simDir = "." # Globus scratch dir
-
- pyreArgs = [
- self.simulation.parameters,
- '--output-dir=' + simDir,
- '--solver.cmt-solution=' + self.simulation.events,
- '--solver.stations=' + self.simulation.stations,
- ]
-
- job = Job(
- "run",
- jobType = "mpi",
- count = self.simulation.nodes,
- maxWallTime = 12*60,
- queue = "normal",
- executable = self.buildDir + "/mpipyspecfem3D",
- arguments = ["--pyre-start",
- pythonPath,
- "Specfem3DGlobe==4.0",
- "mpi:mpistart",
- "Specfem3DGlobe.Specfem:Specfem",
- "--nodes=%d" % self.simulation.nodes,
- "--macros.nodes=%d" % self.simulation.nodes,
- "--macros.job.name=mysim",
- "--macros.job.id=%d" % self.id,
- ] + pyreArgs,
- )
-
- job.inputFileURLs = self.inputFileURLs
job.outputFiles = self.outputFiles
-
return job
More information about the cig-commits
mailing list