Skip to content
Snippets Groups Projects
Commit d1293d7b authored by David Verelst's avatar David Verelst
Browse files

prepost.simchunks: add optional non-zero offset when numbering chunks

parent 1946121b
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -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)
......
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