<div dir="ltr">Thanks, that seemed to work.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 7, 2020 at 12:01 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry should have said:<br>
<br>
<br>
PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt *blocksize, PetscDataType *type, F90Array1d *ptr, int *ierr PETSC_F90_2PTR_PROTO(ptrd), PETSC_FORTRAN_CHARLEN_T lenN)<br>
<br>
Satish<br>
<br>
<br>
On Tue, 7 Jul 2020, Mark Adams wrote:<br>
<br>
> Thanks, I got this error:<br>
> <br>
> PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt *blocksize,<br>
> PetscDataType *type, F90Array1d *ptr, int *ierr lenN<br>
> PETSC_F90_2PTR_PROTO(ptrd), PETSC_FORTRAN_CHARLEN_T)<br>
> {<br>
> PetscScalar *v;<br>
> PetscInt n;<br>
> char *fieldname;<br>
> <br>
> FIXCHAR(name, lenN, fieldname);<br>
> *ierr = DMSwarmGetSize(*dm, &n);if (*ierr) return;<br>
> *ierr = DMSwarmGetField(*dm, fieldname, blocksize, type, (void **) &v);if<br>
> (*ierr) return;<br>
> *ierr = F90Array1dCreate((void*) v, MPIU_SCALAR, 1, n, ptr<br>
> PETSC_F90_2PTR_PARAM(ptrd));<br>
> FREECHAR(name, fieldname);<br>
> }<br>
> <br>
> PGC-S-0037-Syntax error: Recovery attempted by deleting identifier ierr<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 15)<br>
> PGC-S-0138-Missing identifier for declarator in function prototype<br>
> definition<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 16)<br>
> PGC-W-0046-Non-integral array subscript is cast to int<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-W-0095-Type cast required for this conversion<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0039-Use of undeclared variable ierr<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-W-0095-Type cast required for this conversion<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 21)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 22)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 22)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 23)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 23)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 24)<br>
> PGC-S-0055-Illegal operand of indirection operator (*)<br>
> (/autofs/nccs-svm1_home1/adams/petsc/src/dm/impls/swarm/f90-custom/zswarmf90.c:<br>
> 25)<br>
> PGC/power Linux 19.9-0: compilation completed with severe errors<br>
> gmake[3]: ***<br>
> [arch-summit-dbg64-pgi-cuda/obj/dm/impls/swarm/f90-custom/zswarmf90.o]<br>
> Error 2<br>
> gmake[3]: *** Waiting for unfinished jobs....<br>
> gmake[2]: *** [libs] Error 2<br>
> <br>
> I can remove PGI from this test if need be,<br>
> Thanks,<br>
> <br>
> On Tue, Jul 7, 2020 at 9:56 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> > > PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt<br>
> > *blocksize, PetscDataType *type, F90Array1d *ptr, int *ierr,<br>
> > PETSC_FORTRAN_CHARLEN_T lenN PETSC_F90_2PTR_PROTO(ptrd))<br>
> ><br>
> > I don't see an example [in current code] for using both char and F90Array<br>
> > with the same function. So its not clear to me if the above is correct or<br>
> > if it should be:<br>
> ><br>
> > PETSC_EXTERN void dmswarmgetfield_(DM *dm, char *name, PetscInt<br>
> > *blocksize, PetscDataType *type, F90Array1d *ptr, int *ierr lenN<br>
> > PETSC_F90_2PTR_PROTO(ptrd), PETSC_FORTRAN_CHARLEN_T)<br>
> ><br>
> > And to disable:<br>
> ><br>
> > src/ksp/ksp/tutorials/ex54f.F90:! requires: !pgf90_compiler<br>
> > src/snes/tests/ex18f90.F90:! requires: !pgf90_compiler<br>
> ><br>
> > Satish<br>
> ><br>
> > On Tue, 7 Jul 2020, Mark Adams wrote:<br>
> ><br>
> > > DMSwarm has custom fortran wrappers in ftn-custom and f90-custom. I am<br>
> > > finding that the f90 one has junk in the string length with PGI compilers<br>
> > > (see attached). The ones in ftn-custom seem to work.<br>
> > ><br>
> > > Any ideas?<br>
> > ><br>
> > > Also, how can I disable a test for PGI?<br>
> > ><br>
> > > Thanks,<br>
> > > Mark<br>
> > ><br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>