Somewhere in a PBSFile, the paths are being switched to lower case
The code below results in pbs files trying to copy data/dtu_10mw_rwt_shaft_st.dat
instead of data/DTU_10MW_RWT_Shaft_st.dat
. Naturally, this dies on the cluster.
cc @mmpe
def make_pbs(queue='windq', ind_walltime=40, all_walltime=120,
nnodes=10, resim=False, htc_dir='htc'):
"""make the pbs files and multirunner to be launched on the cluster
resim : whether to resimulate files that have non-empty res files
"""
# hard-coded hawc2 configurations
version = "v12.8.0.0"
platform = "win32"
hawc2_path="/mnt/aiolos/groups/hawc2sim/HAWC2/%s/%s/" % (version, platform)
hawc2_cmd = wine_cmd(platform='win32', hawc2='hawc2mb.exe', cluster='jess')
# intermediate variables
workdir = os.getcwd()
# get list of htc files
print('Generating list of htc files...')
htc_lst = []
for root, dirs, files in os.walk(htc_dir):
for file in files:
if '_master' in file: # skip master htcs if here
continue
if file.endswith('.htc'):
respath = os.path.join(root.replace('/htc/', '/res/'),
file.replace('.htc', '.dat'))
if os.path.exists(respath): # if the res file exists
if (not os.stat(respath).st_size) and (not resim):
# skip if res file is non empty and not resimulating
continue
htc = HTCFile(os.path.join(root, file))
htc_lst.append(htc)
# make pbs files
print(f'Making {len(htc_lst)} pbs files...')
pbs_lst = []
for htc in htc_lst:
pbs = htc.pbs_file(hawc2_path, hawc2_cmd,
queue=queue, # workq, windq, xpresq
walltime=ind_walltime*60, # individual wall time in seconds
input_files=None, # If none, required files are autodetected from htc file
output_files=None, # If none, output files are autodetected from htc file
copy_turb=(False, False) # copy turbulence files (to, from) simulation
)
pbs.save()
os.chmod(pbs.filename, 0o774) # redo permisions
pbs_lst.append(pbs)