This commit is contained in:
guanjihuan 2024-07-17 17:49:53 +08:00
parent 797149d7db
commit df674318ca
5 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,3 @@
import numpy as np
def run(parameter_array):
for parameter in parameter_array:
print('hello world'+' '+str(parameter))

View File

@ -2,6 +2,4 @@
#PBS -N task
#PBS -l nodes=1:ppn=1
#PBS -q bigmem
cd $PBS_O_WORKDIR
export OMP_NUM_THREADS=1
python a.py

View File

@ -0,0 +1,7 @@
def run(parameter_array):
for parameter in parameter_array:
print('hello world'+' '+str(parameter))
parameter=0
parameter_array = [parameter]
run(parameter_array)

View File

@ -0,0 +1,8 @@
import numpy as np
import guan
parameter_array = np.arange(0, 11, 2)
guan.make_sh_file(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')