update
This commit is contained in:
parent
9cad8f4a9d
commit
60b9410584
@ -1,2 +1,2 @@
|
|||||||
parameter=0
|
parameter = 0
|
||||||
print(f'hello world {parameter}')
|
print(f'hello world {parameter}')
|
@ -4,4 +4,4 @@ parameter_array = [1, 2, 3, 4]
|
|||||||
|
|
||||||
guan.make_sh_file_for_bsub(sh_filename='a', command_line='python a.py', cpu_num=1, task_name='task', queue_name='score', cd_dir=0)
|
guan.make_sh_file_for_bsub(sh_filename='a', command_line='python a.py', cpu_num=1, task_name='task', queue_name='score', cd_dir=0)
|
||||||
|
|
||||||
guan.copy_py_sh_file_and_bsub_task(parameter_array, py_filename='a', old_str_in_py='parameter=0', new_str_in_py='parameter=', sh_filename='a', bsub_task_name='task')
|
guan.copy_py_sh_file_and_bsub_task(parameter_array, py_filename='a', old_str_in_py='parameter = 0', new_str_in_py='parameter = ', sh_filename='a', bsub_task_name='task')
|
@ -1,2 +1,2 @@
|
|||||||
parameter=0
|
parameter = 0
|
||||||
print(f'hello world {parameter}')
|
print(f'hello world {parameter}')
|
@ -4,4 +4,4 @@ parameter_array = [1, 2, 3, 4]
|
|||||||
|
|
||||||
guan.make_sh_file_for_qsub(sh_filename='a', command_line='python a.py', cpu_num=1, task_name='task', cd_dir=0)
|
guan.make_sh_file_for_qsub(sh_filename='a', command_line='python a.py', cpu_num=1, task_name='task', cd_dir=0)
|
||||||
|
|
||||||
guan.copy_py_sh_file_and_qsub_task(parameter_array=parameter_array, py_filename='a', old_str_in_py='parameter=0', new_str_in_py='parameter=', sh_filename='a', qsub_task_name='task')
|
guan.copy_py_sh_file_and_qsub_task(parameter_array=parameter_array, py_filename='a', old_str_in_py='parameter = 0 ', new_str_in_py='parameter = ', sh_filename='a', qsub_task_name='task')
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#PBS -N task
|
#PBS -N task
|
||||||
#PBS -l nodes=1:ppn=1
|
#PBS -l nodes=1:ppn=1
|
||||||
#PBS -q bigmem
|
|
||||||
python a.py
|
python a.py
|
||||||
|
@ -29,8 +29,6 @@ for parameter_str in parameter_str_array:
|
|||||||
with open('a'+str(index)+'.py', 'w') as f: # 写入
|
with open('a'+str(index)+'.py', 'w') as f: # 写入
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 以下处理任务上传文件
|
# 以下处理任务上传文件
|
||||||
old_file = 'a.sh'
|
old_file = 'a.sh'
|
||||||
new_file = 'a'+str(index)+'.sh'
|
new_file = 'a'+str(index)+'.sh'
|
||||||
@ -50,7 +48,5 @@ for parameter_str in parameter_str_array:
|
|||||||
with open('a'+str(index)+'.sh', 'w') as f: # 写入
|
with open('a'+str(index)+'.sh', 'w') as f: # 写入
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 提交任务
|
# 提交任务
|
||||||
os.system('qsub '+new_file)
|
os.system('qsub '+new_file)
|
Loading…
x
Reference in New Issue
Block a user