[petsc-users] Regarding Issue with Metis Double Precision

Barry Smith bsmith at petsc.dev
Sun May 28 20:12:18 CDT 2023


  It looks you are calling Metis routines directly. In that case, you can do one of two things

  1) use the additional PETSc ./configure option -download-metis-use-doubleprecision=1

or 
  
  2) ensure that the arguments such as tpwgts that you pass in are not PetscScalar but instead float. This would require changing your code slightly.

  Barry


> On May 28, 2023, at 8:34 PM, s.pradeep kumar <spradeepmahadeek at gmail.com> wrote:
> 
> Dear All,
> 
>         I recently tried to install Metis along with PETSC 3.19.1, using following command,
> 
> ./configure  --with-scalar-type=real --with-precision=double --download-metis  --download-parmetis  --with-cmake=1  --with-mpi-dir=/opt/cray/pe/mpich/8.1.9/ofi/gnu/9.1 --download-fblaslapack=1 --with-debugging=0 COPTFLAGS=-O2 FOPTFLAGS=-O2
> 
> While compiling my code, I get this warning sign,  
> 
> 34: warning: passing argument 10 of 'ParMETIS_V3_PartKway' from incompatible pointer type [-Wincompatible-pointer-types]
>    79 |                     nparts,tpwgts,ubvec,options,
>       |                                  ^~~~~~
>       |                                  |
>       |                                  PetscScalar * {aka double *}
> In file included from /v2_petsc_check/ParmetisWrappers.c:5:
> NumericalLibraries/petsc-3.19.1/gnu-opt/include/parmetis.h:70:22: note: expected 'real_t *' {aka 'float *'} but argument is of type 'PetscScalar *' {aka 'double *'}
>    70 |              real_t *tpwgts, real_t *ubvec, idx_t *options, idx_t *edgecut, idx_t *part,
>       |              ~~~~~~~~^~~~~~
> /v2_petsc_check/ParmetisWrappers.c:79:41: warning: passing argument 11 of 'ParMETIS_V3_PartKway' from incompatible pointer type [-Wincompatible-pointer-types]
>    79 |                           nparts,tpwgts,ubvec,options,
>       |                                         ^~~~~
>       |                                         |
>       |                                         PetscScalar * {aka double *}
> 
> Ignoring the warning sign leads to code crashing due to Parmetis Error,
> 
> parmetis error: the sum of tpwgts for constraint #0 is not 1.0
> 
> How should I proceed further?
> 
> Regards,
> Pradeep
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230528/a59c90f4/attachment.html>


More information about the petsc-users mailing list