Welcome, Guest
Username: Password: Remember me

TOPIC: Error in partitioning step when running a case [python3-trunk]

Error in partitioning step when running a case [python3-trunk] 5 years 7 months ago #33400

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello all,
Following my exploits with the python3 scripts, I get the following error when trying to run any case (here thw tomawac example turning wind):
The system cannot find the file specified.


Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                _                                                        _       _               
               | |                                                      (_)     (_)              
  _   _  _ __  | | __ _ __    ___  __      __ _ __    _ __   ___ __   __ _  ___  _   ___   _ __  
 | | | || '_ \ | |/ /| '_ \  / _ \ \ \ /\ / /| '_ \  | '__| / _ \\ \ / /| |/ __|| | / _ \ | '_ \ 
 | |_| || | | ||   < | | | || (_) | \ V  V / | | | | | |   |  __/ \ V / | |\__ \| || (_) || | | |
  \__,_||_| |_||_|\_\|_| |_| \___/   \_/\_/  |_| |_| |_|    \___|  \_/  |_||___/|_| \___/ |_| |_|
                                                                                                 
                                                                                                 


Running your CAS file(s) for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gfmsmpi: 
    
    +> root:    \\hydra\opentelemac\trunk
    +> module: ad / api / artemis / bief
               damocles  / diffsel  / gaia  / gretel
               hermes  / identify_liq_bnd  / khione  / mascaret
               nestor  / parallel  / partel  / postel3d
               sisyphe  / special  / splitsel  / stbtel
               telemac2d  / telemac3d  / tomawac  / waqtel
               


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


... processing the steering file

... checking parallelisation

... handling temporary directories
         copying: tom_turning_wind.cas -> O:\trunk\examples\tomawac\turning_wind\tom_turning_wind.cas_2019-04-08-11h16min06s\WACCAS
         copying: tomawac.dico -> O:\trunk\examples\tomawac\turning_wind\tom_turning_wind.cas_2019-04-08-11h16min06s\WACDICO
         copying: geo_TW.slf -> O:\trunk\examples\tomawac\turning_wind\tom_turning_wind.cas_2019-04-08-11h16min06s\WACGEO
         copying: geo_TW.cli -> O:\trunk\examples\tomawac\turning_wind\tom_turning_wind.cas_2019-04-08-11h16min06s\WACCLI
         copying: wind.slf -> O:\trunk\examples\tomawac\turning_wind\tom_turning_wind.cas_2019-04-08-11h16min06s\WACVEB

... partitioning base files (geo, conlim, sections, zones and weirs)
     +> \\hydra\opentelemac\trunk\builds\gfmsmpi\bin\partel.exe < PARTEL.PAR >> partel_WACGEO.log
Traceback (most recent call last):
  File "\\hydra\opentelemac\trunk\scripts\python3\tomawac.py", line 7, in <module>
    main('tomawac')
  File "\\hydra\opentelemac\trunk\scripts\python3\runcode.py", line 275, in main
    run_study(cas_file, code_name, options)
  File "\\hydra\opentelemac\trunk\scripts\python3\execution\run_cas.py", line 140, in run_study
    run_local_cas(my_study, options)
  File "\\hydra\opentelemac\trunk\scripts\python3\execution\run_cas.py", line 31, in run_local_cas
    my_study.partionning(options.use_link)
  File "\\hydra\opentelemac\trunk\scripts\python3\execution\study.py", line 355, in partionning
    use_link, i_part, s_concat)
  File "\\hydra\opentelemac\trunk\scripts\python3\execution\run.py", line 55, in run_partition
    concat)
  File "\\hydra\opentelemac\trunk\scripts\python3\execution\run.py", line 135, in run_partel
    +'\n'.join(get_file_content('partel_'+par_file+'.log'))
  File "\\hydra\opentelemac\trunk\scripts\python3\utils\files.py", line 152, in get_file_content
    src_file = codecs.open(fle, 'r', encoding='utf-8')
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\codecs.py", line 898, in open
    file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'partel_WACGEO.log'

My troubleshooting showed that in 'run.py\run_partel' the command
tail, code = mes.run_cmd(par, bypass)
returns
code=1
but in the following exception step
if code != 0:
            raise TelemacException(\
                     'Could not split your file '+par_file\
                     +' with the error as follows:'\
                     +'\n        '+tail\
                     +'\n\nHere is the log:\n'\
                     +'\n'.join(get_file_content('partel_'+par_file+'.log'))
                                  )
there is no partel_log file to append to the error log.
Any insight would be appreciated.
I am running python 3.7.1.

Regards,
Costas

PS. Line 135 in run.py:
+'\n'.join(get_file_content('partel_'+par_file+'.log'))
would be cleaner replaced with variable partel_log already defined such as:
+'\n'.join(get_file_content(partel_log))
The administrator has disabled public write access.

Error in partitioning step when running a case [python3-trunk] 5 years 7 months ago #33404

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi,

You need to update you configuration file.
in par_cmd replace PARTEL.PAR by <partel.par>
This is somthing that changed in python3.

That should solve the problem.

I will also update the error handling so that it does not crash if the file is not there.

Hope it helps
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: cyamin

Error in partitioning step when running a case [python3-trunk] 5 years 7 months ago #33405

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Aaah, you're right... Now it works.
It also appears that omitting the 'par_cmd' completely, also works. So, what is the purpose of it being in the configuration file?
Costas
The administrator has disabled public write access.

Error in partitioning step when running a case [python3-trunk] 5 years 7 months ago #33407

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Because on some cluster you need to modify the command.
It is just that on your configuration the default one is the right one.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.