[petsc-users] Regarding Issue with Metis Double Precision

s.pradeep kumar spradeepmahadeek at gmail.com
Sun May 28 20:26:00 CDT 2023


Thanks! I tried adding the flag but it throws in the following error:

=============================================================================================
                         Configuring PETSc to compile on your system
=============================================================================================
TESTING: configureExternalPackagesDir from
config.framework(config/BuildSystem/config/framework.py:1070)
*********************************************************************************************
           UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for
details):
---------------------------------------------------------------------------------------------
  Package parmetis requested but dependency metis not requested.
  Perhaps you want --download-metis or --with-metis-dir=directory or
  --with-metis-lib=libraries and --with-metis-include=directory
*********************************************************************************************

On Sun, May 28, 2023 at 8:12 PM Barry Smith <bsmith at petsc.dev> wrote:

>
>   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/e0ad69be/attachment-0001.html>


More information about the petsc-users mailing list