[petsc-dev] PGI errors with Fortran strings

Mark Adams mfadams at lbl.gov
Tue Jul 7 10:13:48 CDT 2020


Thanks, I got this error:

PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt *blocksize,
PetscDataType *type, F90Array1d *ptr, int *ierr lenN
PETSC_F90_2PTR_PROTO(ptrd), PETSC_FORTRAN_CHARLEN_T)
{
  PetscScalar *v;
  PetscInt     n;
  char        *fieldname;

  FIXCHAR(name, lenN, fieldname);
  *ierr = DMSwarmGetSize(*dm, &n);if (*ierr) return;
  *ierr = DMSwarmGetField(*dm, fieldname, blocksize, type, (void **) &v);if
(*ierr) return;
  *ierr = F90Array1dCreate((void*) v, MPIU_SCALAR, 1, n, ptr
PETSC_F90_2PTR_PARAM(ptrd));
  FREECHAR(name, fieldname);
}

PGC-S-0037-Syntax error: Recovery attempted by deleting identifier ierr
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
15)
PGC-S-0138-Missing identifier for declarator in function prototype
definition
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
16)
PGC-W-0046-Non-integral array subscript is cast to int
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-W-0095-Type cast required for this conversion
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0039-Use of undeclared variable ierr
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-W-0095-Type cast required for this conversion
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
21)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
22)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
22)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
23)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
23)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
24)
PGC-S-0055-Illegal operand of indirection operator (*)
(/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:
25)
PGC/power Linux 19.9-0: compilation completed with severe errors
gmake[3]: ***
[arch-summit-dbg64-pgi-cuda/obj/dm/impls/swarm/f90-custom/zswarmf90.o]
Error 2
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [libs] Error 2

I can remove PGI from this test if need be,
Thanks,

On Tue, Jul 7, 2020 at 9:56 AM Satish Balay <balay at mcs.anl.gov> wrote:

> > PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt
> *blocksize, PetscDataType *type, F90Array1d *ptr, int *ierr,
> PETSC_FORTRAN_CHARLEN_T lenN PETSC_F90_2PTR_PROTO(ptrd))
>
> I don't see an example [in current code] for using both char and F90Array
> with the same function. So its not clear to me if the above is correct or
> if it should be:
>
> PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt
> *blocksize, PetscDataType *type, F90Array1d *ptr, int *ierr lenN
> PETSC_F90_2PTR_PROTO(ptrd), PETSC_FORTRAN_CHARLEN_T)
>
> And to disable:
>
> src/ksp/ksp/tutorials/ex54f.F90:!      requires: !pgf90_compiler
> src/snes/tests/ex18f90.F90:!     requires: !pgf90_compiler
>
> Satish
>
> On Tue, 7 Jul 2020, Mark Adams wrote:
>
> > DMSwarm has custom fortran wrappers in ftn-custom and f90-custom. I am
> > finding that the f90 one has junk in the string length with PGI compilers
> > (see attached). The ones in ftn-custom seem to work.
> >
> > Any ideas?
> >
> > Also, how can I disable a test for PGI?
> >
> > Thanks,
> > Mark
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200707/146fbdb9/attachment.html>


More information about the petsc-dev mailing list