Welcome, Guest
Username: Password: Remember me

TOPIC: extract the results from a node with a big node ID

extract the results from a node with a big node ID 7 years 8 months ago #25488

  • yuanhui
  • yuanhui's Avatar
Hi,
I am using TELEMAC3D and I have two questions:

1. when I want to extract the vertical profile of water temperature at some point, I used the subroutine utimp.f and put:
WRITE(T3D_FILES(T3DRFO)%LU,*) AT,TA%ADR(1)%P%R(89506),
& TA%ADR(1)%P%R(89506+NPOIN2),TA%ADR(1)%P%R(89506+2*NPOIN2),
& TA%ADR(1)%P%R(89506+3*NPOIN2),TA%ADR(1)%P%R(89506+4*NPOIN2),
& TA%ADR(1)%P%R(89506+5*NPOIN2),TA%ADR(1)%P%R(89506+6*NPOIN2),
& TA%ADR(1)%P%R(89506+7*NPOIN2),TA%ADR(1)%P%R(89506+8*NPOIN2),
& TA%ADR(1)%P%R(89506+9*NPOIN2)
I have 10 sigma layers so I need to extract from each layer and 89506 is my node ID from 2D mesh. Then it gives me the error that 'error SIGSEGV: Segmentation fault - invalid memory reference', if I use the smaller node ID, eg. 8950, it works. Anyone has ideas on this?

2. Is it possible to have the result file 2d/3d.slf file generated during the simulation? instead of waiting until the end?

Thank you so much
Yuan
The administrator has disabled public write access.

extract the results from a node with a big node ID 7 years 8 months ago #25489

  • yuanhui
  • yuanhui's Avatar
Hi,I just realized the code takes the node ID (89506)as the local ID, which is the new number series generated after the decomposition (I am using parallel version, and the number of processors are 4), but the number I give in the code actually is the global 2D ID, so of course the code thinks the ID i give exceed the limit of each processor and it explains the error. But I do not know the local ID for each processor and how it composite spatially. How to let the code know that my number is global number and extract the results from the node with a certain global number, instead of the local number? I am really appreciate if you have any ideas or suggestions.

Thank you
Yuan
The administrator has disabled public write access.

extract the results from a node with a big node ID 7 years 8 months ago #25580

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Take a look at the Telemac Developer Guide. There are a lot of useful information about the parallelization of the system.

What you want is to convert a Global node ID to a Local node ID. To do that you use the KNOGL array. This array has the local number of each of the global nodes (The KNOLG array is the opposite).

So, in order to convert your global number (89506) to the local number, use:

LOCAL_NODE = MESH2D%KNOGL%I(89506)

The problem now is that all of the cores will perform this operation but, obviously, only one will be correct.

Now I don't know exactly what is the value returned by KNOGL for the processors that do not own the node you want. You'll have to test that, but probably they will return zero.

Best regards,

Phelype
The administrator has disabled public write access.

extract the results from a node with a big node ID 7 years 8 months ago #25581

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
As for question n°2, no, the .slf files are joined only after the simulation ends. But you can always use gretel_autop to do so manually.

Go to: <ROOT>/builds/<CONFIG>/bin
(<ROOT> is where telemac is installed and <CONFIG> is the name of the compilation in the .cfg file)

Copy gretel_autop to the folder where your temporary files are and run it (./gretel_autop if using linux)

It'll ask you the name of the geometry file (T3DGEO), the name of the results file (T3DRES for 3D and T3DHYD for 2D) and the number of cores.

Hope this helps

Best regards,

Phelype
The administrator has disabled public write access.

extract the results from a node with a big node ID 7 years 8 months ago #25593

  • riadh
  • riadh's Avatar
Hello

To retrieve the local Id of a node you can use the following line

ID = GLOBAL_TO_LOCAL_POINT(INDEX1,MESH)

IF ID not 0 than the node is in the subdomain, otherwise not.

I hope that this helps

Ps: The task you want to do is a post-processing one which can be achieved by your post-processing software : paraview, tecplot, Blue Kenue, or postel. Python scripts are also able to to that, but I'm not familiar with them, I let other users to add more useful informations about that.
with my best regards

Riadh
The administrator has disabled public write access.
Moderators: pham

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