Welcome, Guest
Username: Password: Remember me

TOPIC: converter.py error running stbtel [python3-trunk]

converter.py error running stbtel [python3-trunk] 5 years 7 months ago #33452

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello,
I am having problem trying to refine a mesh using converter.py.
The command issued is:
converter.py refine geo_in.slf geo_out.slf -b geo_in.cli -r \\hydra\opentelemac\trunk
First error encountered is:
Traceback (most recent call last):
  File "\\hydra\opentelemac\trunk\scripts\python3\converter.py", line 148, in <module>
    main()
  File "\\hydra\opentelemac\trunk\scripts\python3\converter.py", line 137, in main
    options.bnd_file)
  File "\\hydra\opentelemac\trunk\scripts\python3\formats\stbtel_refine.py", line 77, in run_refine
    code = sp.call(stbtel_args)
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 317, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 1172, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
I changed line 72 in 'stbtel_refine.py' to:
stbtel_args = [sys.executable, path_stbtel, cas_name]
Now the error becomes:
Traceback (most recent call last):
  File "\\hydra\opentelemac\trunk\scripts\python3\stbtel.py", line 7, in <module>
    main('stbtel')
  File "\\hydra\opentelemac\trunk\scripts\python3\runcode.py", line 219, in main
    update_config(options)
  File "\\hydra\opentelemac\trunk\scripts\python3\config.py", line 77, in update_config
    CFGS.parse_cfg_file(cfg_file, cfg_name, root_dir, python_dir)
  File "\\hydra\opentelemac\trunk\scripts\python3\configuration\cfg.py", line 99, in parse_cfg_file
    raise TelemacException('Could not find {}'.format(cfg_file))
utils.exceptions.TelemacException: Could not find \\hydra\opentelemac\configs\systel.cfg
Which is totally correct because there isn't such a file there (notice that 'trunk' is missing from the path) nor in my configs folder. If I put a systel.cfg where the code looks for, STBTEL runs but gives this error:
LIT : ABNORMAL END OF FILE
 ONE INTENDED TO READ
 A RECORD OF      2 VALUES
 OF TYPE : I
 ON LOGICAL UNIT :      1

 PLANTE: PROGRAM STOPPED AFTER AN ERROR
 RETURNING EXIT CODE:            2
Any suggestions?
Costas
The administrator has disabled public write access.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33509

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

I think I see the issue there.
That script assumes the following:
- The environement variable SYSTELCFG and USETELCFG are set
- That you can run a script just with its name (i.e. stbtel.py stb.cas works anywhere).

The second point was your first error.
And the first one your second error.

Here is the environment script I use it might solve that.
@set HOMETEL=C:\opentelemac-mascaret\trunk

@set PATH=C:\ProgramData\Anaconda3;%PATH%
@set PATH=C:\ProgramData\Anaconda3\Library\bin;%PATH%

@set PATH=%HOMETEL%\scripts\python3;%PATH%
@set USETELCFG=winHPC
@set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
@set SOURCEFILE=%HOMETEL%\configs\pysource-win.bat
@set PYTHONPATH=%HOMETEL%\scripts\python3;%PYTHONPATH%
@set PYTHONPATH=%HOMETEL%\builds\%USETELCFG%\wrap_api\lib;%PYTHONPATH%
@rem This is to have Canopy working properly problem between wxpython and mayavi
@set ETS_TOOLKIT=qt4

I will make modifications to the scripts later so that it has the same behavior.
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.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33519

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello,
The first two issues I can understand and work around them (and more appropriately with your environmental script). However, I can't understand the last error with STBTEL.
LIT : ABNORMAL END OF FILE
 ONE INTENDED TO READ
 A RECORD OF      2 VALUES
 OF TYPE : I
 ON LOGICAL UNIT :      1

 PLANTE: PROGRAM STOPPED AFTER AN ERROR
 RETURNING EXIT CODE:            2
This error keeps repeating even with geometries from examples. For example the 'port' case from ARTEMIS. I created manually this cas file:
/
/ REFINEMENT OF MESH FILE USING STBTEL
/
/
/ INPUT FILE INFORMATION
/
UNIVERSAL FILE : 'geo_delft-harbour.slf'
BOUNDARY UNIVERSAL FILE : 'geo_delft-harbour.cli'
/
MESH GENERATOR : 'SELAFIN'
CUTTING ELEMENTS IN FOUR : YES
/
/ OUTPUT FILE INFORMATION
/
GEOMETRY FILE FOR TELEMAC : 'geo_delft-harbour_2.slf'
BOUNDARY CONDITIONS FILE : 'geo_delft-harbour_2.cli'
The error is the same.
Best Regards,
Costas
The administrator has disabled public write access.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33520

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
This is weird.
This could be an problem with big and little endian.
It is handled in the rest of telemac by hermes but stbtel is still is not using hermes for that part.
Do you force endianess in your configuration ?
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.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33521

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I don't think so. I compiled a scalar version just for STBTEL using:
cmd_obj:    x86_64-w64-mingw32-gfortran -cpp -march=native -O3 -c -fno-range-check -ffixed-line-length-132 -finit-real=nan -frecord-marker=4 <mods> <incs> <f95name>
cmd_exe:    x86_64-w64-mingw32-gfortran -static -march=native -O3 -fno-range-check -ffixed-line-length-132 -finit-real=nan -frecord-marker=4 -v -o <exename> <objs> -Xlinker --start-group <libs>
The administrator has disabled public write access.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33522

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Try adding -fconvert=big-endian to both and recompile with --clean.
Hopefully that will solve it.
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

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33523

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
'-fconvert=big-endian' did solve the issue. I assume that this flag is not required for the rest of the modules, just STBTEL, right?
The administrator has disabled public write access.

converter.py error running stbtel [python3-trunk] 5 years 6 months ago #33524

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
It was in the previous version.
Now hermes detect endianess.
However this is necessary to fix outputs endian behaviour.
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.