Welcome, Guest
Username: Password: Remember me

TOPIC: Keeping the "print log" of telemac's runs

Keeping the "print log" of telemac's runs 7 years 11 months ago #24456

  • josekdiaz
  • josekdiaz's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 48
Dear Forum,

Recently I've been working with some python scripts for telemac post-processing, and in that process I want to code a simple script to organize, store, and plot some metadata (to share in technical reports and coworkers) based on telemac's log that is printed in the terminal.

1) is there a way to store the log after each run?

In the temp folder created by telemac seems to be a log for each worker in a parallel run, I want the one that is printed in the terminal without any os-dependent commands (e.g. cat or bash syntax in Linux).

2) AFAIK in the future release there will be some major changes to the python scripts to create a consistent python API for telemac, is this true?

or maybe I got too excited and misunderstood the notes in the trunk...

3)Are there any plans to include an API wrapper for the run scripts that could make possible to access variables in "real-time execution" to live plot e.g. private variables or something like CFL, iteration, residuals? If this is in a near feature, using that API would be more efficient and interesting than parsing a TXT file!

Ahead in this road, I also want to create something like VIDEO :pyfoam's live residual plots with some tuning for our personal needs, and definitly want to make use of every bundled tool at my disposal!

Thank you!

regards,

José D.
The administrator has disabled public write access.

Keeping the "print log" of telemac's runs 7 years 11 months ago #24480

  • riadh
  • riadh's Avatar
Hello José

You can run telemac like

telemac.py cas.cas > log.dat

This will write the log in log.dat file

Otherwise you can write


telemac.py cas.cas |tee log.dat

This will let you see the log in the screen and write it in log.dat

These commands are for linux, I don't know if they work for windows or not

2- yes this will exciting release for python API

I hope that this helps

with my kind regards

Riadh
The administrator has disabled public write access.

Keeping the "print log" of telemac's runs 7 years 11 months ago #24481

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

1) You can also use the options -s that will do the same

2-3) That will be in the next release v7p2 that should be out before the end of the year.

Hope it helps
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.

Keeping the "print log" of telemac's runs 7 years 11 months ago #24482

  • josekdiaz
  • josekdiaz's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 48
Dear Yoann & Riadh,

Thank you so much for both answers! I'll look how to use the "-s" option for the next run as some coworkers don't use Linux as their primary OS.

...And the hype was real! Definitely will keep an eye for the next release!

Thank you for your hard work!,

José D.
The administrator has disabled public write access.

Keeping the "print log" of telemac's runs 7 years 2 months ago #27763

  • Vittel
  • Vittel's Avatar
Dear all


I have 2 questions too:
1. Can a store the file as log.dat after a computation is ending?
2. If I start the run with telemac3d.py test.cas >log.dat, can I open the log.dat between the computation?

Best regards
Katja
The administrator has disabled public write access.

Keeping the "print log" of telemac's runs 7 years 2 months ago #27766

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
The option -s exist for such use.
this allow you to keep the log file which appear on screen in a text file.
You could also open it during the simulation (without any modification of course)

Regards
Christophe
The administrator has disabled public write access.
Moderators: pham

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