Welcome, Guest
Username: Password: Remember me

TOPIC: Modifying multiple interrelated subroutines

Modifying multiple interrelated subroutines 12 years 4 months ago #4960

  • Chris C.
  • Chris C.'s Avatar
Hello,

I am trying to implement a modification of the subroutines 'nodalf_pugh.f' and 'nodalupv_pugh.f', which are called by my subroutine 'bord.f'.
This latter was first modified (included in the main fortran file of T2D) and tested with success.
Next I included the 2 'nodal' routines (modified versions) in the fortran file, but the 'bord' subroutine does not seem to call the right versions of these subroutines (it seems to be calling the original subroutines and not be taking into account the modification made in the fortran file).

Would anyone have an idea on how to solve this situation? (Is there a special procedure for modifying several subroutines, with one calling the other(s)?)

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

Re: Modifying multiple interrelated subroutines 12 years 4 months ago #4965

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

Are you sure the fortran was well recompiled?
To be sure, delete the local exe file and run the simulation again.

To be really sure, add a WRITE instruction at the beginning of the modified subroutines and check the listing!

Normally, the modified subroutines existing in your own fortran file overcome the existing version available in the libraries.

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

Re: Modifying multiple interrelated subroutines 12 years 4 months ago #4973

  • Chris C.
  • Chris C.'s Avatar
Actually, my fortran file was not compiling but I found the solution to my problem:
I was getting the error 'The number of actual arguments cannot be larger than the number of dummy arguments.' because I had increased the number of outputs of the subroutines. Using different names for the subroutines was enough to overcome the error.

Thanks anyway!
The administrator has disabled public write access.

Re: Modifying multiple interrelated subroutines 12 years 4 months ago #4979

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
HI
The arguments are fixed by the interface_xxx.f file.
So, if you want to change the arguments, you should create a specific copy of the subroutine with a different name.
Take care to well check the different call to this subroutine and change all of them with the new name because if you let some calls to the old version you maybe will face to some strange "computations".
The cleanest way will be to change those subroutines in the sources and accordingl the interface and the make a full compilation to avoid such risks.

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

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