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

prepost: add wine 64bit support to zipchunks

parent 4a8c77d7
No related branches found
No related tags found
No related merge requests found
...@@ -348,11 +348,11 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False, ...@@ -348,11 +348,11 @@ def launch_dlcs_excel(sim_id, silent=False, verbose=False, pbs_turb=False,
create_chunks_htc_pbs(cases, sort_by_values=sorts_on, ppn=20, create_chunks_htc_pbs(cases, sort_by_values=sorts_on, ppn=20,
nr_procs_series=3, walltime='20:00:00', nr_procs_series=3, walltime='20:00:00',
chunks_dir='zip-chunks-jess', compress=compress, chunks_dir='zip-chunks-jess', compress=compress,
queue='workq') queue='workq', wine_64bit=wine_64bit)
create_chunks_htc_pbs(cases, sort_by_values=sorts_on, ppn=12, create_chunks_htc_pbs(cases, sort_by_values=sorts_on, ppn=12,
nr_procs_series=3, walltime='20:00:00', nr_procs_series=3, walltime='20:00:00',
chunks_dir='zip-chunks-gorm', compress=compress, chunks_dir='zip-chunks-gorm', compress=compress,
queue='workq') queue='workq', wine_64bit=wine_64bit)
df = sim.Cases(cases).cases2df() df = sim.Cases(cases).cases2df()
df.to_excel(os.path.join(POST_DIR, sim_id + '.xls')) df.to_excel(os.path.join(POST_DIR, sim_id + '.xls'))
......
...@@ -37,7 +37,7 @@ from wetb.prepost.Simulations import Cases ...@@ -37,7 +37,7 @@ from wetb.prepost.Simulations import Cases
def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
nr_procs_series=9, queue='workq', pyenv='wetb_py3', nr_procs_series=9, queue='workq', pyenv='wetb_py3',
walltime='24:00:00', chunks_dir='zip-chunks-jess', walltime='24:00:00', chunks_dir='zip-chunks-jess',
compress=False): compress=False, wine_64bit=False):
"""Group a large number of simulations htc and pbs launch scripts into """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. different zip files so we can run them with find+xargs on various nodes.
""" """
...@@ -147,7 +147,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, ...@@ -147,7 +147,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
""" """
def make_pbs_chunks(df, ii, sim_id, run_dir, model_zip, compress=False): def make_pbs_chunks(df, ii, sim_id, run_dir, model_zip, compress=False,
wine_64bit=False):
"""Create a PBS that: """Create a PBS that:
* copies all required files (zip chunk) to scratch disk * copies all required files (zip chunk) to scratch disk
* copies all required turbulence files to scratch disk * copies all required turbulence files to scratch disk
...@@ -159,6 +160,10 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, ...@@ -159,6 +160,10 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
cmd_xargs = '/home/MET/sysalt/bin/xargs' cmd_xargs = '/home/MET/sysalt/bin/xargs'
jobid = '%s_chnk_%05i' % (sim_id, ii) jobid = '%s_chnk_%05i' % (sim_id, ii)
wineparam = ('win32', '~/.wine32')
if wine_64bit:
wineparam = ('win64', '~/.wine')
pbase = os.path.join('/scratch','$USER', '$PBS_JOBID', '') pbase = os.path.join('/scratch','$USER', '$PBS_JOBID', '')
post_dir_base = post_dir.split(sim_id)[1] post_dir_base = post_dir.split(sim_id)[1]
if post_dir_base[0] == os.path.sep: if post_dir_base[0] == os.path.sep:
...@@ -287,7 +292,7 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, ...@@ -287,7 +292,7 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
pbs += "echo 'current working directory:'\n" pbs += "echo 'current working directory:'\n"
pbs += 'pwd\n' pbs += 'pwd\n'
pbs += 'echo "START RUNNING JOBS IN find+xargs MODE"\n' pbs += 'echo "START RUNNING JOBS IN find+xargs MODE"\n'
pbs += 'WINEARCH=win32 WINEPREFIX=~/.wine32 winefix\n' pbs += 'WINEARCH=%s WINEPREFIX=%s winefix\n' % wineparam
pbs += '# run all the PBS *.p files in find+xargs mode\n' pbs += '# run all the PBS *.p files in find+xargs mode\n'
pbs += 'echo "following cases will be run from following path:"\n' pbs += 'echo "following cases will be run from following path:"\n'
pbs += 'echo "%s"\n' % (os.path.join(sim_id, pbs_in_base)) pbs += 'echo "%s"\n' % (os.path.join(sim_id, pbs_in_base))
...@@ -413,7 +418,7 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0, ...@@ -413,7 +418,7 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20, i0=0,
for ii, dfi in enumerate(df_iter): for ii, dfi in enumerate(df_iter):
fname, ind = make_zip_chunks(dfi, i0+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, make_pbs_chunks(dfi, i0+ii, sim_id, run_dir, model_zip,
compress=compress) compress=compress, wine_64bit=wine_64bit)
df_ind = df_ind.append(ind) df_ind = df_ind.append(ind)
print(fname) 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