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

TOPIC: Read information from a file

Re:Read information from a file 13 years 5 months ago #1655

  • kroptia
  • kroptia's Avatar
First, I tried with KNOLG, I copy/paste the example from the pdf to test if my function use all boundary nodes(only water) :
DO IPTFR=1,NPTFR
PRINT *,KNOGL(KNOLG(IPTFR))
ENDDO

and I got this error:
PRINT *,KNOGL(KNOLG(IPTFR))
1
Error: Array index at (1) must be of INTEGER type, found DERIVED


So I tried with only PRINT *,KNOLG(IPTFR), and I still have an error:
PRINT *,KNOLG(IPTFR)
1
Error: Data transfer element at (1) cannot have POINTER components

I absolutely have no idea where is the problem(I added the following lines at beginning:
USE BIEF
      USE DECLARATIONS_TOMAWAC ,ONLY : KNOGL
      IMPLICIT NONE
      TYPE(BIEF_OBJ), POINTER :: KNOLG




For the second help, from Hervouet, I tried your solution, and like for the first I wanted to write all the boundary numbers, but I don't have all of them (1 to 777), although I do not take into account solid boundary. And it changed with the number of parallel processors.

I mean, for example, I choose 4 processors, then I write the index, with the following source code:
DO IPTFR=1,NPTFR
              PRINT *,'BOUNDARY_COLOUR=',(BOUNDARY_COLOUR%I(IPTFR))
ENDDO

And I have something like
BOUNDARY_COLOUR=400
BOUNDARY_COLOUR=401
BOUNDARY_COLOUR=402
[...]
BOUNDARY_COLOUR=571
BOUNDARY_COLOUR=740
BOUNDARY_COLOUR=741
[...]
BOUNDARY_COLOUR=760

So, here some numbers are missing (1 to 399, 572 to 749 and 761 to 777).

The most weird thing is that when I choose 5 processors, those numbers change, I have something like
BOUNDARY_COLOUR=387
BOUNDARY_COLOUR=388
[...]
BOUNDARY_COLOUR=517
BOUNDARY_COLOUR=729
[...]
BOUNDARY_COLOUR=744
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1657

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
One precision about the second test.
In the listing of computation, it's impossible to send all the processors messages on screen. There is a modification to send the message of slaves processors to separate files.
Try to run with the -t option (no delete of the temporary directory) and have a look onto the files name PE0000X-0000X.log. At the beginning you should see SLAVE processor N°
And in the main log file you should finf MASTER processor

Regards
Christophe
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1659

  • jmhervouet
  • jmhervouet's Avatar
Hello,

What you see is normal, not all the boundary points are in a sub-domain, so when you do a loop on all (local) boundary points, you do not see all your (global) boundary points, but only those in sub-domain 0 (some compilers will print all sub-domains alltogether in the same listing if you use print*, but it is not your case here, we use WRITE(LU,*) with LU=6 and only the first processor is kept for the listing, by changing LU of others). This is why you have holes in the list and why I suggested to do a loop and programming the case where a point is not in a given sub-domain.

In scalar mode you have BOUNDARY_COLOUR%I(K)=K


If you want to use KNOLG and KNOGL, they are in the BIEF_MESH structure, so for example :

MESH%KNOLG%I(...)
and
MESH%KNOGL%I(...)

but generally boundary_colour is enough for adaptation to paralellism.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1667

  • kroptia
  • kroptia's Avatar
I understand now why it wasn't write on the screen.
So, I checked the LOG file in the temporary directory, and I got the right number (all liquid boundary numbers).

I tried to simulate a simple wave propagation (data from a file), but I got a weird result.
First, I run the simulation with the keyword PARALLEL PROCESSORS = 1, and I got exactly what I want (cf. good.png from the zip file).

Then, when I changed the keyword as PARALLEL PROCESSORS = 2, my result is wrong.I mean that I created a boundary conditions in "south corners" (as you can see in good.png from the zip file), but now I have one condition in South-West and one in North-Est(as you can see in bad.png from the zip file).

I just changed the keyword, nothing else.
I also printed on the screen the number of nodes (with BOUNDARY_COLOUR%I(K)), and it showed me the good numerotation.

File Attachment:

File Name: forum_help-20110531.zip
File Size: 7550
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1668

  • jmhervouet
  • jmhervouet's Avatar
Hello,

It is probably what you do in subroutine bord. You must keep in mind that the same subroutine will work for every processor, code must be written so that a given point may not be in the (local) domain. I can tell you if it is OK if you show me what works in scalar mode and what you have done in parallel mode.

For implementation you can use the test :

IF(NCSIZE.GT.1) THEN
parallel code
ELSE
scalar code
ENDIF

with best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1698

  • kroptia
  • kroptia's Avatar
Thank you for your help, I fixed it. It was my bad, because when I calculated the variance density directional spectrum F, I didn't use the right nodes.
It's ok now.

But I have another question, concerning options in the steering file.
I got 2 cases, a good one (but not real), and a bad one (real). I explain myself.

I want to simulate a wave propagation, and the boundary conditions are read from a file.
(There is no problem for the moment)
Each records are read every 3 hours (it's from the noaa grib).

So, when I enter parameters in the steering file, I choose :
TIME STEP = 3600
NUMBER OF STEP =  240

And finally, in my fortran file, I read informations

File Attachment:

File Name: aide_forum-20110610.zip
File Size: 881626
every 3x3600 seconds.

The problem is that I don't have a real 'wave propagation', as you can see in my zip file (bad.zip + profil_bad.zip).



And when I change parameters like that (for example):
TIME STEP = [b]100[/b]
NUMBER OF STEP =  240

I have a 'real' propagation (as you can see in the good.zip and profil_good.zip files).

Could you explain it to me please?
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1699

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
I'm not sure but I think you should make difference between time step of computation which should probably be small (like 100) and the Time step of your boundary condition which depend on your data.
For the boundary condition, you could generate a temporal interpolation to manage the value between 2 boundary time step ...

Regards
Christophe
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1701

  • kroptia
  • kroptia's Avatar
I'm not sure to understand, the Time step of my data should not be the same of the time step of computation? So, how could I know if I choose the good time step of computation ?

I'll try to do an interpolation for my boundary,
thank you
The administrator has disabled public write access.

Re:Read information from a file 13 years 5 months ago #1702

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
The good time step for your computation depend of your model (mesh size in particular).
If 100s allow you to compute a real propagation, keep this value for your simulation

Regards
Christophe
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: tfouquet

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