Welcome, Guest
Username: Password: Remember me

TOPIC: API compilation in vp2r0

API compilation in vp2r0 3 years 10 months ago #37542

  • mark689
  • mark689's Avatar
Hello all,

I have previously compiled the linux version with no problems. However, now I need to add the api files (options: api) to get the python modules.

After making the necessary changes to systel.cfg and recompiling again, I'm getting the following error:
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': ['out'], 'typespec': 'character', 'charselector': {'*': '(*)'}}
getstrlength:intent(hide): expected a string with defined length but got: {'attrspec': [], 'intent': ['out'], 'typespec': 'character', 'charselector': {'*': '(*)'}}
getstrlength:intent(hide): expected a string with defined length but got: {'attrspec': [], 'intent': ['out'], 'typespec': 'character', 'charselector': {'*': '(*)'}}
Unknown vendor: "gfortran"

I have checked and I have gfortran properly installed. I'm using python 3.8.5 on Anaconda 4.9.2.

I have tried running the compilation again with the `clean` option; everything seems to be ok except for the last part where it gives the same error above.

I have attached the configuration file and the full error message below.

thanks in advance.

File Attachment:

File Name: systel_2021-01-06.cfg
File Size: 2 KB


File Attachment:

File Name: full_error_message_2021-01-06.txt
File Size: 10 KB
The administrator has disabled public write access.

API compilation in vp2r0 3 years 10 months ago #37552

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

You are missing the option -fPIC in cmd_obj.
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.

API compilation in vp2r0 3 years 10 months ago #37560

  • mark689
  • mark689's Avatar
Hi,

Thanks for the reply. I tried adding '-fPIC' but it seems that the issue is not resolved. I'm getting the following error message:
subprocess.CalledProcessError: Command 'f2py3 --quiet -c /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/wrap_api/lib/api.pyf --fcompiler=gfortran  --opt="" -I/home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/wrap_api/include  /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libapi.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libtelemac3d4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libtelemac2d4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libsisyphe4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libgaia4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libnestor4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libtomawac4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libartemis4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libkhione4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libwaqtel4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libgretel4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libpartel4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libbief4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libparallel4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libhermes4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libdamocles4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libspecial4api.a /home/masterccce/telemac/v8p2r0/builds/sl6gfortrans/lib/libmascaret.a  --build-dir tmp_f2py' returned non-zero exit status 1.
After running the above command on my own. I'm getting the following error message:
Unknown vendor: "gfortran"

File Attachment:

File Name: full_error_message_2021-01-07.txt
File Size: 5 KB
The administrator has disabled public write access.

API compilation in vp2r0 3 years 10 months ago #37561

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
The real error is the .txt file.
tmp_f2py/src.linux-x86_64-3.6/lib/_apimodule.c:17:10: fatal error: Python.h: Aucun fichier ou dossier de ce type
 #include "Python.h"
          ^~~~~~~~~~

The unknown vendor can be removed if you replace:
pyd_fcompiler: gfortran
by
pyd_fcompiler: gnu95

Also replace
options: api
by
options: api static

As you are using static libraries
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: mark689

API compilation in vp2r0 3 years 10 months ago #37563

  • mark689
  • mark689's Avatar
Thanks. This seems to have fixed the issue. It seems that python3-dev wasn't installed properly.
The administrator has disabled public write access.
Moderators: borisb

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