Problem with history points

349 views
Skip to first unread message

rene gagne

unread,
May 6, 2021, 10:48:05 AM5/6/21
to Nek5000
Hello Nek's,

Thank you for accepting me into the group
I am using Nek5000 in a 3D box with a passive scalar and I would like to get the values of my fields at some points.
I saw that for that we could call the hpts() routine in the userchk subroutine having first created a "usercase".his file as follows: the first line contains the number of points and then each line contains the coordinates of a point.
However I have the following problem: Nek does not fill the file for all the points. That is, the number of lines following the coordinates of the points is strictly inferior to the number of points. For some sets of points, the file does not seem to fill at all.
Moreover, I do not get any error during the execution of the code (using nekmpi on 24 processors). Part of the output is:
 dump history points
 reading history points
 found           48  points


I attach my .his file. My box is [-pi, pi]^3 ([-1, 1]^3 re-sized in the .usr). Parameter lhis=100 in the SIZE file.

Thank you very much,

Kind regards,

René



####################### .his file ##########################
48
 -1.0 -1.0 -1.0
 -1.0 -1.0 0.0
 -1.0 -1.0 1.0
 -1.0 -0.33333 -1.0
 -1.0 -0.33333 0.0
 -1.0 -0.33333 1.0
 -1.0 0.33333 -1.0
 -1.0 0.33333 0.0
 -1.0 0.33333 1.0
 -1.0 1.0 -1.0
 -1.0 1.0 0.0
 -1.0 1.0 1.0
 -0.33333 -1.0 -1.0
 -0.33333 -1.0 0.0
 -0.33333 -1.0 1.0
 -0.33333 -0.33333 -1.0
 -0.33333 -0.33333 0.0
 -0.33333 -0.33333 1.0
 -0.33333 0.33333 -1.0
 -0.33333 0.33333 0.0
 -0.33333 0.33333 1.0
 -0.33333 1.0 -1.0
 -0.33333 1.0 0.0
 -0.33333 1.0 1.0
 0.33333 -1.0 -1.0
 0.33333 -1.0 0.0
 0.33333 -1.0 1.0
 0.33333 -0.33333 -1.0
 0.33333 -0.33333 0.0
 0.33333 -0.33333 1.0
 0.33333 0.33333 -1.0
 0.33333 0.33333 0.0
 0.33333 0.33333 1.0
 0.33333 1.0 -1.0
 0.33333 1.0 0.0
 0.33333 1.0 1.0
 1.0 -1.0 -1.0
 1.0 -1.0 0.0
 1.0 -1.0 1.0
 1.0 -0.33333 -1.0
 1.0 -0.33333 0.0
 1.0 -0.33333 1.0
 1.0 0.33333 -1.0
 1.0 0.33333 0.0
 1.0 0.33333 1.0
 1.0 1.0 -1.0
 1.0 1.0 0.0
 1.0 1.0 1.0

################ End of file #######################

René Gagne

unread,
May 16, 2021, 3:49:46 AM5/16/21
to Nek5000
Hi Nek's,

I'm sorry to send again this message : has anyone an idea of what append ?

Many thanks,

René
--
You received this message because you are subscribed to a topic in the Google Groups "Nek5000" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nek5000/U6Aj53GG7DA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/f90ad2da-a195-4123-8222-2e5cd72b70adn%40googlegroups.com.

Fischer, Paul

unread,
May 16, 2021, 10:32:37 AM5/16/21
to René Gagne, Nek5000
Dear Rene',

Please see the recent Nek5000 post re. history line of points.

Regarding your test, a couple of questions:

If you "grep xyz logfile" what is the output?

How does it compare to your list of history points?

Best,
Paul Fischer


From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of René Gagne <gren...@gmail.com>
Sent: Sunday, May 16, 2021 2:49 AM
To: Nek5000 <nek...@googlegroups.com>
Subject: Re: [nek5000] Problem with history points
 
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/a6940dc8-9aaf-7d9a-065a-37dd1740070c%40gmail.com.

cattn...@googlemail.com

unread,
Jun 28, 2021, 3:21:22 PM6/28/21
to Nek5000
HI everyone,

I have encountered the same error.  I am doing this in postprocessing mode. When I tried it with 360k points (lhis=360001) I only get around 150k extra lines in my file. Therefore for some points the lines are not filled. When I tried 360 points with lhis=361 and lhis=1000 the file does not fill at all.  The hpts() part of the output is also just:
dump history points
 reading history points
 found           360  points

and no error at all.

Here is the the output you suggested:

  1.1102E-16  1.1102E-16  1.3323E-15  1.1102E-16  5.5511E-17  8.8818E-16 xyz repair 1
  1.1102E-16  1.1102E-16  1.3323E-15  1.9781E-16  1.9781E-16  1.6950E-15 xyz repair 2
  1.1102E-16  1.1102E-16  8.8818E-16  1.5585E-16  1.5585E-16  1.6624E-15 xyz repair 3
  5.5511E-17  5.5511E-17  2.2204E-16  5.5511E-17  5.5511E-17  2.2204E-16 xyz repair 4
  7.1054E-15  7.1054E-15  2.8422E-14  3.5527E-15  3.5527E-15  1.4211E-14 xyz repair 1
  7.1054E-15  7.1054E-15  2.8422E-14  1.5558E-14  9.5482E-15  3.9046E-14 xyz repair 2
  7.1054E-15  7.1054E-15  2.8422E-14  9.4772E-15  8.6601E-15  4.0943E-14 xyz repair 3
  3.5527E-15  1.7764E-15  1.4211E-14  3.5527E-15  1.7764E-15  1.4211E-14 xyz repair 4
  0.0000E+00  5.5511E-17  2.2204E-16  0.0000E+00  1.3878E-17  2.2204E-16 xyz repair 1
  0.0000E+00  5.5511E-17  2.2204E-16  0.0000E+00  5.5511E-17  4.1561E-16 xyz repair 2
  0.0000E+00  5.5511E-17  2.2204E-16  0.0000E+00  1.0390E-16  4.1561E-16 xyz repair 3
  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00 xyz repair 4
  3.5527E-15  1.7764E-15  1.4211E-14  1.7764E-15  1.7764E-15  1.4211E-14 xyz repair 1
  3.5527E-15  3.5527E-15  1.4211E-14  4.9873E-15  4.7386E-15  3.3615E-14 xyz repair 2
 xyz min   -0.50000     -0.50000      -5.0000
 xyz max    0.50000      0.50000       0.0000
  3.5527E-15  3.5527E-15  1.4211E-14  6.6498E-15  5.0562E-15  3.3929E-14 xyz repair 3
  1.7764E-15  1.7764E-15  7.1054E-15  1.7764E-15  1.7764E-15  7.1054E-15 xyz repair 4
 xyz min    -20.000      -20.000       0.0000
 xyz max     20.000       20.000       75.000

If I may ask, I did not quite understand what I should compare with the list of history points.

Best regards

Cat

cattn...@googlemail.com

unread,
Jun 28, 2021, 4:30:44 PM6/28/21
to Nek5000
Hi again,

I found the reason why it isn't working. In core/postpro.f in the 
subroutine hpts after "call hpts_out(fieldout,nflds,nfldm,npoints,nbuff)" I added:

  if (nid.eq.0) close(50)

Is there a better place to add this line? I don't know if I broke something by doing that or even why I had to add this line. At least for postprocessing mode this works. I hope this helps anyone else who encounters this problem. 

Best regards

Cat

stek...@gmail.com

unread,
Aug 9, 2022, 5:28:56 AM8/9/22
to Nek5000
Hi, I also encountered the problem, where some of my hpts don't get written to disk after a run ends. I added

if(nid.eq.0.and.istep.eq.nsteps) close(50)

to the end of userchk. I personally wouldn't add this to the hpts routine directly, so the file doesn't get opened and closed all the time. Maybe one of the developers can point out an appropriate place to add this into the code.

Thanks!
Reply all
Reply to author
Forward
0 new messages