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

TOPIC: Api compilation

Api compilation 4 years 5 months ago #36141

  • stefano.sarracini@libero.it
  • stefano.sarracini@libero.it's Avatar
Hello everyone,
I can't compile the Telemac API. I have the v8p1 version, with Python 2.7.5 and Numpy 1.7.1 present in the automatic installation folder of Telemac. Can someone help me? Attached is the error message and the configuration file.
Error1.png


File Attachment:

File Name: systel_v8p1_2020-06-15.cfg
File Size: 2 KB
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36144

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
As you're on v8p1 version, I think you should switch on python3
In your case, the f2py command seems to be not recognized...

Regards
Christophe
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36145

  • stefano.sarracini@libero.it
  • stefano.sarracini@libero.it's Avatar
I managed to compile correctly using version 3.6 of Python. Now I would like to run the examples defined in the TelApy manual, through the Jupyter nootebook but I can't do it, I riceived this error. Can anyone help me?


Error_2020-06-16.png
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36149

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi Could you try running the next cell.
I think the issue is with your PYTHONPATH.
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: stefano.sarracini@libero.it

Api compilation 4 years 5 months ago #36150

  • stefano.sarracini@libero.it
  • stefano.sarracini@libero.it's Avatar
Hi,
How could I fix the PYTHONPATH?
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36153

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
I would need to see what it contains first.

In a cmd could you type "echo %PYTHONPATH%" and post the result here.

It should look like what you could see in the notebook.

Here is an example of a environement file for windows:
@set HOMETEL=C:\opentelemac\trunk

@set USETELCFG=winHPC
@set SYSTELCFG=%HOMETEL%\configs\systel.edf.cfg
@set SOURCEFILE=%HOMETEL%\configs\pysource-win.bat

@set PATH=%HOMETEL%\scripts\python3;%PATH%

@set PYTHONPATH=%HOMETEL%\scripts\python3;%PYTHONPATH%
@set PYTHONPATH=%HOMETEL%\builds\%USETELCFG%\wrap_api\lib;%PYTHONPATH%

@set LD_LIBRARY_PATH=%HOMETEL%\builds\%USETELCFG%\wrap_api\lib;%LD_LIBRARY_PATH%
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 4 years 5 months ago #36156

  • stefano.sarracini@libero.it
  • stefano.sarracini@libero.it's Avatar
Hi Yugi,
Thanks for your reply, I got this.

File Attachment:

File Name: echoPYTHONPATH.txt
File Size: 0 KB


Also yesterday I made some changes trying to make the notebook examples work, and now I don't compile the Bees correctly getting this problem.

File Attachment:

File Name: ERRORE.txt
File Size: 6 KB
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36157

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
The PYTHONPATH seems ok.
How are you lauching the notebooks ? from the cmd ?
Because the Telemac Environment must be in place before running the notebooks.


It looks like they are some conflicts in your numpy installation.
Di you try unstalling it and reinstalling 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: stefano.sarracini@libero.it

Api compilation 4 years 5 months ago #36170

  • stefano.sarracini@libero.it
  • stefano.sarracini@libero.it's Avatar
Thanks Yugi,
I solved the problem by uninstalling and reinstalling python and its numpy. Now what I'm trying to do is run the optimization examples of TelApy (newop and genop) from the notebook to understand their operation and use them for the calibration of a real case modeled in Telemac 2D. I have read the documentation on the TelApy manual and some publications but I have not understood how to do it, where could I find further documentation? Now I'm running the genop example, but I don't get any results from the last 3 commands. I have not changed anything in the example and all the other commands work without errors.

Genop_exemple.png
The administrator has disabled public write access.

Api compilation 4 years 5 months ago #36174

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Happy to hear that you managed to get it working.

Could you try running the example directly in Python (Copy all the code into a python script or you should be able to do save the notebook as a Python script then do some cleanup to remove ipython).
There is some random known issue with notebooks and genop.


As for more information on genop you can post your questions here and we will try to answer them.
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.