Skip to content
Snippets Groups Projects
Commit eba8e09a authored by Adams, Mark's avatar Adams, Mark
Browse files

Update ascent_jupyter_tools based on hackathon

parent 43d1a9f5
No related branches found
No related tags found
Loading
......@@ -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 CPU-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 GPU-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())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment