Commit bc9aec35 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

pass pbs script to nersc launcher

clean workspace after segment exec
parent f0b44582
......@@ -20,27 +20,3 @@ from pipeline import *
from task import *
from environment import *
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
__version__='3ae45890695d12089faebf29072ae33604b69b14'
......@@ -583,4 +583,5 @@ class Environment(EnvironmentBase):
else:
res = self.seg_output
close_logger (self.logger)
glo.clear() ## empty segment workspace
return res
......@@ -236,20 +236,35 @@ echo $PYTHONPATH
sched_proxy.run()
def launch_nersc (pipe, n, port=50000, authkey='secret', job_name="job_", log_level=logging.WARNING, cpu_time="00:30:00"):
""" Launch a bunch of distant workers through a PBS batch system using aprun.
def launch_nersc (pipe, n, port=50000, authkey='secret', job_name="job_", log_level=logging.WARNING, cpu_time="00:30:00", job_header="""
#PBS -q regular
#PBS -l nodes=%d:ppn=1
"""):
""" Launch a bunch of distant workers through a PBS batch system using aprun.
"""
server_file="""
#PBS -l mppwidth=%d
# server_file="""
##PBS -q regular
##PBS -l mppwidth=%d
##PBS -l walltime=%s
#export CRAY_ROOTFS=DSL
#echo "export PIPELETD_HOST=$HOSTNAME" > ~/host_info.sh
#pipeletd -n -l %d -p %d -a $HOSTNAME << 'EOF' &
#%s
#EOF
#sleep 5
#aprun -np %d python $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOST
#"""
server_file=job_header+"""
#PBS -l walltime=%s
export CRAY_ROOTFS=DSL
echo "export PIPELETD_HOST=$HOST" > ~/host_info.sh
pipeletd -n -l %d -p %d -a $HOST << 'EOF' &
export CRAY_ROOTFS=DSL
echo "export PIPELETD_HOST=$HOSTNAME" > ~/host_info.sh
pipeletd -n -l %d -p %d -a $HOSTNAME << 'EOF' &
%s
EOF
sleep 5
aprun -n %d python $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOST
mpirun -np %d python $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOSTNAME
"""
import cPickle as pickle
......@@ -263,8 +278,6 @@ aprun -n %d python $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOST
subprocess.Popen(['qsub','-o' ,logfile, '-e', errfile,jobfile]).communicate()[0]
_job_file = """
#/bin/zsh
export PATH=/afs/in2p3.fr/home/b/betoule/software/photcalib/tools:$PATH
......
......@@ -354,7 +354,8 @@ class Web:
e = [tcounts[i] for i in index[s[2]]]
except IndexError:
e = []
ss = s[3] + '<span class="pipetag">%s</span>'%("" if str(s[4])=='None' else s[4])
ss = '%s'%("" if str(s[3])=='None' else s[3]) + '<span class="pipetag">%s</span>'%(" " if str(s[4])=='None' else s[4])
if ss is None:
ss = ""
ss = '<a class="icon image" href="index?thumbnail=%d"></a>'%(s[2])+ss
......
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