Welcome, Guest
Username: Password: Remember me

TOPIC: Compile TELEMAC with multiple sources attached

Compile TELEMAC with multiple sources attached 13 years 3 months ago #2149

  • bzindovic
  • bzindovic's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 3
Hello,

I'm modifying a few subroutines each one belonging a different source file. Since I want to test them separately and combined, is there a way to have multiple FORTRAN source files listed in the TELEMAC steering file? I've tried separating them with semicolon but I'm not sure whether it is valid procedure.

Regards,
Budo
The administrator has disabled public write access.

Re: Compile TELEMAC with multiple sources attached 13 years 3 months ago #2153

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Budo
If you use perl Script, you could have a look into runtel.pl and runcode.pl (in the bin directory).
It seems the script was built to accept more than one fortran file but I don't know if you should separate them with a semicolon or just multiplying the keyword "FORTRAN FILE".

For python, i don't know if the treatment is similar.

As I know, this possibility is not use and only one Fortran file is used with all the subroutine in it.

Let us know the result of yoru tests;

Regards
Christophe
The administrator has disabled public write access.

Re: Compile TELEMAC with multiple sources attached 13 years 3 months ago #2185

  • bzindovic
  • bzindovic's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 3
Hi Christophe,

I've been playing with the sources in TELEMAC and it seems that the usage is as follows:

1. If using multiple "FORTRAN FILE" keywords, only the last one is used (python and perl scripts).

2. If separating source names with semicolon, only the first source file is used (python scripts).

Your suggestion of using only one source file is currently the only option but is not optimal for testing purposes. Testing my 9 subroutines (one and two in the same case file at most) require 36 case scenarios and generation of 36 source files which is tedious to track and maintain (which function is implemented and where). It would be much easier if the inclusion of multiple FORTRAN files is supported within python scripts (copy all of them in a single temporary file and use that file for compilation). That is an interesting idea for further development of TELEMAC.

Best regards,
Budo
The administrator has disabled public write access.

Re: Compile TELEMAC with multiple sources attached 13 years 3 months ago #2211

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Budo

I had a look into runcode.pl (perl script).
As i understand (but not tested) if you give different file name separated by semicolon (";") all the file should be take in account.
#   @FicFortToCompile=();
   foreach $FORTFIC (@FORTRANS)
   {
   ($FORTRAN,$FORAC)=split (/;/,$FORTFIC);
    if ($FORTRAN ne "DEFAUT")
      { acquihp($FORTRAN, $FORAC);        #keyword "FORTRAN FILE"
        ecrire_FicTitrVal("FICHIER FORTRAN","FORTRAN FILE", $FORTRAN);
        push (@FicFortToCompile, $FORAC);
      }
#We add the Fortran Include File(FORTINC)
      foreach $FORTFIC (@FORTINC)
      {
      ($FORTR,$FORAC)=split (/;/,$FORTFIC);
      acquihp($FORTR, $FORAC);        #keyword "FORTRAN FILE"
      ecrire_FicTitrVal("FICHIER FORTRAN INCLU","FORTRAN INCLUDE FILE", $FORTR);
      }
   }#foreach FORTFIC
   $FORTRAN=@FORTRANS[0];                #for the exe local name
   ($FORTRAN,$TMP)=split (/;/,$FORTRAN); #on the basis of first FORTRAN
Moreover, it seems to me that if you run Telemac and sisyphein coupled mode and if each sterring file has it's own fortran file, both are merged when you run simulation

Hope this helps
Christophe
The administrator has disabled public write access.

Compile TELEMAC with multiple sources attached 8 years 4 weeks ago #24106

  • chelobarros
  • chelobarros's Avatar
hi, i know its a bit late in time, but i wonder if you ever figured it out.

im trying to use 2 fortran file as well, but i haven’t been successful yet.

grettings,
Chelo.
The administrator has disabled public write access.

Compile TELEMAC with multiple sources attached 8 years 4 weeks ago #24108

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

You have two possibilities:
- Merge the two files into one and use that as USER FORTRAN
- Use a folder as USER FORTRAN

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.
The following user(s) said Thank You: chelobarros

Compile TELEMAC with multiple sources attached 8 years 4 weeks ago #24119

  • chelobarros
  • chelobarros's Avatar
thanks!
The administrator has disabled public write access.
Moderators: pham

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