Welcome, Guest
Username: Password: Remember me

TOPIC: Find back the original numbers on boundary in parallel mode

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9581

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear all,
I'm using telemac2d, version v6p2. I use my fortran file (see attached file) in which I modified the subroutine BORD to define Z and Q in my case. When I run model with scalar code (1 processor), I have the parameter NPTFR=12546 with 6 liquid frontiers (the boundary points numbering is from 1 to 12546). The program runs seem correctly.
When I have declared in parallel mode with 8 processors (the program failed). In this case, I have used the operation : BOUNDARY_COLOUR%I(K) with K=1,NPTFR to find back the original numbers in my fortran file (points on Z, Q liquid boundary). Unfortunately, I can't find the original numbers (that's reason why my program was failed?). In addition, the parameter NPTFR in this mode isn't 12546 ! Do I miss something to declare or wrong operation to be used?
Thank you very much for your help.
Best regards
Thong NGUYEN
HCMUT
VN

File Attachment:

File Name: t2d_Fortran.f
File Size: 21 KB
The administrator has disabled public write access.

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9592

  • jmhervouet
  • jmhervouet's Avatar
Hello Thong,

This section :
! Thong modified
DO KK=1,NPTFR
K = BOUNDARY_COLOUR%I(KK)
! K = MESH%KNOLG%I(KK)
! Het
IFR=NUMLIQ(K)
ZMIN(IFR)=MIN(ZMIN(IFR),ZF(NBOR(K))+H%R(NBOR(K)))
ENDDO

is probably not what you aim to do. BOUNDARY_COLOUR%I(KK) is the original boundary number, so you cannot use it locally as you do with NUMLIQ(K) and NBOR(K).

Generally if you want to do a special treatment to a point with original boundary number 32 (example) it is difficult to avoid a loop like :

DO KK=1,NPTFR
IF(BOUNDARY_COLOUR%I(KK).EQ.32) THEN
! this is my original point 32, I treat it here
HBOR(KK)=... (example)
!
ENDIF
ENDDO

Does this help ?

Regards,

Jean-Michel
The administrator has disabled public write access.

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9597

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear M. J-M Hervouet,
Thank you very much for your response. I found that the parameter NPTFR is different for each processor (in parallel mode) and this parameter is different to value in scalar mode. Is it normal?
Best regards
Thong NGUYEN
HCMUT
VN
The administrator has disabled public write access.

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9598

  • jmhervouet
  • jmhervouet's Avatar
Hello Thong,

Sure, NPTFR is the local number of boundary points.

JMH
The administrator has disabled public write access.

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9617

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear M. J-M hervouet,
In this case, when I do a loop for example:
do j=1,NPTFR
....
enddo
(Suppose that I would like to consider all point on boundary for to do something).
what is the value of NPTFR when le program runs in parallel mode?
Thank you for your help.
Best regards
Thong NGUYEN
HCMUT
VN
The administrator has disabled public write access.

Find back the original numbers on boundary in parallel mode 11 years 4 months ago #9620

  • jmhervouet
  • jmhervouet's Avatar
Hello Thong,

In parallel mode, NPTFR is the number of boundary nodes of the sub-domain. If you do loops from 1 to NPTFR, all processors will do this loop so all the boundary points will be treated (points that belong to two sub-domains will be treated on either side). There is no easy way to find the original total number of boundary points (it is not the sum of all local NPTFR because of interface points that would be counted twice), but this original number is not very useful, you do not need it for treating all points because on every sub-domain you only need to treat your points.

To sum up : to treat all boundary points, just do loops on the local number NPTFR.

An exception would be if you have to compute for example the sum of depths of all boundary points, then we would have to look precisely at what you really want to do and think it over.

Best regards,

Jean-Michel
The administrator has disabled public write access.
Moderators: pham

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