Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADAPD_ORNL_Hackathon
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brogan, Joel
ADAPD_ORNL_Hackathon
Commits
eba8e09a
Commit
eba8e09a
authored
4 years ago
by
Adams, Mark
Browse files
Options
Downloads
Patches
Plain Diff
Update ascent_jupyter_tools based on hackathon
parent
43d1a9f5
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ascent_jupyter_tools.py
+2
-6
2 additions, 6 deletions
ascent_jupyter_tools.py
with
2 additions
and
6 deletions
ascent_jupyter_tools.py
+
2
−
6
View file @
eba8e09a
...
...
@@ -17,10 +17,9 @@ def generate_lsf_script(notebookfile,outputfile,project_id='gen143',job_name='nb
# t.append('#BSUB -e ' + 'err_'+outputfile)
# t.append('#BSUB -o ' + 'log_'+outputfile)
t
.
append
(
'
###BSUB -alloc_flags
"
NVME
"'
)
t
.
append
(
'
module load job-step-viewer
'
)
t
.
append
(
'
module load ibm-wml-ce/1.7.0-0
'
)
t
.
append
(
'
conda activate %s
'
%
conda_env
)
runcall
=
f
'
jsrun --nrs 1 --tasks_per_rs 1 --cpu_per_rs
{
num_cpu
}
--gpu_per_rs
{
num_gpu
}
--rs_per_host 1 --latency_priority
C
PU-CPU --launch_distribution packed --bind packed:1 jupyter nbconvert --allow-errors --to notebook --execute
{
notebookfile
}
--output
{
outputfile
}
'
runcall
=
f
'
jsrun --nrs 1 --tasks_per_rs 1 --cpu_per_rs
{
num_cpu
}
--gpu_per_rs
{
num_gpu
}
--rs_per_host 1 --latency_priority
G
PU-CPU --launch_distribution packed --bind packed:1 jupyter nbconvert
--ExecutePreprocessor.timeout=3600
--allow-errors --to notebook --execute
{
notebookfile
}
--output
{
outputfile
}
'
t
.
append
(
runcall
)
return
'
\n
'
.
join
(
t
)
...
...
@@ -118,7 +117,7 @@ def submit_notebook(notebookfile,outputfile=None,conda_env='adapd_hackathon',wai
print
(
'
Warining: submission script file
'
,
lsf_file_name
,
'
already exists. It will be overwritten.
'
)
submit_script
=
generate_lsf_script
(
notebookfile
,
outputfile
+
'
_ascentrun.ipynb
'
,
job_name
=
'
job_
'
+
os
.
path
.
basename
(
notebookfile
),
conda_env
=
conda_env
)
with
open
(
lsf_file_name
,
'
w
'
)
as
fp
:
with
open
(
lsf_file_name
,
'
w
'
,
encoding
=
'
utf-8
'
)
as
fp
:
fp
.
write
(
submit_script
)
print
(
'
Submitting job to compute nodes...
'
)
...
...
@@ -127,6 +126,3 @@ def submit_notebook(notebookfile,outputfile=None,conda_env='adapd_hackathon',wai
if
wait
:
print
(
'
Waiting for job to finish
'
)
waitForJob
(
jid
,
getpass
.
getuser
())
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment