[petsc-users] Issue with DMPlexRestoreCone from Fortran

Matthew Knepley knepley at gmail.com
Wed Jul 3 08:18:05 CDT 2019


On Wed, Jul 3, 2019 at 7:38 AM Fabian.Jakub via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear Matt, Dear Petsc
>
> After my recent pull of petsc master I encounter test fails that use
> dmplex meshes.
>
> I attached a simple script to show an issue where DMPlexRestoreCone
> mangles the cone relationships in the DM.
>
> The behaviour happens with gcc 7.4.0 aswell as icc 19.0.3.199
> @ current petsc/master d3dc048301fdb3e4c282b528e7b28910551cfe13
>
> We recently had a system update and I am not 100% sure if this is some
> weird stuff going on at my end or if this is indeed Plex related or if I
> should not call Restore in the inner loop.
>
> Anyway, I would be most grateful if you could try to reproduce the error
> and hint me towards a solution.
>

Hi Fabian,

I think it might be your system update. Seems to run fine for me:

master *:~/Downloads/tmp$ ./plex_prism

 Cone           0 :           1           2           3           4
  5

 Cone           1 :           6           7           8

 Cone           2 :          12          13          14

 Cone           3 :           7           9          11          13

 Cone           4 :           6           9          10          12

 Cone           5 :           8          10          11          14

 Cone           6 :          15          16

 Cone           7 :          15          17

 Cone           8 :          16          17

 Cone           9 :          15          18

 Cone          10 :          16          19

 Cone          11 :          17          20

 Cone          12 :          18          19

 Cone          13 :          18          20

 Cone          14 :          19          20

 Cone          15 :

 Cone          16 :

 Cone          17 :

 Cone          18 :

 Cone          19 :

 Cone          20 :

master *:~/Downloads/tmp$ ./plex_prism -show_plex ::ascii_info_detail

DM Object: testplex 1 MPI processes

  type: plex

testplex in 3 dimensions:

Supports:

[0] Max support size: 3

[0]: 1 ----> 0

[0]: 2 ----> 0

[0]: 3 ----> 0

[0]: 4 ----> 0

[0]: 5 ----> 0

[0]: 6 ----> 1

[0]: 6 ----> 4

[0]: 7 ----> 1

[0]: 7 ----> 3

[0]: 8 ----> 1

[0]: 8 ----> 5

[0]: 9 ----> 3

[0]: 9 ----> 4

[0]: 10 ----> 4

[0]: 10 ----> 5

[0]: 11 ----> 3

[0]: 11 ----> 5

[0]: 12 ----> 2

[0]: 12 ----> 4

[0]: 13 ----> 2

[0]: 13 ----> 3

[0]: 14 ----> 2

[0]: 14 ----> 5

[0]: 15 ----> 6

[0]: 15 ----> 7

[0]: 15 ----> 9

[0]: 16 ----> 6

[0]: 16 ----> 8

[0]: 16 ----> 10

[0]: 17 ----> 7

[0]: 17 ----> 8

[0]: 17 ----> 11

[0]: 18 ----> 9

[0]: 18 ----> 12

[0]: 18 ----> 13

[0]: 19 ----> 10

[0]: 19 ----> 12

[0]: 19 ----> 14

[0]: 20 ----> 11

[0]: 20 ----> 13

[0]: 20 ----> 14

Cones:

[0] Max cone size: 5

[0]: 0 <---- 1 (0)

[0]: 0 <---- 2 (0)

[0]: 0 <---- 3 (0)

[0]: 0 <---- 4 (0)

[0]: 0 <---- 5 (0)

[0]: 1 <---- 6 (0)

[0]: 1 <---- 7 (0)

[0]: 1 <---- 8 (0)

[0]: 2 <---- 12 (0)

[0]: 2 <---- 13 (0)

[0]: 2 <---- 14 (0)

[0]: 3 <---- 7 (0)

[0]: 3 <---- 9 (0)

[0]: 3 <---- 11 (0)

[0]: 3 <---- 13 (0)

[0]: 4 <---- 6 (0)

[0]: 4 <---- 9 (0)

[0]: 4 <---- 10 (0)

[0]: 4 <---- 12 (0)

[0]: 5 <---- 8 (0)

[0]: 5 <---- 10 (0)

[0]: 5 <---- 11 (0)

[0]: 5 <---- 14 (0)

[0]: 6 <---- 15 (0)

[0]: 6 <---- 16 (0)

[0]: 7 <---- 15 (0)

[0]: 7 <---- 17 (0)

[0]: 8 <---- 16 (0)

[0]: 8 <---- 17 (0)

[0]: 9 <---- 15 (0)

[0]: 9 <---- 18 (0)

[0]: 10 <---- 16 (0)

[0]: 10 <---- 19 (0)

[0]: 11 <---- 17 (0)

[0]: 11 <---- 20 (0)

[0]: 12 <---- 18 (0)

[0]: 12 <---- 19 (0)

[0]: 13 <---- 18 (0)

[0]: 13 <---- 20 (0)

[0]: 14 <---- 19 (0)

[0]: 14 <---- 20 (0)

coordinates with 1 fields

  field 0 with 3 components

Process 0:

  (   0) dim  0 offset   0

  (   1) dim  0 offset   0

  (   2) dim  0 offset   0

  (   3) dim  0 offset   0

  (   4) dim  0 offset   0

  (   5) dim  0 offset   0

  (   6) dim  0 offset   0

  (   7) dim  0 offset   0

  (   8) dim  0 offset   0

  (   9) dim  0 offset   0

  (  10) dim  0 offset   0

  (  11) dim  0 offset   0

  (  12) dim  0 offset   0

  (  13) dim  0 offset   0

  (  14) dim  0 offset   0

  (  15) dim  3 offset   0 0. 0. 0.

  (  16) dim  3 offset   3 0. 2. 0.

  (  17) dim  3 offset   6 2. 1. 0.

  (  18) dim  3 offset   9 0. 0. 1.

  (  19) dim  3 offset  12 0. 2. 1.

  (  20) dim  3 offset  15 2. 1. 1.

 Cone           0 :           1           2           3           4
  5

 Cone           1 :           6           7           8

 Cone           2 :          12          13          14

 Cone           3 :           7           9          11          13

 Cone           4 :           6           9          10          12

 Cone           5 :           8          10          11          14

 Cone           6 :          15          16

 Cone           7 :          15          17

 Cone           8 :          16          17

 Cone           9 :          15          18

 Cone          10 :          16          19

 Cone          11 :          17          20

 Cone          12 :          18          19

 Cone          13 :          18          20

 Cone          14 :          19          20

 Cone          15 :

 Cone          16 :

 Cone          17 :

 Cone          18 :

 Cone          19 :

 Cone          20 :

DM Object: testplex 1 MPI processes

  type: plex

testplex in 3 dimensions:

Supports:

[0] Max support size: 3

[0]: 1 ----> 0

[0]: 2 ----> 0

[0]: 3 ----> 0

[0]: 4 ----> 0

[0]: 5 ----> 0

[0]: 6 ----> 1

[0]: 6 ----> 4

[0]: 7 ----> 1

[0]: 7 ----> 3

[0]: 8 ----> 1

[0]: 8 ----> 5

[0]: 9 ----> 3

[0]: 9 ----> 4

[0]: 10 ----> 4

[0]: 10 ----> 5

[0]: 11 ----> 3

[0]: 11 ----> 5

[0]: 12 ----> 2

[0]: 12 ----> 4

[0]: 13 ----> 2

[0]: 13 ----> 3

[0]: 14 ----> 2

[0]: 14 ----> 5

[0]: 15 ----> 6

[0]: 15 ----> 7

[0]: 15 ----> 9

[0]: 16 ----> 6

[0]: 16 ----> 8

[0]: 16 ----> 10

[0]: 17 ----> 7

[0]: 17 ----> 8

[0]: 17 ----> 11

[0]: 18 ----> 9

[0]: 18 ----> 12

[0]: 18 ----> 13

[0]: 19 ----> 10

[0]: 19 ----> 12

[0]: 19 ----> 14

[0]: 20 ----> 11

[0]: 20 ----> 13

[0]: 20 ----> 14

Cones:

[0] Max cone size: 5

[0]: 0 <---- 1 (0)

[0]: 0 <---- 2 (0)

[0]: 0 <---- 3 (0)

[0]: 0 <---- 4 (0)

[0]: 0 <---- 5 (0)

[0]: 1 <---- 6 (0)

[0]: 1 <---- 7 (0)

[0]: 1 <---- 8 (0)

[0]: 2 <---- 12 (0)

[0]: 2 <---- 13 (0)

[0]: 2 <---- 14 (0)

[0]: 3 <---- 7 (0)

[0]: 3 <---- 9 (0)

[0]: 3 <---- 11 (0)

[0]: 3 <---- 13 (0)

[0]: 4 <---- 6 (0)

[0]: 4 <---- 9 (0)

[0]: 4 <---- 10 (0)

[0]: 4 <---- 12 (0)

[0]: 5 <---- 8 (0)

[0]: 5 <---- 10 (0)

[0]: 5 <---- 11 (0)

[0]: 5 <---- 14 (0)

[0]: 6 <---- 15 (0)

[0]: 6 <---- 16 (0)

[0]: 7 <---- 15 (0)

[0]: 7 <---- 17 (0)

[0]: 8 <---- 16 (0)

[0]: 8 <---- 17 (0)

[0]: 9 <---- 15 (0)

[0]: 9 <---- 18 (0)

[0]: 10 <---- 16 (0)

[0]: 10 <---- 19 (0)

[0]: 11 <---- 17 (0)

[0]: 11 <---- 20 (0)

[0]: 12 <---- 18 (0)

[0]: 12 <---- 19 (0)

[0]: 13 <---- 18 (0)

[0]: 13 <---- 20 (0)

[0]: 14 <---- 19 (0)

[0]: 14 <---- 20 (0)

coordinates with 1 fields

  field 0 with 3 components

Process 0:

  (   0) dim  0 offset   0

  (   1) dim  0 offset   0

  (   2) dim  0 offset   0

  (   3) dim  0 offset   0

  (   4) dim  0 offset   0

  (   5) dim  0 offset   0

  (   6) dim  0 offset   0

  (   7) dim  0 offset   0

  (   8) dim  0 offset   0

  (   9) dim  0 offset   0

  (  10) dim  0 offset   0

  (  11) dim  0 offset   0

  (  12) dim  0 offset   0

  (  13) dim  0 offset   0

  (  14) dim  0 offset   0

  (  15) dim  3 offset   0 0. 0. 0.

  (  16) dim  3 offset   3 0. 2. 0.

  (  17) dim  3 offset   6 2. 1. 0.

  (  18) dim  3 offset   9 0. 0. 1.

  (  19) dim  3 offset  12 0. 2. 1.

  (  20) dim  3 offset  15 2. 1. 1.


  Thanks,


     Matt


> As always, many many thanks!
>
> Fabian
>
> P.S. here the output of
> make run
>
> and note the cones, the second time they are outputted...
>
> ./plex_prism -show_plex ::ascii_info_detail
> DM Object: testplex 1 MPI processes
>   type: plex
> testplex in 3 dimensions:
> Supports:
> [0] Max support size: 3
> [0]: 1 ----> 0
> [0]: 2 ----> 0
> [0]: 3 ----> 0
> [0]: 4 ----> 0
> [0]: 5 ----> 0
> [0]: 6 ----> 1
> [0]: 6 ----> 4
> [0]: 7 ----> 1
> [0]: 7 ----> 3
> [0]: 8 ----> 1
> [0]: 8 ----> 5
> [0]: 9 ----> 3
> [0]: 9 ----> 4
> [0]: 10 ----> 4
> [0]: 10 ----> 5
> [0]: 11 ----> 3
> [0]: 11 ----> 5
> [0]: 12 ----> 2
> [0]: 12 ----> 4
> [0]: 13 ----> 2
> [0]: 13 ----> 3
> [0]: 14 ----> 2
> [0]: 14 ----> 5
> [0]: 15 ----> 6
> [0]: 15 ----> 7
> [0]: 15 ----> 9
> [0]: 16 ----> 6
> [0]: 16 ----> 8
> [0]: 16 ----> 10
> [0]: 17 ----> 7
> [0]: 17 ----> 8
> [0]: 17 ----> 11
> [0]: 18 ----> 9
> [0]: 18 ----> 12
> [0]: 18 ----> 13
> [0]: 19 ----> 10
> [0]: 19 ----> 12
> [0]: 19 ----> 14
> [0]: 20 ----> 11
> [0]: 20 ----> 13
> [0]: 20 ----> 14
> Cones:
> [0] Max cone size: 5
> [0]: 0 <---- 1 (0)
> [0]: 0 <---- 2 (0)
> [0]: 0 <---- 3 (0)
> [0]: 0 <---- 4 (0)
> [0]: 0 <---- 5 (0)
> [0]: 1 <---- 6 (0)
> [0]: 1 <---- 7 (0)
> [0]: 1 <---- 8 (0)
> [0]: 2 <---- 12 (0)
> [0]: 2 <---- 13 (0)
> [0]: 2 <---- 14 (0)
> [0]: 3 <---- 7 (0)
> [0]: 3 <---- 9 (0)
> [0]: 3 <---- 11 (0)
> [0]: 3 <---- 13 (0)
> [0]: 4 <---- 6 (0)
> [0]: 4 <---- 9 (0)
> [0]: 4 <---- 10 (0)
> [0]: 4 <---- 12 (0)
> [0]: 5 <---- 8 (0)
> [0]: 5 <---- 10 (0)
> [0]: 5 <---- 11 (0)
> [0]: 5 <---- 14 (0)
> [0]: 6 <---- 15 (0)
> [0]: 6 <---- 16 (0)
> [0]: 7 <---- 15 (0)
> [0]: 7 <---- 17 (0)
> [0]: 8 <---- 16 (0)
> [0]: 8 <---- 17 (0)
> [0]: 9 <---- 15 (0)
> [0]: 9 <---- 18 (0)
> [0]: 10 <---- 16 (0)
> [0]: 10 <---- 19 (0)
> [0]: 11 <---- 17 (0)
> [0]: 11 <---- 20 (0)
> [0]: 12 <---- 18 (0)
> [0]: 12 <---- 19 (0)
> [0]: 13 <---- 18 (0)
> [0]: 13 <---- 20 (0)
> [0]: 14 <---- 19 (0)
> [0]: 14 <---- 20 (0)
> coordinates with 1 fields
>   field 0 with 3 components
> Process 0:
>   (   0) dim  0 offset   0
>   (   1) dim  0 offset   0
>   (   2) dim  0 offset   0
>   (   3) dim  0 offset   0
>   (   4) dim  0 offset   0
>   (   5) dim  0 offset   0
>   (   6) dim  0 offset   0
>   (   7) dim  0 offset   0
>   (   8) dim  0 offset   0
>   (   9) dim  0 offset   0
>   (  10) dim  0 offset   0
>   (  11) dim  0 offset   0
>   (  12) dim  0 offset   0
>   (  13) dim  0 offset   0
>   (  14) dim  0 offset   0
>   (  15) dim  3 offset   0 0. 0. 0.
>   (  16) dim  3 offset   3 0. 2. 0.
>   (  17) dim  3 offset   6 2. 1. 0.
>   (  18) dim  3 offset   9 0. 0. 1.
>   (  19) dim  3 offset  12 0. 2. 1.
>   (  20) dim  3 offset  15 2. 1. 1.
>
>
>
>
>
>
>
>
>
> DM Object: testplex 1 MPI processes
>   type: plex
> testplex in 3 dimensions:
> Supports:
> [0] Max support size: 3
> [0]: 1 ----> 0
> [0]: 2 ----> 0
> [0]: 3 ----> 0
> [0]: 4 ----> 0
> [0]: 5 ----> 0
> [0]: 6 ----> 1
> [0]: 6 ----> 4
> [0]: 7 ----> 1
> [0]: 7 ----> 3
> [0]: 8 ----> 1
> [0]: 8 ----> 5
> [0]: 9 ----> 3
> [0]: 9 ----> 4
> [0]: 10 ----> 4
> [0]: 10 ----> 5
> [0]: 11 ----> 3
> [0]: 11 ----> 5
> [0]: 12 ----> 2
> [0]: 12 ----> 4
> [0]: 13 ----> 2
> [0]: 13 ----> 3
> [0]: 14 ----> 2
> [0]: 14 ----> 5
> [0]: 15 ----> 6
> [0]: 15 ----> 7
> [0]: 15 ----> 9
> [0]: 16 ----> 6
> [0]: 16 ----> 8
> [0]: 16 ----> 10
> [0]: 17 ----> 7
> [0]: 17 ----> 8
> [0]: 17 ----> 11
> [0]: 18 ----> 9
> [0]: 18 ----> 12
> [0]: 18 ----> 13
> [0]: 19 ----> 10
> [0]: 19 ----> 12
> [0]: 19 ----> 14
> [0]: 20 ----> 11
> [0]: 20 ----> 13
> [0]: 20 ----> 14
> Cones:
> [0] Max cone size: 5
> [0]: 0 <---- 0 (0)
> [0]: 0 <---- 0 (0)
> [0]: 0 <---- 3 (0)
> [0]: 0 <---- 4 (0)
> [0]: 0 <---- 5 (0)
> [0]: 1 <---- 0 (0)
> [0]: 1 <---- 0 (0)
> [0]: 1 <---- 8 (0)
> [0]: 2 <---- 0 (0)
> [0]: 2 <---- 0 (0)
> [0]: 2 <---- 14 (0)
> [0]: 3 <---- 0 (0)
> [0]: 3 <---- 0 (0)
> [0]: 3 <---- 11 (0)
> [0]: 3 <---- 13 (0)
> [0]: 4 <---- 0 (0)
> [0]: 4 <---- 0 (0)
> [0]: 4 <---- 10 (0)
> [0]: 4 <---- 12 (0)
> [0]: 5 <---- 0 (0)
> [0]: 5 <---- 0 (0)
> [0]: 5 <---- 11 (0)
> [0]: 5 <---- 14 (0)
> [0]: 6 <---- 0 (0)
> [0]: 6 <---- 0 (0)
> [0]: 7 <---- 0 (0)
> [0]: 7 <---- 0 (0)
> [0]: 8 <---- 0 (0)
> [0]: 8 <---- 0 (0)
> [0]: 9 <---- 0 (0)
> [0]: 9 <---- 0 (0)
> [0]: 10 <---- 0 (0)
> [0]: 10 <---- 0 (0)
> [0]: 11 <---- 0 (0)
> [0]: 11 <---- 0 (0)
> [0]: 12 <---- 0 (0)
> [0]: 12 <---- 0 (0)
> [0]: 13 <---- 0 (0)
> [0]: 13 <---- 0 (0)
> [0]: 14 <---- 0 (0)
> [0]: 14 <---- 0 (0)
> coordinates with 1 fields
>   field 0 with 3 components
> Process 0:
>   (   0) dim  0 offset   0
>   (   1) dim  0 offset   0
>   (   2) dim  0 offset   0
>   (   3) dim  0 offset   0
>   (   4) dim  0 offset   0
>   (   5) dim  0 offset   0
>   (   6) dim  0 offset   0
>   (   7) dim  0 offset   0
>   (   8) dim  0 offset   0
>   (   9) dim  0 offset   0
>   (  10) dim  0 offset   0
>   (  11) dim  0 offset   0
>   (  12) dim  0 offset   0
>   (  13) dim  0 offset   0
>   (  14) dim  0 offset   0
>   (  15) dim  3 offset   0 0. 0. 0.
>   (  16) dim  3 offset   3 0. 2. 0.
>   (  17) dim  3 offset   6 2. 1. 0.
>   (  18) dim  3 offset   9 0. 0. 1.
>   (  19) dim  3 offset  12 0. 2. 1.
>   (  20) dim  3 offset  15 2. 1. 1.
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190703/931ea4f9/attachment-0001.html>


More information about the petsc-users mailing list