From d1293d7bd3a2361c7f65ae25998112f04be1fc95 Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Wed, 28 Sep 2016 10:31:51 +0200 Subject: [PATCH] prepost.simchunks: add optional non-zero offset when numbering chunks --- wetb/prepost/simchunks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wetb/prepost/simchunks.py b/wetb/prepost/simchunks.py index 931cde2d..4e4d5603 100644 --- a/wetb/prepost/simchunks.py +++ b/wetb/prepost/simchunks.py @@ -35,7 +35,7 @@ from wetb.prepost.Simulations import Cases def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, nr_procs_series=9, processes=1, queue='workq', walltime='24:00:00', chunks_dir='zip-chunks-jess', - pyenv='wetb_py3'): + pyenv='wetb_py3', i0=0): """Group a large number of simulations htc and pbs launch scripts into different zip files so we can run them with find+xargs on various nodes. """ @@ -405,8 +405,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, df_ind = pd.DataFrame(columns=['chnk_nr'], dtype=np.int32) df_ind.index.name = '[case_id]' for ii, dfi in enumerate(df_iter): - fname, ind = make_zip_chunks(dfi, ii, sim_id, run_dir, model_zip) - make_pbs_chunks(dfi, ii, sim_id, run_dir, model_zip) + fname, ind = make_zip_chunks(dfi, i0+ii, sim_id, run_dir, model_zip) + make_pbs_chunks(dfi, i0+ii, sim_id, run_dir, model_zip) df_ind = df_ind.append(ind) print(fname) -- GitLab