Welcome, Guest
Username: Password: Remember me

TOPIC: New output variable

New output variable 5 years 10 months ago #32599

  • PieterWydooghe
  • PieterWydooghe's Avatar
Hello

i'd like to add two new output terms in TOMAWAC. I followed the steps of the following topic.
www.opentelemac.org/index.php/community-...fications-in-tomawac

As I add my two variables, I get the following error concerning the maximal dimension of the array containing the output variables:
"Fortran runtime error: Index '36' of dimension 1 of array 'texte' above upper bound of 35"

If I change the upper bound of 35 (MAXVAR) I get other compiling errors.

How can I fix this?

Thanks in advance

Pieter Wydooghe
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32600

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Did you make a full clean compilation after changing maxvar?
Christophe
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32629

  • PieterWydooghe
  • PieterWydooghe's Avatar
I'm sorry but I don't know what you mean with a "full clean compilation" and how I should do it.

I managed to replace two other variables with the ones I want, but I would still like to add them as new variables...
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32630

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
You should compile Telemac again with --clean option in order to make a full compilation which will take in account the change of Maxvar in all subroutines
Hope this helps
Christophe
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32639

  • PieterWydooghe
  • PieterWydooghe's Avatar
Hello

I don't think that will make any difference. I change MAXVAR in a fortran file (in a windows folder) which I specify in my steering file. I'm running TELEMAC on bash on Ubuntu on my windows computer. Compiling wouldn't take this new value into account as the source for compiling would stay the same because declarations_tomawac won't change on ubuntu.

I hope this is clear to you...

Is this actually the way to add new variables to the output or is there another way to do it?
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32640

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
Changing a module file like declarations_tomawac.f is not allowed in a user fortran file!
This is not specific to telemac! This is a general rule for fortran compilation

Doing such manipulation and partial compilation will lead to segmentation fault or similar problems which are not tricky to debug...

You should change such files in the original source and compile again

Regards
Christophe
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32641

  • PieterWydooghe
  • PieterWydooghe's Avatar
Hi

okay, thanks. I'll try to change the original source.

Another small question: I defined a new subroutine and changed some input and output of some other subroutines. According to these changes, I adapted interface_tomawac in my fortran file. I didn't get any errors running a test, can I assume that everything went fine or should I also change interface_tomawac in the original source?
The administrator has disabled public write access.

New output variable 5 years 10 months ago #32643

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
You should also change interface_tomawac in the original source.
This is the same kind of problem as declarations_tomawac.
There is no compilation error as you compile only the modified sources and they are consistent and you link with a library without no other verification.
But there could be some problem if non modified source file try to call a modified subroutine...
Regards
Christophe
The administrator has disabled public write access.
Moderators: tfouquet

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