[petsc-dev] plex failures for 64 bit indices

Matthew Knepley knepley at gmail.com
Mon Dec 2 20:44:04 CST 2013


On Mon, Dec 2, 2013 at 8:20 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

What is our preferred fix for this? Do I just disable this code for 64-bit
indices?

   Matt

/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:96:38: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d\n", &cone[0], &cone[1]);CHKERRQ(snum !=
> numCorners);
>                            ~~        ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:96:48: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d\n", &cone[0], &cone[1]);CHKERRQ(snum !=
> numCorners);
>                               ~~               ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:101:41: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                            ~~           ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:101:51: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                               ~~                  ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:101:61: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                                  ~~                         ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:106:44: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                            ~~              ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:106:54: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                               ~~                     ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:106:64: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                  ~~                            ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:106:74: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                     ~~
> ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:111:44: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                            ~~              ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:111:54: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                               ~~                     ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:111:64: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                  ~~                            ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:111:74: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                     ~~
> ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:56: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                            ~~                          ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:66: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                               ~~                                 ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:76: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                  ~~
>  ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:86: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                     ~~
>           ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:96: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                        ~~
>                      ^~~~~~~~
>                                        %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:106: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                           ~~
>                               ^~~~~~~~
>                                           %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:116: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                              ~~
>                                          ^~~~~~~~
>                                              %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:116:126: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                                 ~~
>                                                   ^~~~~~~~
>                                                 %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:138:38: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d\n", &cone[0], &cone[1]);CHKERRQ(snum !=
> numCorners);
>                            ~~        ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:138:48: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d\n", &cone[0], &cone[1]);CHKERRQ(snum !=
> numCorners);
>                               ~~               ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:143:41: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                            ~~           ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:143:51: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                               ~~                  ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:143:61: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d\n", &cone[0], &cone[1],
> &cone[2]);CHKERRQ(snum != numCorners);
>                                  ~~                         ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:148:44: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                            ~~              ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:148:54: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                               ~~                     ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:148:64: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                  ~~                            ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:148:74: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                     ~~
> ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:153:44: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                            ~~              ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:153:54: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                               ~~                     ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:153:64: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                  ~~                            ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:153:74: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d\n", &cone[0], &cone[1], &cone[2],
> &cone[3]);CHKERRQ(snum != numCorners);
>                                     ~~
> ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:56: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                            ~~                          ^~~~~~~~
>                            %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:66: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                               ~~                                 ^~~~~~~~
>                               %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:76: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                  ~~
>  ^~~~~~~~
>                                  %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:86: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                     ~~
>           ^~~~~~~~
>                                     %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:96: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                        ~~
>                      ^~~~~~~~
>                                        %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:106: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                           ~~
>                               ^~~~~~~~
>                                           %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:116: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                              ~~
>                                          ^~~~~~~~
>                                              %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:158:126: warning:
> format specifies type 'int *' but the argument has type 'PetscInt *' (aka
> 'long long *') [-Wformat]
>         snum = fscanf(fd, "%d %d %d %d %d %d %d %d\n", &cone[0], &cone[1],
> &cone[2], &cone[3], &cone[4], &cone[5], &cone[6], &cone[7]);CHKERRQ(snum !=
> numCorners);
>                                                 ~~
>                                                   ^~~~~~~~
>                                                 %lld
> /Users/barrysmith/Src/PETSc/src/dm/impls/plex/plexgmsh.c:171:20: warning:
> argument type 'PetscInt *' (aka 'long long *') doesn't match specified
> 'MPI' type tag that requires 'int *' [-Wtype-safety]
>   ierr = MPI_Bcast(&dim, 1, MPI_INT, 0, comm);CHKERRQ(ierr);
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131202/6aebca58/attachment.html>


More information about the petsc-dev mailing list