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

TOPIC: How to raise the maximum number of sources in t3d

How to raise the maximum number of sources in t3d 7 years 4 months ago #27051

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
I am modelling an intake boundary with negative sources (with version v7p2r1). The negative sources only apply to certain vertical layers. I need to add 90 sources (18 points on 5 vertical layers). I get an error below.
ADRESS GREATER THAN NMAX = 300
TOO MANY VALUES OF TYPE : 2 DECLARED.
STOP OF DAMOCLES AT KEY-WORD NUMBER: 83
I see a few people ran into the same error. The following is what i have tried:
- MAXIMUM NUMBER OF SOURCES = 1000: With this edit, the error message is exactly the same, which seems to me it did not do anything
- in file lecdon_telemac3d.f, change 300 to 1000 (there is only one 300): again this edit did not change the error message.
- this post opentelemac.com/index.php/assistance/for...and-tracers?start=20 discussed parameter NMAX in files homere_telemac3d.f and interface_telemac3d.f. I could not see this parameter in either file anymore (due to version update).

Is there anything else i can try?

Any help is greatly appreciated!

Hailiang
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27056

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Hello Hailiang

Try changing the value of MAXKEYWORD in the module declarations_special.f. It is the only source I found for this value.

If it doesn't work upload your simulations files so we can try to reproduce the error and solve your problem more easily.

Hope this helps.

Best regards,

Phelype
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27058

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Hi Hailiang,

the maximum number of sources shouldn't be the problem. We run a model with 252 culverts = 504 sources. Just ran it in V7P2r1 and it doesn't give a problem.

Hope the MAXKEYWORD suggested by Phelype will do the trick!

Sven
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27068

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
Thanks for the reply. I cannot upload all model files. I have attached my case file. Is there anything wrong with my source definition?

File Attachment:

File Name: M-3dp_2017-07-05.cas
File Size: 7 KB


Glad to know this version can work with so many sources, Sven.

Phelype, MAXKEYWORD is the maximum number of keywords. Is it somehow related to the error message? The error is saying it stopped at keyword 83, but it is not over 300 (the default value) yet.

Hailiang
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27069

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Well, I tried to spare you from the long answer, but here it goes:

To arrive at the I-don't-know-if-it-is-correct solution of changing the value of MAXKEYWORD I searched the sources of TELEMAC for the error message "ADRESS GREATER THAN NMAX". This message is triggered by damoc. or classe.f when some variable has a value bigger than NMAX:
IF (ADDES.GT. NMAX) GO TO 1515
1515 WRITE(LU,*)'ADRESSE SUPERIEURE A NMAX = ',NMAX
CALL PLANTE(1)

Then I looked at the call tree of these subroutines looking for the variable NMAX, and found out that damocle.f is called with NMAX from lecdon_telemac3d.f, where this variable is called MAXKEYWORD.
CALL DAMOCLE( ADRESS , DIMEN  , MAXKEYWORD , DOC , LNG    , LU ,
     &              MOTINT , MOTREA , MOTLOG , MOTCAR  , MOTCLE ,
     &              TROUVE , ID_DICO, ID_CAS , .FALSE. , FILE_DESC )

Finally, I searched for the declaration of MAXKEYWORD and the only place I found is in the module declarations_special.f, which is then used by lecdon_telemac3d.f.
INTEGER, PARAMETER :: MAXKEYWORD = 300

TL;DR: If you increase the value of MAXKEYWORD enough that error will not be triggered anymore. BUT I don't know what is the purpose of this limit in the code, so maybe you'll change it and the program will crash somewhere else. But until someone who knows the purpose of MAXKEYWORD in the code answers you, the only way of finding out if it works is changing it and running your simulation.

And unfortunately, if you cant upload the simulation files, there's no way I can help you further.

Best regards,

Phelype
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27070

  • Svensmolders
  • Svensmolders's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 105
  • Thank you received: 20
Interesting case :-)

If you go to damoc.f you can see that NMAX value is used everywhere, so changing it, will change the size of many vectors.
If you scroll further down I found the following message:
! IF THE KEYWORD &DYN IS NOT IN THE STEERING FILE AND IF THERE ARE
! MORE VALUES THAN THE PARAMETER TAILLE THEN TRUNCATES TO ITAI;
! ELSE (&DYN IN THE STEERING FILE) READS ALL THE VALUES OF THE STEERING FILE


I don't fully understand it, but I think if you add &dyn to your steering file all your values will be read or I'm I reading this wrong?

You can try both things (adding &dyn and increasing maxkeyword) and let us know what happens :-)

Sven
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27074

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
Thanks Sven and Phelype. I tried both but still no luck.

For MAXKEYWORD, i set it to 3000, recompiled telemac, and got a different error message, see below.

After adding &dyn to the end of my steering file, the error message is the same as below.

Anything else i could try?

2017_07_05_10_37_33_Administrator_C_Windows_System32_cmd.png
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 7 years 4 months ago #27079

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
That's really strange. I looked at your .cas file and it seems OK, except for the keywords that span multiple lines. I don't know how stable this is. I would try removing those lines, and if the simulation works without them, I would include one by one to find out which one is giving you problems.

If it is not those lines then I'm out of ideas.

If none of this works, I suggest you upload a minimal working example that throws the same error for we to try to help you.

Best regards,

Phelype
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 11 months 4 days ago #43822

  • colinemathias
  • colinemathias's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 1
Hello,
I encountered the same problem for variables defined on several lines and solved it by putting '; ' at the beginning of the next line instead of the end. I put an example below, in case it might help someone:

What does not work :
ELEVATIONS OF SOURCES=
-7.3;-7.3;
-7.3;-7.3

The solution :
ELEVATIONS OF SOURCES=
-7.3;-7.3
; -7.3;-7.3
The administrator has disabled public write access.

How to raise the maximum number of sources in t3d 11 months 3 days ago #43831

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Coline,

Can you upload your steering file?

Do not forget that lines in steering files are limited to 72 columns.

Chi-Tuan
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.