On Feb 23, 2021, at 5:32 AM, Anton Glazkov
<[email protected]<mailto:[email protected]>> 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?
Yes, Revolve uses int32 only. But we can fix the warnings by downcasting. You
can check out this MR:
https://gitlab.com/petsc/petsc/-/merge_requests/3654
Thanks,
Hong (Mr.)
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