Welcome, Guest
Username: Password: Remember me

TOPIC: Compilation with precompilation keys

Compilation with precompilation keys 9 years 1 month ago #18614

  • special_20
  • special_20's Avatar
Hello all,

For some developments I need to use precompilation keys in some Telemac2D routines. Those routines must be called in *.F format. For example if I add a precompilation key in homere_telemac2d.f I must name it homere_telemac2d.F instead of homere_telemac2d.f

My question is : when compiling, for example with the "update telemac" option, how can I make sure that this is homere_telemac2d.F that is taken into account and not homere_telemac2d.f ?

I actually use v6p3 version of Telemac.

Bye
The administrator has disabled public write access.

Compilation with precompilation keys 9 years 1 month ago #18615

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

You should at least make a full scan of the code (option --rescan)

Otherwise, to be sure, I will put a write with 2 differents message...

Regards
Christophe
The administrator has disabled public write access.

Compilation with precompilation keys 9 years 1 month ago #18616

  • special_20
  • special_20's Avatar
Thanks for your answer but the problem is : if I replace homere_telemac2d.f by homere_telemac2d.F when compiling I get the following error message :

"compileTELEMAC::main:
+> Could not find the following file for compilation: homere_telemac2d.f
... so it may have to be removed from the following cmdf file: /home/globc/barthelemy/HYDRO/v6p3/sources/telemac2d/telemac2d.cmdf:
uncontroled error from python:: DistutilsFileError("file '/home/globc/barthelemy/HYDRO/v6p3/sources/telemac2d/homere_telemac2d.f' does not exist",)"

But if I modify the compileTELEMAC.py python routine with those few lines before "cmd = cfg[odict]" command :

if Root == 'homere_telemac2d':
Suffix = '.F'
oname = Root + Suffix

then it compiles homere_telemac2d.F routine.

Now, the problem is : if I modify homere_telemac2d.F and compile again I have the following message : "There is no need to compile any object". To make sure that homere_telemac2d.F is taken into account into the compilation I must modify homere_telemac2d.f. But what I want is homere_telemac2d.F to be taken account in the compilation without modifying homere_telemac2d.f. I don't know if I am clear enough. I can explain in french too :)

Regards
The administrator has disabled public write access.

Compilation with precompilation keys 9 years 1 month ago #18617

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
I think I understand your problem.
The main problem is linked to the preprocessing step of the compiler and maybe to the fact that you need to modify the main program...
Probably YUGI could give you better advises than me.

Maybe there should be also some improvements in the python scripts in order to detect a modification of .F file!

Regards
Christophe
The administrator has disabled public write access.

Compilation with precompilation keys 9 years 1 month ago #18618

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

Before doing the rescan you need to delete all the .cmdf files.
On Linux you can use the following command when launch forom telemac main directory:
find sources/ -iname "*.cmdf" -exec rm -vf {} +

And just for information in cause that solution does not work:
Another way to bypass that problem is to leave the file name homere_telemac2d.f and add the option -fpp to the compiler. This option will force the preprocessor to be run on every 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.

Compilation with precompilation keys 9 years 1 month ago #18619

  • special_20
  • special_20's Avatar
Thank you Yugi, I deleted the cmdf files using the command you prescribed in your message but the problem is that when compiling Telemac2D with "clean telemac2d -dredgesim" and using --rescan option, I get the following error message :

"Updating your cmdf file for compilation without scan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Hummm ... I could not complete my work.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compileTELEMAC::main:: Could not find any cmdf file for config susgfortrans. You may have to use the --rescan option"

Then what I did is getting a backup version of the cmdf files and modified manually in the telemac2d.cmdf file the homere_telemac2d.f to homere_telemac2d.F. So now I have nothing to do for my homere_telemac2d.F to be taken into account in the compilation process, it works fine !

Thank you for your help ;)
The administrator has disabled public write access.

Compilation with precompilation keys 9 years 1 month ago #18622

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Good for you if it works.

For info the following the following should have solved the previous problem:

Could you try running this command to recompile:
compileTELEMAC.py --rescan
And putting in your configuration file for modules
"system -dregesim"
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.
Moderators: borisb

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