Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
pipelet
Pipelet
Commits
f1ac345c
Commit
f1ac345c
authored
Dec 04, 2015
by
Maude Le Jeune
Browse files
include cori launcher @ nersc
parent
9ba53f9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
pipelet/launchers.py
pipelet/launchers.py
+18
-16
No files found.
pipelet/launchers.py
View file @
f1ac345c
...
...
@@ -252,23 +252,10 @@ def launch_pbs(pipe, n, address=None, authkey='secret', job_name="job_", log_lev
def
launch_nersc
(
pipe
,
n
,
ppn
=
1
,
port
=
50000
,
authkey
=
'secret'
,
job_name
=
"job_"
,
log_level
=
logging
.
WARNING
,
job_header
=
"""
#PBS -q regular
#PBS -l nodes=%d:ppn=%d
"""
,
carver
=
False
,
python_mpi
=
False
):
"""
,
carver
=
False
,
python_mpi
=
False
,
n_numa
=
2
,
cori
=
False
):
""" Launch a bunch of distant workers through a PBS batch system using aprun.
"""
# server_file="""
##PBS -q regular
##PBS -l mppwidth=%d
##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' &
#%s
#EOF
#sleep 5
#aprun -np %d python $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOST
#"""
server_file
=
job_header
+
"""
export CRAY_ROOTFS=DSL
echo "export PIPELETD_HOST=$HOST" > ~/host_info.sh
...
...
@@ -288,6 +275,15 @@ sleep 5
mpirun -np %d %s $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOSTNAME
"""
server_file_cori
=
job_header
+
"""
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
srun -n %d %s $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOSTNAME
"""
nnode
=
n
/
ppn
if
(
n
%
ppn
>
0
):
...
...
@@ -302,16 +298,22 @@ mpirun -np %d %s $PIPELETPATH/launchers.py -p %d -s %s -l %s -H $HOSTNAME
jobfile
=
get_log_file
(
pipe
,
'.job'
)
errfile
=
jobfile
.
replace
(
'job'
,
'err'
)
logfile
=
jobfile
.
replace
(
'job'
,
'log'
)
batch
=
'qsub'
if
carver
:
server_file
=
server_file_carver
with
closing
(
file
(
jobfile
,
'w'
))
as
f
:
f
.
write
(
server_file
%
(
nnode
,
ppn
,
log_level
,
port
,
pipedesc
,
n
,
pyrun
,
port
,
authkey
,
logfile
))
elif
cori
:
batch
=
'sbatch'
server_file
=
server_file_cori
with
closing
(
file
(
jobfile
,
'w'
))
as
f
:
f
.
write
(
server_file
%
(
nnode
,
log_level
,
port
,
pipedesc
,
n
,
pyrun
,
port
,
authkey
,
logfile
))
else
:
with
closing
(
file
(
jobfile
,
'w'
))
as
f
:
f
.
write
(
server_file
%
(
n
,
log_level
,
port
,
pipedesc
,
nnode
,
24
/
ppn
,
24
/
ppn
/
2
,
pyrun
,
port
,
authkey
,
logfile
))
f
.
write
(
server_file
%
(
n
,
log_level
,
port
,
pipedesc
,
nnode
,
24
/
ppn
,
24
/
ppn
/
n_numa
,
pyrun
,
port
,
authkey
,
logfile
))
subprocess
.
Popen
([
'qsub'
,
'-o'
,
logfile
,
'-e'
,
errfile
,
jobfile
]).
communicate
()[
0
]
subprocess
.
Popen
([
batch
,
'-o'
,
logfile
,
'-e'
,
errfile
,
jobfile
]).
communicate
()[
0
]
_job_file
=
"""
#/bin/zsh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment