[petsc-users] AIJ ftn-kernels update
Barry Smith
bsmith at mcs.anl.gov
Wed Feb 4 14:04:44 CST 2015
Thanks. Now in master and next
> On Feb 3, 2015, at 5:38 PM, Vijay S. Mahadevan <vijay.m at gmail.com> wrote:
>
> When using configure options: --with-fortran-kernels=1
> --with-fortran=1, the build fails with the following errors.
>
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c: In function
> 'PetscErrorCode MatMultTransposeAdd_SeqAIJ(Mat, Vec, Vec, Vec)':
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1265:52: error:
> invalid conversion from 'const void*' to 'void*' [-fpermissive]
> fortranmulttransposeaddaij_(&m,x,a->i,a->j,a->a,y);
> ^
> In file included from
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1240:0:
> /home/vijaysm/code/petsc/include/../src/mat/impls/aij/seq/ftn-kernels/fmult.h:14:19:
> error: initializing argument 2 of 'void
> fortranmulttransposeaddaij_(PetscInt*, void*, PetscInt*, PetscInt*,
> void*, void*)' [-fpermissive]
> PETSC_EXTERN void
> fortranmulttransposeaddaij_(PetscInt*,void*,PetscInt*,PetscInt*,void*,void*);
> ^
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c: In function
> 'PetscErrorCode MatMultAdd_SeqAIJ(Mat, Vec, Vec, Vec)':
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1601:41: error:
> invalid conversion from 'const PetscInt* {aka const int*}' to
> 'PetscInt* {aka int*}' [-fpermissive]
> fortranmultaddaij_(&m,x,ii,aj,aa,y,z);
> ^
> In file included from
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1562:0:
> /home/vijaysm/code/petsc/include/../src/mat/impls/aij/seq/ftn-kernels/fmultadd.h:11:19:
> error: initializing argument 3 of 'void
> fortranmultaddaij_(PetscInt*, const void*, PetscInt*, PetscInt*, const
> MatScalar*, void*, void*)' [-fpermissive]
> PETSC_EXTERN void fortranmultaddaij_(PetscInt*,const
> void*,PetscInt*,PetscInt*,const MatScalar*,void*,void*);
> ^
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1601:41: error:
> invalid conversion from 'const PetscInt* {aka const int*}' to
> 'PetscInt* {aka int*}' [-fpermissive]
> fortranmultaddaij_(&m,x,ii,aj,aa,y,z);
> ^
> In file included from
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/aij.c:1562:0:
> /home/vijaysm/code/petsc/include/../src/mat/impls/aij/seq/ftn-kernels/fmultadd.h:11:19:
> error: initializing argument 4 of 'void
> fortranmultaddaij_(PetscInt*, const void*, PetscInt*, PetscInt*, const
> MatScalar*, void*, void*)' [-fpermissive]
> PETSC_EXTERN void fortranmultaddaij_(PetscInt*,const
> void*,PetscInt*,PetscInt*,const MatScalar*,void*,void*);
> ^
> CXX standalone_test/obj/src/mat/impls/aij/seq/cholmod/aijcholmod.o
> CXX standalone_test/obj/src/mat/impls/aij/seq/ftn-auto/aijf.o
> CXX standalone_test/obj/src/mat/impls/aij/seq/crl/crl.o
> gmake[2]: *** [standalone_test/obj/src/mat/impls/aij/seq/aij.o] Error 1
> gmake[2]: *** Waiting for unfinished jobs....
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/crl/crl.c: In function
> 'PetscErrorCode MatMult_AIJCRL(Mat, Vec, Vec)':
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/crl/crl.c:133:43:
> error: invalid conversion from 'const PetscScalar* {aka const
> double*}' to 'PetscScalar* {aka double*}' [-fpermissive]
> fortranmultcrl_(&m,&rmax,x,y,icols,acols);
> ^
> In file included from
> /home/vijaysm/code/petsc/src/mat/impls/aij/seq/crl/crl.c:94:0:
> /home/vijaysm/code/petsc/include/../src/mat/impls/aij/seq/crl/ftn-kernels/fmultcrl.h:10:19:
> error: initializing argument 3 of 'void fortranmultcrl_(PetscInt*,
> PetscInt*, PetscScalar*, PetscScalar*, PetscInt*, PetscScalar*)'
> [-fpermissive]
> PETSC_EXTERN void
> fortranmultcrl_(PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscScalar*);
> ^
> gmake[2]: *** [standalone_test/obj/src/mat/impls/aij/seq/crl/crl.o] Error 1
>
> Looks like some const related changes in the API didn't propagate onto
> the fortran kernels. The attached patch fixes it. If you need any
> logs, let me know.
>
> Vijay
> <ftnkernel_const_fix.patch>
More information about the petsc-users
mailing list