Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Compile not working with Python3

Compile not working with Python3 3 years 11 months ago #37368

  • sheyuntong
  • sheyuntong's Avatar
I was able to successfully compile Telemac with the python27 script. I just downloaded the new release v8p2 and it doesn't have python27 script anymore. I couldn't get the compile to work with python3. It gives the following error message. Can anyone help me? Thanks!

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

Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p0\scripts\python3\configuration\cfg.py", line 35, in read_cfg
cfgfile.read(self.cfg_file, encoding='utf-8')
File "C:\opentelemac-mascaret\Python39\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "C:\opentelemac-mascaret\Python39\lib\configparser.py", line 1093, in _read
raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from 'C:\\opentelemac-mascaret\\v8p0\\configs\\systel_v8p0.cfg ' [line 25]: option 'modules' in section 'general' already exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p0\scripts\python3\compile_telemac.py", line 138, in <module>
main()
File "C:\opentelemac-mascaret\v8p0\scripts\python3\compile_telemac.py", line 89, in main
update_config(options)
File "C:\opentelemac-mascaret\v8p0\scripts\python3\config.py", line 77, in update_config
CFGS.parse_cfg_file(cfg_file, cfg_name, root_dir, python_dir)
File "C:\opentelemac-mascaret\v8p0\scripts\python3\configuration\cfg.py", line 104, in parse_cfg_file
self.read_cfg()
File "C:\opentelemac-mascaret\v8p0\scripts\python3\configuration\cfg.py", line 37, in read_cfg
raise TelemacException(
utils.exceptions.TelemacException: Error while reading C:\opentelemac-mascaret\v8p0\configs\systel_v8p0.cfg While reading from 'C:\\opentelemac-mascaret\\v8p0\\configs\\systel_v8p0.cfg ' [line 25]: option 'modules' in section 'general' already exists
The administrator has disabled public write access.

Compile not working with Python3 3 years 11 months ago #37370

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

There is an issue with your systel.cfg.
from the error message:
modules is declared twice in the general section
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.

Compile not working with Python3 3 years 11 months ago #37408

  • sheyuntong
  • sheyuntong's Avatar
Thanks Yugi! You are right. I had a duplicate line in the cfg file.
I am able to compile the code now, but only after I add the following line:

modules: system -mascaret

Otherwise, the compiler says it cannot find adstack. I am not using mascaret at the moment so it is fine for now. But just wondering if there is a solution to keep mascaret.
The administrator has disabled public write access.

Compile not working with Python3 3 years 10 months ago #37499

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

Could you post the error message ?
And/Or your systel.cfg file ?
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.

Compile not working with Python3 3 years 10 months ago #37510

  • sheyuntong
  • sheyuntong's Avatar
Thanks Yugi. Please see the config file attached. The error message shows up at the end of the compilation, see below.

- completed: ...\v8p2\sources\mascaret\API\f90\pretrait_interface.f90
- completed: ...\v8p2\sources\mascaret\API\f90\mascaret_interface.f90
The system cannot find the file specified.
Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 1296, in compile_cmdf
compile_mascaret_dependencies(rebuild, homeres)
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 103, in compile_mascaret_dependencies
raise TelemacException(\
utils.exceptions.TelemacException: Could not compile your file adstack
Attachments:
The administrator has disabled public write access.

Compile not working with Python3 3 years 10 months ago #37514

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

Can you try running compile_telemac.py --verbose ?
Also check that the file does exist it sould be in sources/mascaret/Deriv/adstack.c
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.

Compile not working with Python3 3 years 10 months ago #37523

  • sheyuntong
  • sheyuntong's Avatar
Hi Yugi,

I have checked that I do have the adstack.c file in sources/mascaret/Deriv/.
Running compile_telemac.py --verbose gives the same error message.

The system cannot find the file specified.
Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 143, in <module>
main()
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 129, in main
compile_cmdf(options.ncsize, modules, options.verbose)
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 1296, in compile_cmdf
compile_mascaret_dependencies(rebuild, homeres)
File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 103, in compile_mascaret_dependencies
raise TelemacException(\
utils.exceptions.TelemacException: Could not compile your file adstack
The administrator has disabled public write access.

Compile not working with Python3 3 years 10 months ago #37524

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
the verbose option should display the command it is trying to run (before the error) I just am not sure i coded it for the c compilation part is it the case ?
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.

Compile not working with Python3 3 years 10 months ago #37540

  • sheyuntong
  • sheyuntong's Avatar
Oh sorry. Here it is.
Attachments:
The administrator has disabled public write access.

Compile not working with Python3 3 years 10 months ago #37555

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Ok so as I though the print is missing for the c compilation.

Can you replace the file in scripts/python3/compilation by the one attached here ? and rerun compile_telemac.py --verbose and post the log here.
Attachments:
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.
  • Page:
  • 1
  • 2
Moderators: borisb

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