[petsc-dev] Parmetis test ex152.c fails on 64 bit integers

Jed Brown jed at jedbrown.org
Wed Sep 10 18:56:47 CDT 2014


Barry Smith <bsmith at mcs.anl.gov> writes:

>   Jed,
>
>     This test is failing on me with —with-64-bit-indices.  It seems to
>     be reading binary from some data file so I suspect the data file
>     is wrong for 64 bit integers but the example does no test on
>     integer size.

Yes, it uses sizeof(idx_t) when reading, rather than whatever size
appears in the file.  Moreover, it does no byte swapping, so even if the
sizes match, it must be wrong on a big-endian machine.  Unfortunately,
the PETSc binary format doesn't have the ability to match precision, so
switching to a PetscViewer would only fix the endianness problem.

The easiest option is to disable the test unless the types and
endianness matches.

>    Is this test suppose to work for —with-64-bit-indices or should it
>    have proper guards to not crash with huge mallocs in that case?
>
>    Thanks
>
>     Barry
>
> static const char help[] = "Test ParMETIS handling of negative
> weights.\n\n";
>
> /* Test contributed by John Fettig */
>
> /*
>  * This file implements two tests for a bug reported in
>  ParMETIS. These tests are not expected to pass without the *
>  following two patches.  * *
>  http://petsc.cs.iit.edu/petsc/externalpackages/parmetis-4.0.2/rev/2dd2eae596ac
>  *
>  http://petsc.cs.iit.edu/petsc/externalpackages/parmetis-4.0.2/rev/1c2b9fe39201
>  * * The bug was reported upstream, but has received no action so far.
>  * * http://glaros.dtc.umn.edu/gkhome/node/837 * */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140910/988a574e/attachment.sig>


More information about the petsc-dev mailing list