Welcome, Guest
Username: Password: Remember me

TOPIC: Can customized BORD work in parallel version?

Can customized BORD work in parallel version? 12 years 9 months ago #3680

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Hello,

I have installed parallel version of Telemac suite in Ubuntu PC. Before I ran a model with one processor and the result was OK. Then I try to do the same with 4 processors but I got strange result. The subroutine BORD seems not working. It's supposed to impose time series of water levels at liquid boundaries but somehow I just saw the constant values of water level at the boundary. Does it work in parallel version? I also have CORSTR in my Fortran file and it didn't work either.
The administrator has disabled public write access.

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3681

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

Every subroutines of Telemac works in parallel (except maybe the weir treatment in 6.1 but this has been corrected for 6.2)

If you add some subroutines in you own fortran file, you should take care about the way you modify these programs if you plan to use parallelism.

I don't know exactly what you've done in BORD and CORSTR but it's probably the part of your program which doesn't work in parallel.

Check in the various subroutines, the way to adapt your program for parallelism. This is often indicate with conditional block like IF(NCSIZE.GT.1) THEN

You could also join you fortran to allow forum members helping you

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3682

  • jeremie
  • jeremie's Avatar
  • OFFLINE
  • Junior Boarder
  • Hydro-Quebec
  • Posts: 39
  • Thank you received: 7
Hi,

Do you refer to particular node numbers in your fortran file? If that is the case, when you run in parallel, there could be a conflict between the node number you are pointing at and the local node numbering on each mesh partition.

j
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3683

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks Christophe and Jeremie!

I indeed added some conditional blocks in the code. I also referred to particular node numbers in these conditional blocks.

Attached is the FORTRAN file I used.
In the subroutine BORD, the idea is to assign time series of water level only at liquid boundary points.
In the subroutine CORSTR, the idea is to calculate Chezy Coefficient at every time step.

If I programmed in a wrong way, how to do it right in order to run it in parallel? Many thanks!
Attachments:
The administrator has disabled public write access.

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3684

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

For bord part of program, if you want it work in parallel, please change your approach and use the boundary liquid file. You can do the same thing in an easiest way.
With // computation you should avoid direct opening file and reference to nglobal node numbering.
Use fudaa to generate the boundary condition file (import the curves) and affect each curve to the coresponding boundary

For CORSTR, i think the problem comes from the potential nul or negative value of H with the log function
The programmation should works in parallel but you probably shouls add some protection

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3685

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks Christophe.
I read the manual about the liquid boundary file.

# Example of open boundaries file
# 2 boundaries managed
#
T Q(1) SL(2)
s m3/s m
0. 0. 135.0
25. 15. 135.2
100. 20. 136.
500. 20. 136.

Does it mean all the points at the same open boundary has the same values? If I want to assign values over time and space? I mean to give different values for each point.
The administrator has disabled public write access.

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3686

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

Yes with the liquid boundary file, all the nodes of the same boundary have the same value. This value could vary on time;
If you want to have a spatial varying boundary condition (This could be necessary on large boundary with tide influence for example) you shoul modify manualy the bord subroutine.
To use the parallelism in such case, you shoul add some tests on ncsize and if ncsize > 1 then you should use the KNOLG varaible (this vector made the corespondance between local numbering (in each subdomain) and global numbering.
Once again, if you should read the values in a file, use one of the existing file of telemac (FORMATTED FILE 1 or 2 for example)

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3687

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks Christophe.

I saw the KNOLG variable in the code. It's often used like this MESH%KNOLG%I.
Could you explain more about this variable? For example, if I want to give values to node K (boundary node number NPTFR ), I could find the corresponding global number NBOR(K). Then how to link it with KNOLG?
The administrator has disabled public write access.

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3688

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

if you are in the global domain, on the boundary node K (K is between 1 and NPTFR, nbor(K) gives you the node number in the global numbering (between 1 and NPOIN).

If you divide your domain in some sub-domains, each subdomain will have it's own boundary node K (between 1 and the total number of boundary node of the subdomain - something like NPTFR'(i)). Then in each subdomain NBOR(K) gives you the node number in the global numbering of the subdomain. This is like a local numbering in the subdomain.
If you use KNOLG(NBOR(K))in a subdomain, then you will have the node number in the global numbering of the full domain.

Take care because KNOLG only exist if parallelism is activated. In scalar mode, this vector doesn't exist. That's why you should have some conditional treatment linked to ncsize.

Hope this helps you to adapt your program and allow you to run your model in parallel.
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Re: Can customized BORD work in parallel version? 12 years 9 months ago #3689

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks Christophe! Now I understand better.

You said the subdomains will have their own boundary node number. Did you mean if NPTFR=100 in the global domain, then it will become a different number (maybe 55) in the subdomain? Is there any links between global boundary node number and subdomain boundary node number like variable KNOLG ?
The administrator has disabled public write access.
Moderators: pham

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