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

TOPIC: maximum number of sources

maximum number of sources 13 years 4 months ago #1825

  • OBA
  • OBA's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
Hi,

I would submit my problem.
I've built my model and it works well in parallel mode (linux debian + gfortran + 16 proc).
Then, I've added 3 sources (with negative discharge) and 6 others for 3 culverts. It works well, no problem.
Then, I've added 94 other sources for 47 other culverts (in total, 103 sources and 50 culverts). And, it doesn't work, the program gives the following message :
" STOP ERREUR DAMOCLES 4
ADRESSE SUPERIEURE A NMAX = 300
TROP DE VALEUR DE TYPE : 2 DECLAREES.
ARRET DE DAMOCLES AU MOT-CLE D'INDEX : 37"
I deduced that I had too many sources. I tried several tests and, finally, the maximum number of sources I can introduce is 72. With 72, it works well, with 73, it doesn't!
(I've tried in single mode and I have the same conclusions than in parallel mode).
I saw in declarations_telemac2d that the maximum number of sources was 100. So, the restriction comes from the max array dimension NMAX.
My question is : how can I modify this dimension (if it's possible?!) and can I modify too MAXSCE (I will have probably 200 sources and 100 culverts to integrate)?

Thanks a lot!

olivier

ps : it is possible to edit the results at culverts and to see then with Fudaa?
The administrator has disabled public write access.

Re:maximum number of sources 13 years 4 months ago #1830

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello Olivier,

Indeed, there is a maximum number of characters allowed by DAMOCLES (CAS file parser) for every value of every keuword. Particularly for sources/sinks, if your coordinates x,y are large number in some UTM coordiante, you are very likely to exceed the maximum number of characters.

In release v6p2 (v6p1 being close to packaging) we will try to increase that number of characters.

In the meantime, what I can recommend is that you fill-in you keywords in your CAS file with dummy value, i.e.
ABSCISSAE OF SOURCES = 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
0ORDINATES OF SOURCES =
0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
etc. This will define the number of sources/sinks in your model ...
... and then add the subroutine LECDON_TELEMACxD to set the values in the source file. Example of TELEMAC-3D:

!standard source code
DO I=1,NSCE
XSCE(I) = MOTREA(ADRESS(2,80)+I-1)
YSCE(I) = MOTREA(ADRESS(2,81)+I-1)
ZSCE(I) = MOTREA(ADRESS(2,82)+I-1)
QSCE(I) = MOTREA(ADRESS(2,83)+I-1)
ENDDO
! start of the modification
XSCE(1) = 748260.6
XSCE(2) = 748263.5
...
YSCE(1) = 2508139.7
YSCE(2) = 2508144.0
...
! back to standard source code
IF(NTRAC.GT.0) THEN
DO I=1,NTRAC
...
DO I=1,NSCE
USCE(I) = 0.D0
ENDDO
! start of the modification
USCE(1) = 2.15
USCE(2) = 2.15
...
! back to standard source code
ELSE
IF(LNG.EQ.1) WRITE(LU,*)
& 'MAUVAIS NOMBRE DE VITESSES DES SOURCES SELON X'
IF(LNG.EQ.2) WRITE(LU,*)
...

you get the picture by now I guess (?)

Hope this helps.

Sébastien.
The administrator has disabled public write access.

Re:maximum number of sources 13 years 4 months ago #1850

  • OBA
  • OBA's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
Hello Sebastien,

Thanks for your answer.
I've filled my cas file with 0 as X, Y and Q, and I've set the right values (UTM coordinates) in lecdon_telemac2d. I try to join you the two files which run well.
But I've got the same restriction in my number of sources : it runs with 72 sources and it doesn't with 73 and more (like with the UTM coordinates). So, it seems that it doesn't depend on the number of characters in cas file.
Also, I don't know what I can change anymore...

Best regards

Olivier

File Attachment:

File Name: cas_TEST_M1.zip
File Size: 15176
The administrator has disabled public write access.

Re:maximum number of sources 13 years 4 months ago #1854

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hello,

maybe the explanation to your problem is decribed in the telemac programming guide (see download area) in the appendix 3 - programming rules- and is this:

"- Lines must be limited to a size of 72 characters, and only in UPPERCASE. Spaces must be
only one blank, for example between a CALL and the name of a subroutine. This is to
facilitate research of character string in source code."

However, I don't have a solution for you problem. :(

Best regards,
Clemens
The administrator has disabled public write access.

Re:maximum number of sources 13 years 4 months ago #1855

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Indeed, 72 characters seems coincidental although I believe it has to do with your huge combination of sources and culverts ...

... note that MAXSCE = 100 (in DECLARATION_TELEMACxD), the maximum number of sources/sinks you can have in TELEMC-2D, including pairs of source/sink for culverts. So you will not be able to have as many.

What you can do to solve your problem is to increase MAXSCE to at least 103 + 2x50 (say 300 to make sure) in DECLARATION_TELEMACxD. The difficulty is that this is a module and so you cannot add it to your PRINCI file. You will have to do the modification in the source code of TELEMAC and recompile the whole system.

Hope this helps.

Sébastien.
The administrator has disabled public write access.

Re:maximum number of sources 13 years 3 months ago #2230

  • OBA
  • OBA's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
Hi,

I've tried several solutions but without success.
I've changed MAXSCE in declaration_telemac2d and recompiled all the systeme, but nothing changed.
Clemens is right, the limitation in the cas file is 72 character*string for the keywords.
Then, I've searched a solution to define my sources somewhere else than in the cas file. I thought that the subroutine "source_telemac2d" can solve the problem. I've defined step by step all the XSCE, YSCE and DSCE for all the 103 sources (see the princi.txt attached). I've erased the abscissae, ordonnates and discharges of sources in the cas file. The compilation and the calculation worked well but the sources are ignored (and the discharges in the culverts are 0).
It seems that, even if I use the "source_telemac2d" subroutine, I have to define the abscissae, ordonnates and discharges of sources in the cas file. Then, I've defined it with "0;0;0;..." and, indeed, it works well. But there is always the limitation to 72 sources....
So, I would like to know if it's possible to fix the number of sources (NREJET) somewhere else than in the cas file and to take account of the X Y defined in the "source_telemac2d" subroutine??
Thanks for your help
Best regards

Olivier
Attachments:
The administrator has disabled public write access.

Re:maximum number of sources 13 years 3 months ago #2232

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

You could try to add lecdon_telemac2d.f into your princi and modify manually the values of NREJET, NREJETX, NREJETY ...

The aim of lecdon is to read the steering file and fill the different values into the right varaibles.
In order to keep all tat you manually program in sources_telemac2d, i think you could just change the value of Nrejet

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

Re:maximum number of sources 13 years 2 months ago #2413

  • OBA
  • OBA's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 4
Thanks a lot Christophe, it works well, both in scalar and parallel modes.
Results seem right.
I've indeed modified "MAXSCE" in declaration_telemac2d (I've set MAXSCE = 300), then re-compiled telemac2d.
Then I've added lecdon_telemac2d and sources_telemac2d in my fortran file (which is attached). I've set NREJEX, NREJEY and NREJET = 284 and I've defined manually XSCE, YSCE and DSCE in sources_telemac2d.
Voilà!
thanks for your help
Best regards

Olivier
Attachments:
The administrator has disabled public write access.

maximum number of sources 11 years 4 months ago #9558

  • dsakamoto
  • dsakamoto's Avatar
I think this problem of maximum sources may be back in v6p2. Telemac2D only seems to acknowledge about 80 characters in my CAS file when reading in the ABSCISSAE and ORDINATES of SOURCES.

Do others have this problem as well?

I am going to test some other models to confirm, but LEDCON may need revision.
The administrator has disabled public write access.

maximum number of sources 11 years 4 months ago #9559

  • dsakamoto
  • dsakamoto's Avatar
A simple test. The model seems to ignore sources 6 & 7.
Attachments:
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.