Running multiple cas in same runcode.py command fails
Executed command: telemac3d.py --ncsize=32 3D_EA_SC4_SPA.cas 3D_EP_SC4_SPA.cas
on HPC config
utils.exceptions.TelemacException: Could not find your steering file :
3D_EP_SC4_SPA.cas
To debug, I add print(getcwd())
in this loop
https://gitlab.pam-retd.fr/otm/telemac-mascaret/-/blob/main/scripts/python3/runcode.py?ref_type=heads#L286-288
# ~~~~ Run the Code from the CAS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for cas_file in cas_files:
run_study(cas_file, code_name, options)
And here is the output:
$ telemac3d.py --ncsize=32 3D_EA_SC4_SPA.cas 3D_EP_SC4_SPA.cas
Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
___ _ _ ___
/ _ \ | || | / _ \
__ __| (_) | _ __ | || |_ _ __ | | | |
\ \ / / > _ < | '_ \ |__ _|| '__|| | | |
\ V / | (_) || |_) | | | | | | |_| |
\_/ \___/ | .__/ |_| |_| \___/
| |
|_|
Running your CAS file(s) for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
isl.cluster:
+> GNU Fortran Open MPI optimized build for ISL cluster
+> root: /opt/telemac-mascaret/v8p4r0
+> module: ad / api / artemis / bief
damocles / gaia / gretel / hermes
identify_liq_bnd / khione / mascaret / nestor
parallel / partel / postel3d / sisyphe
special / stbtel / telemac2d / telemac3d
tomawac / waqtel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/slurm/compute_home/godet/test
... processing the steering file
~> Checking keyword/rubrique coherence
... checking parallelisation
Submitted batch job 2229
... Your simulation (3D_EA_SC4_SPA.cas) has been launched through the queue.
+> You need to wait for completion before checking on results.
/slurm/compute_home/godet/test/3D_EA_SC4_SPA.cas_2023-11-20-19h02min26s
... processing the steering file
Traceback (most recent call last):
File "/opt/telemac-mascaret/v8p4r0/scripts/python3/telemac3d.py", line 7, in <module>
main('telemac3d')
File "/slurm/opt/telemac-mascaret/v8p4r0/scripts/python3/runcode.py", line 289, in main
run_study(cas_file, code_name, options)
File "/slurm/opt/telemac-mascaret/v8p4r0/scripts/python3/execution/run_cas.py", line 163, in run_study
my_study = Study(
File "/slurm/opt/telemac-mascaret/v8p4r0/scripts/python3/execution/study.py", line 57, in __init__
raise TelemacException(
utils.exceptions.TelemacException: Could not find your steering file :
3D_EP_SC4_SPA.cas
Before processing second cas file, current working dir is not /slurm/compute_home/godet/test
but /slurm/compute_home/godet/test/3D_EA_SC4_SPA.cas_2023-11-20-19h02min26s
With my HPC config, adding pwd = getcwd()
at beginning of run_hpc_full
in study.py and chdir(pwd)
at then end solved the issue.