[petsc-users] PetscTableCreateHashSize

Jed Brown jed at jedbrown.org
Mon Jan 9 13:42:49 CST 2017


Satish Balay <balay at mcs.anl.gov> writes:

> We can add more entries to the lookup. The stack below looks
> incomplete. Which routine is calling PetscTableCreateHashSize() with
> this big size?
>
> Satish
>
> -------
> $ git diff
> diff --git a/src/sys/utils/ctable.c b/src/sys/utils/ctable.c
> index cd64284..761a2c6 100644
> --- a/src/sys/utils/ctable.c
> +++ b/src/sys/utils/ctable.c
> @@ -25,6 +25,7 @@ static PetscErrorCode PetscTableCreateHashSize(PetscInt sz, PetscInt *hsz)
>    else if (sz < 819200)  *hsz = 1193557;
>    else if (sz < 1638400) *hsz = 2297059;
>    else if (sz < 3276800) *hsz = 4902383;
> +  else if (sz < 6553600) *hsz = 9179113;

Does anyone else think this is ridiculous?  Why not either generate the
hash sizes algorithmically or put in enough for MAXINT?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170109/d881db4b/attachment.pgp>


More information about the petsc-users mailing list