Welcome, Guest
Username: Password: Remember me

TOPIC: Python API installation

Python API installation 3 years 7 months ago #38262

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Can you post the value of PYTHONPATH as well
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.

Python API installation 3 years 7 months ago #38263

  • jprivers
  • jprivers's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
There is my PYTHONPATH : C:\TELEMAC\V8P2R0\builds\wingfors\wrap_api\lib
The administrator has disabled public write access.

Python API installation 3 years 7 months ago #38264

  • Jose_filho
  • Jose_filho's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 42
  • Thank you received: 2
Hi Yugi,
Thank you for answering. I have applied what you recommended, but the error persists.
Attached the config and error. It is strange because I looked for python38.dll (which is supposed to be missing) in my anaconda directory and its there. Do you have any more thoughts?

Best,

File Attachment:

File Name: systel_v8p2r0_2021-04-15.cfg
File Size: 2 KB


File Attachment:

File Name: error_2.txt
File Size: 7 KB
The administrator has disabled public write access.

Python API installation 3 years 7 months ago #38266

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
@jprivers and LD_LIBRARY_PATH ?

@jose_filho I think you are having the classical issue with Anaconda. Anaconda is using his own fortran compiler. Or for the api to work numpy must be using the same compiler as the one used to compile telemac. You can find example of that kind of configuration on the forum. You can verify that by running: f2py -c --help-fcompiler. Also to be sure can you post the error (your file does not contain the error message)
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.

Python API installation 3 years 7 months ago #38267

  • Jose_filho
  • Jose_filho's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 42
  • Thank you received: 2
Hi Yugi and others,
I finally get 'my work is done' under this systel config. I uninstalled all my anaconda directories and compiled only using python from windows as administrator i order to avoid compiler conflicts. I also changed sfx_lib to 'dll' and it seems to work now as dynamic api. I will test TelemacFile.py in order to check that.

Best regards,

File Attachment:

File Name: systel_v8p2r0_2021-04-17.cfg
File Size: 2 KB
The administrator has disabled public write access.

Python API installation 3 years 7 months ago #38268

  • Jose_filho
  • Jose_filho's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 42
  • Thank you received: 2
Well, that's strange because I still cannot use TelemacFile.py. It is giving the same classic error: unable to load the dynamic library _hermes.dll.
I already added it to my PYTHONPATH, but the error persists.
Take a look of my ...\builds\win10gfors\wrap_api\lib:

File Attachment:

File Name: dir_content.txt
File Size: 3 KB


best,
The administrator has disabled public write access.

Python API installation 3 years 7 months ago #38269

  • jprivers
  • jprivers's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
I get nothing when I echo LD_LIBRARY_PATH yugi.
The administrator has disabled public write access.

Python API installation 2 years 9 months ago #39837

  • lzmoura
  • lzmoura's Avatar
Hello everyone. I am trying to compile TELEMAC v8p2 on a Ubuntu 20.04.

The final step of api compilation fails. Can anyone tell what may be the problem? I am adding the systel and pysource files.

Here is the message:


Building the Python API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~> Wrap_api built
~> Compiling Modules api
~> First part of f2py for api passed
Traceback (most recent call last):
File "/home/leo/telemac/v8p2/scripts/python3/compilation/compil_tools.py", line 974, in compile_api_f2py
output = check_output(cmd, shell=True, stderr=STDOUT)
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'f2py --quiet -c /home/leo/telemac/v8p2/builds/debgfopenmpidyn/wrap_api/lib/api.pyf --fcompiler=gnu95 --opt="" -I/home/leo/telemac/v8p2/builds/debgfopenmpidyn/wrap_api/include -L/home/leo/telemac/v8p2/builds/debgfopenmpidyn/wrap_api/lib -lapi -ltelemac3d4api -ltelemac2d4api -lsisyphe4api -lgaia4api -lnestor4api -ltomawac4api -lartemis4api -lkhione4api -lwaqtel4api -lgretel4api -lpartel4api -lbief4api -lparallel4api -lhermes4api -ldamocles4api -lspecial4api -lmascaret /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.40.20.3 /home/leo/telemac/v8p2/optionals/metis-5.1.0/build/lib/libmetis.a /home/leo/telemac/v8p2/optionals/hdf5/lib/libhdf5.so --build-dir tmp_f2py' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "compile_telemac.py", line 143, in <module>
main()
File "compile_telemac.py", line 134, in main
compile_api_files(silent=not options.verbose,
File "/home/leo/telemac/v8p2/scripts/python3/compilation/compil_tools.py", line 1028, in compile_api_files
compile_api_f2py('api', api_dir, source_api, skip_source, ld_flags,
File "/home/leo/telemac/v8p2/scripts/python3/compilation/compil_tools.py", line 976, in compile_api_f2py
raise TelemacException(\
utils.exceptions.TelemacException: Error during second part of f2py for api 1
analyzevars: charselector={'len': '200'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '200'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '200'} unhandled.analyzevars: charselector={'len': '200'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '200'} unhandled.analyzevars: charselector={'len': '32'} unhandled.analyzevars: charselector={'len': '40'} unhandled.analyzevars: charselector={'len': '200'} unhandled.getstrlength:intent(hide): expected a string with defined length but got: {'attrspec': [], 'intent': , 'typespec': 'character', 'charselector': {'*': '(*)'}}
getstrlength:intent(hide): expected a string with defined length but got: {'attrspec': [], 'intent': , 'typespec': 'character', 'charselector': {'*': '(*)'}}
getstrlength:intent(hide): expected a string with defined length but got: {'attrspec': [], 'intent': , 'typespec': 'character', 'charselector': {'*': '(*)'}}
error: unknown file type '.3' (from '/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.40.20.3')
Attachments:
The administrator has disabled public write access.

Python API installation 2 years 9 months ago #39839

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 157
  • Thank you received: 39
Instead of linking : "/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.40.20.3" in your libs_all, you could try to remove ".40.20.3".

You libs_all line would look like :
libs_all:    /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so /home/leo/telemac/v8p2/optionals/metis-5.1.0/build/lib/libmetis.a /home/leo/telemac/v8p2/optionals/hdf5/lib/libhdf5.so
The administrator has disabled public write access.
Moderators: borisb

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