Commit 486318fc authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

scheduler and worker logging ok with pbs

parent 33d05a40
......@@ -56,7 +56,7 @@ def get_log_file (pipe, name):
d = datetime.datetime.now()
strdate = d.strftime("%y%d%j_%H%M%s%f")
return pipe._prefix+"log/"+strdate+"_"+name
return pipe.get_log_dir()+strdate+"_"+name
def set_logger (pipe, log_level):
......@@ -279,7 +279,7 @@ echo $PYTHONPATH
f.write ("#PBS -e %s\n"%errfile)
f.write ("#PBS -N %s%d\n"%(job_name,i))
f.write ("#PBS -l select=1:ncpus=1,walltime=%s\n"%cpu_time)
f.write ("python -m pipelet.launchers -H %s -p %s -s %s -l %s"%(address[0],address[1],authkey,work_log_file))
f.write ("python -m pipelet.launchers -H %s -p %s -s %s -l %s"%(address[0],address[1],authkey,jobfile.replace('job','worker')))
f.close()
subprocess.Popen(['qsub',jobfile]).communicate()[0]
......
......@@ -508,6 +508,11 @@ class Pipeline:
return path.join(self.get_curr_dir(seg), 'data')
def get_log_dir (self):
""" Return the pipe log directory.
"""
return self._prefix+"log/"
if __name__ == "__main__":
import doctest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment