[petsc-users] 64bit indices and revolve compiler warnings

Junchao Zhang junchao.zhang at gmail.com
Tue Feb 23 21:45:29 CST 2021


SInce the parameter is an integer pointer, we must convert 64-bit indices
to int.  Cc Mr. Hong, who wrote that line.
--Junchao Zhang


On Tue, Feb 23, 2021 at 5:36 AM Anton Glazkov <anton.glazkov at chch.ox.ac.uk>
wrote:

> Good morning,
>
>
>
> I have been trying to compile PETSc with 64bit indices and revolve. It
> compiles ok but gives out warnings of the kind:
>
>
>
> {PETSCDIR PATH REMOVED}/src/ts/trajectory/impls/memory/trajmemory.c:1479:130:
> warning: incompatible pointer types passing 'PetscInt *' (aka 'long long
> *') to parameter of type 'int *' [-Wincompatible-pointer-types]
>
>     whattodo =
> revolve_action(&tjsch->rctx->check,&tjsch->rctx->capo,&tjsch->rctx->fine,tjsch->rctx->snaps_in,&tjsch->rctx->info,&tjsch->rctx->where);
> /* must return 1 or 3 or 4*/
>
>
>                                                      ^~~~~~~~~~~~~~~~~~~
>
> {PETSCDIR PATH REMOVED}/lib/include/revolve_c.h:14:49: note: passing
> argument to parameter here
>
> int  revolve_action(int*,int*,int*,int,int*,int*);
>
>
>
> Is revolve incompatible with 64bit indices by design?
>
>
>
> Best wishes,
>
> Anton
>
>
>
> PS the compile line is this:
>
> ./configure –prefix={PREFIX REMOVED}  --with-cc=cc --with-cxx=CC
> --with-fc=ftn --with-debugging=0 --with-clib-autodetect=0
> --with-cxxlib-autodetect=0 --with-fortranlib-autodetect=0 --COPTFLAGS=-g
> -O3 --CXXOPTFLAGS=-g -O3 --FOPTFLAGS=-g -O3 --with-64-bit-indices
> --with-scalar-type=complex --download-hypre-shared --download-moab-shared
> --download-superlu_dist-shared --download-revolve=1
> --with-hdf5-dir=/opt/cray/pe/hdf5-parallel/1.12.0.2/CRAYCLANG/9.1
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210223/acb6d0a0/attachment.html>


More information about the petsc-users mailing list