Welcome, Guest
Username: Password: Remember me

TOPIC: Management of different version

Management of different version 9 years 10 months ago #15543

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi,

I have a question regarding the management of different version (through different configuartion name of Telemac). This question is related to both windows and linux configuration compiled and executed with Python.

I found it easy to compile the sources since python is used. I have different configuration on my computer :
- v6p1 with g95
- v6p1 with gfortran
- v6p2 with gfortran
- v6p3 with gfortran
- v7p0 with gfortran

I have just one config.cfg file pointed by the SYSTELCFG environment variable... and so far i just add the suffix -c <configname> when i run a case in order to chose the version of telemac I want to run.

I have just a doubt about the version I'm using because of the PATH environment variable.

I do not add for each version the new PATH to the directory PYTEL (for v6p1 and v6p2) and SCRIPTS/PYTHON27 (for v6p3 and v7p0).

So my question is :
-assuming that PATH only refer to opentelemac/v6p2/pytel, if I execute telemac2d.py -c gforv6p3 -s test.cas, do I use v6p3 or v6p2...
How to be sure which version is used ?

Thanks in advance,
The administrator has disabled public write access.

Management of different version 9 years 10 months ago #15544

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
The version is printed in the head of the listing file.
For the other point, it seems to me that python scripts are not linked to version. So i suppose that the -c option allow you to run the version you want

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: abernard

Management of different version 9 years 10 months ago #15553

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Great, Thank you,

I was not sure that the version printed in the head of listing was read in the steering file or in the systel.cfg or if it was a kind of signature of the execution.

v6p1 and v6p2 on one side and v6p3 and v7p0 on the other side do not have exactly the same structure.
As I can't have two different PATH related to the directory of XXX.py :
  • if PATH is v6p2 or v6p1/pytel ...telemac2d.py -c gforv6p3 returns...
    The code requested is not installed on this system : telemac2d
  • if PATH points to v6p3/scripts/python27 ... telemac2d.py -c gforv6p2 returns ...
    I could not locate the source code in C:\opentelemac\v6p1\sources

    Either the root key in your cfg file is not valid, or you are using a past version of the system.

Anyway...it's not a big deal, I just have to write the full path to telemac2d.py in the command.

I guess, "python scripts are not linked to version" is true for v6p1 and V6p2 one one side and v6p3-v7p0 on the other.
The administrator has disabled public write access.

Management of different version 9 years 10 months ago #15560

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hello,

maybe this can be for your convenience and is quicker than dealing always with the command prompt in windows when launching a simulation. You can create a batch file with directing to a configuration (-c) or even to a specific configuration file (-f). So you don't need any path variables at all. Write it in a text file and save as a batch file somewhere. Example:
________________________________________________
cmd /k python C:\Opentelemac\v6p3r2\scripts\python27\runcode.py ^
telemac2d ^
-f C:\Opentelemac\v6p3r2\configs\systel_gfortran.cfg ^
-c wing64mpi ^
D:\Telemac_case_xy\tel2d.cas

REM Scalar: wingfortrans
REM parallel: wing64mpi
________________________________________________
Best regards,
Clemens
The administrator has disabled public write access.

Management of different version 9 years 10 months ago #15561

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
You can put the following command in a file:
SET HOMETEL=C:\opentelemac-mascaret\v6p3
SET PATH=%PATH%;%HOMETEL%\scripts\python27
SET USETELCFG=wing64mpi
SET SYSTELCFG= %HOMETEL%\configs\systel_gfortran.cfg
Execute that file and while your terminal is open
the only command you need is:
runcode.py telemac2d tel2d.cas
Id you in the directory containing the .cas file.

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.

Management of different version 9 years 10 months ago #15564

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Thanks you Clemens and Yugi,

It's more friendly with your tips.

Cheers
Alexis
The administrator has disabled public write access.
Moderators: borisb

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