Welcome, Guest
Username: Password: Remember me

TOPIC: Adding a module for TELEMAC 2D

Adding a module for TELEMAC 2D 8 years 7 months ago #20978

  • special_20
  • special_20's Avatar
Hello all,

I would like to add a module of my own in TELEMAC 2D. But to compile TELEMAC 2D I must first compile TELEMAC without this file and then I compile TELEMAC 2D with this file and mentionning this module in the cmdf file. If I don't do so (that's to say if I don't compile TELEMAC 2D first without this module) then I get error saying that it can't find the modules bief.mod and declarations_telemac.mod (which are modules that Iuse in my own module).

Can you help me ?
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #20979

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

Could you clarify if you plan to build a new program or a new module use by one existing program?

I think you have to run the scan of telemac directory and probably add the module name in runcode (libdeps)

Normally it works quite well as the scan identify the dependencies and compile accordingly

Regards
Christophe
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #20981

  • special_20
  • special_20's Avatar
Hello,

Yes this is a new module used by an existing subroutine (read_fic_frliq.f). Can you tell me how I can scan the telemac directory ? Is there a python file to do this ? And can you tell me how to add the module name in runcode ? I searched for a file named libdeps but I didn't find anything.

Regards
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #20982

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

To scan the directories, you should use the option --rescan of compiletelemac.py

My mistake, it's in compiletelemac.py and not in runcode.py :whistle:

regards
Christophe
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #20985

  • special_20
  • special_20's Avatar
I tried your suggestion but I get the following error when compiling read_fic_frliq.f (that uses my module) :

"Fatal Error: Can't open module file 'm_partage_telemac.mod' for reading at (1): No such file or directory"

where "m_partage_telemac" is my module. And this module is not mentionned in the telemac_2D.cmdf file even though I used the rescan option.

Regards
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #20989

  • riadh
  • riadh's Avatar
hello

you can add the module in your user fortran file AND
put it at the beginning of the file AND add all the routines that use your module afterward.
with this solution you are not obliged to recompile Telemac sources.

kind regards

Riadh
The administrator has disabled public write access.

Adding a module for TELEMAC 2D 8 years 7 months ago #21035

  • special_20
  • special_20's Avatar
Thank you Riadh for your suggestion but what I don't get is that I use in the TELEMAC subroutine read_fic_frliq.f some variables I defined in my module. If I remove the "USE M_PARTAGE_TELEMAC" line from read_fic_frliq.f then when I compile I get errors because the variables that I use and that are declared in my module are not declared in read_fic_frliq.f, for example :

Error: Symbol 'ib_read' at (1) has no IMPLICIT type

But probably I didn't get something.

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

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