Welcome, Guest
Username: Password: Remember me

TOPIC: ParallelxLocal NPOIN2 in CONDIM

ParallelxLocal NPOIN2 in CONDIM 10 years 2 months ago #14083

  • caiodalaqua
  • caiodalaqua's Avatar
Greetings,

I am trying to load some 3D data to initialize the model in the CONDIM subroutine with the parallel version. I succeeded in doing such task; however I had to declare the total number of 2D nodes by "brute force" which is not the most elegant solution ever.

My declarations look something like this:

INTEGER, PARAMETER :: NPOIN_TOTAL=10000
DOUBLE PRECISION,DIMENSION(NPOIN_TOTAL*NPLAN) :: INIT_TEMP

Where INIT_TEMP is be the array where the external data is stored and NPOIN_TOTAL is the total number of 2D Nodes.

My questions is: Is there a way to get a variable from the system (I suppose it is NPOIN_TOT) in order to not have to force it ?

Any help is appreciated.

Thank you very much

Caio E. Stringari
The administrator has disabled public write access.

ParallelxLocal NPOIN2 in CONDIM 10 years 2 months ago #14084

  • OBD
  • OBD's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 16
Hi,

You can find the total number of nodes in the geo file T2DGEO (or T3DGEO) or in the partel.log. These two files are stored in the temporary directory.
For reading the geo file you can use the subroutine skipgeo.f of the BIEF sources.
The partel.log is an ascii file.
These are 2 solutions but there must be others

Regards,
Olivier
The administrator has disabled public write access.
The following user(s) said Thank You: caiodalaqua

ParallelxLocal NPOIN2 in CONDIM 10 years 2 months ago #14101

  • caiodalaqua
  • caiodalaqua's Avatar
Thank you very much Olivier.

I could load the binary using skipgeo call. However, I was still seeing the local and not the total number of points.

I figured a rather fancy solution using python+fortran.

Using python I read the mesh and export only the value I need as system variable. Them, this variable is load in fortran using the function get_environment_variable(). in this way, I was finally able to allocate the arrays with the proper size.

I am attaching the python script here. It may be useful for someone later on.

It is called as:

$(python export_mesh_info.py 'path_to_mesh' 'path_to_cli')

Cheers

Caio
Attachments:
The administrator has disabled public write access.
Moderators: pham

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