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

TOPIC: Link up set of subroutines into a single FORTRAN file

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16051

  • schaad
  • schaad's Avatar
I have multiple custom routines that I would like compiled with my run. The manual says to "Link up the set of subroutines into a single FORTRAN file that will be compiled during the TELEMAC-2D start procedure." How might I do so?
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16052

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello,

With version v7 and thereafter one can specify a folder in addition to a single file. If you put all your fortran files into one folder and specify this folder in your cas file (where the fortran file should be), the code will collect them into one file and compile them as one.

Regards,
Costas
The administrator has disabled public write access.
The following user(s) said Thank You: schaad

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16055

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes, the old procedure consists in merging all the modified subroutines into a single file called FORTRAN FILE in the steering file. You can find a lot of examples in the folder "examples".

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16069

  • schaad
  • schaad's Avatar
That's simple enough, thanks!

Simon
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16091

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Hello Costas,

Can you tell me which is the exact syntax to declare a folder including all the Fortan files in the case file?
This folder should be at the same "level" than the other files of the simulation (.cas,.cli,.geo,...)?
The "folder option" to declare the Fortran files can be use in all the modules (Telemac2d, Tomawac,...)?

Regards
Nicolas
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16092

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello Nicolas,

This is taken as it is from one a working cas file created with fudaa.
FORTRAN FILE             ='../!SubRoutines'

As you can see the fortran files lie in a separate folder that is one level up the tree than the cas file. So they don't have to be in the same directory. In this case I have specified a 'relative' path to the cas file. Also the geometry and cli files don't need to be in the same level. You can specify their location with 'relative' paths as well.

The folder option works for all modules.

Regards,
Costas
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16096

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Ok for the path relative to the case file, I was wrong talking about a "level" with all the other file of the simulation...

Why does it work only with a case file created by Fudaa?
The case file isn't an ascii file and there is no link associated? If I change a value in the case file with a text editor, this value is taken account in the next simulation. I have read part associated to FORTRAN FILE in telemac2d.dico and there is nothing linked with a folder.

Can you give me more information about it?

Regards
Nicolas
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16099

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
It is not necessary to use fudaa to setup your cas file. I mentioned it just for reference. You can use a text editor with no problem.

Here is the comment from the runcode.py script:
"""@history 15/04/2014 -- Sebastien E. Bourban
   FORTRAN file can now be refered to as directories, in which case, all files
      within it will be bundled together as one FORTRAn file.

Costas
The administrator has disabled public write access.
The following user(s) said Thank You: Proust_Nicolas

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16100

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Ok thank you,

It does not work on my computer, but I am using a PERL V7P0 version so it seems to be logical.
If I understand the merging of Fortran files is made before Telemac, as a "pre-processing" task by Python code?

Regards
Nicolas
The administrator has disabled public write access.

Link up set of subroutines into a single FORTRAN file 9 years 8 months ago #16101

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Yes, the runcode.py script does the merging and compiling of the fortran files. It has nothing to do with the actual modules.

I no experience of the perl scripts, but I guess they are not 100% equivalent to the python counterparts. So it appears that 'folder option' for fortran files is available for python only.

Costas
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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