[fix #1029] Add check for user dico in TelemacCas
Add a new method to check for user specified dictionary in CAS file. It prevents a TelemacException during computation initialisation caused by a keyword check against default dictionnary instead of user specified one.
Before
[...]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... processing the steering file
~> Checking keyword/rubrique coherence
Traceback (most recent call last):
File "/opt/telemac-mascaret/v8p4r1/scripts/python3/telemac2d.py", line 7, in <module>
main('telemac2d')
File "/slurm/opt/telemac-mascaret/v8p4r1/scripts/python3/runcode.py", line 288, in main
run_study(cas_file, code_name, options)
File "/slurm/opt/telemac-mascaret/v8p4r1/scripts/python3/execution/run_cas.py", line 163, in run_study
my_study = Study(
File "/slurm/opt/telemac-mascaret/v8p4r1/scripts/python3/execution/study.py", line 130, in __init__
self.cas = TelemacCas(self.steering_file, self.dico_file)
File "/slurm/opt/telemac-mascaret/v8p4r1/scripts/python3/execution/telemac_cas.py", line 110, in __init__
self._check_content()
File "/slurm/opt/telemac-mascaret/v8p4r1/scripts/python3/execution/telemac_cas.py", line 268, in _check_content
raise TelemacException(
utils.exceptions.TelemacException: Unknown keyword NUMBER OF BRIDGES in steering file T2D_steering.cas
After
[...]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... processing the steering file
~> Checking keyword/rubrique coherence
~> User dictionary detected
~> Checking keyword/rubrique coherence
... checking parallelisation
... handling temporary directories
copying: T2D_steering.cas -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DCAS
copying: telemac2d_mod.dico -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DDICO
copying: bridges.i2s -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/BRILOC
copying: bridges_cut.i2s -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/BRISEC
copying: Mesh.slf -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DGEO
copying: BC.cli -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DCLI
copying: fluxlines.txt -> /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DFLX
ignoring: telemac2d_mod.dico /slurm/projects/TELEMAC/22RED008/T2D_BridgeModule-main/examples/example1/T2D_steering.cas_2024-06-28-10h59min36s/T2DDICO
... checking the executable
> compiling objs
compiling: a0_bief_def.f ... completed
compiling: a1_declarations_telemac2d.f ... completed
compiling: a2_interface_telemac2d.f ... completed
compiling: a3_lecdon_telemac2d.f ... completed
compiling: a4_telemac2d_init.F ... completed
compiling: a5_deall_telemac2d.f ... completed
compiling: bbuilder.f ... completed
compiling: flusec_t2d.f ... completed
compiling: prosou.f ... completed
created: out_user_fortran
Running your simulation(s) :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
Edited by Nicolas Godet