[MPIWG Fortran] INTENT and ASYNCHRONOUS
Jeff Hammond
jeff.science at gmail.com
Wed Jun 6 10:37:05 CDT 2018
This works with other compilers as well...
$ for fc in ifort gfortran-8 pgfortran ; do ${fc} -c f08-intent-async.f90
&& echo SUCCESS with $fc || echo FAILURE with $fc ; done
SUCCESS with ifort
SUCCESS with gfortran-8
SUCCESS with pgfortran
$ cat f08-intent-async.f90
Subroutine csub (x)
real,intent(inout),asynchronous :: x
end Subroutine csub
On Wed, Jun 6, 2018 at 8:29 AM, Bill Long <longb at cray.com> wrote:
>
> > On Jun 6, 2018, at 10:08 AM, Jeff Squyres (jsquyres) <jsquyres at cisco.com>
> wrote:
> >
> > Fortran gurus --
> >
> > We just got a problem report in Open MPI (https://www.mail-archive.com/
> users at lists.open-mpi.org/msg32381.html) for a Fortran compile failure:
> >
> > -----
> > OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN), ASYNCHRONOUS :: origin_addr
> > ^
> > "../../../../../openmpi-master-201806060243-64a5baa/
> ompi/mpi/fortran/use-mpi-f08/accumulate_f08.F90", Line = 16, Column = 46:
> ERROR: Attributes ASYNCHRONOUS and INTENT must not appear in the same
> attribute list.
> > -----
> >
> > Is that Fortran compiler correct? I.e., does Fortran forbid the use of
> INTENT and ASYNCHRONOUS in the same attribute list?
>
> I don’t see a restriction like that, at least in F2018. I tried this:
>
> Subroutine csub (x)
> real,intent(inout),asynchronous :: x
> end Subroutine csub
>
> with maximum diagnostics and got no messages with the Cray compiler which
> is quite good at testing conformance.
>
>
> > Or is this a compiler bug?
> >
>
> It would appear to be the case. It might be the case that the usage in
> the routine is incompatible with INTENT(IN), but that message should be
> differently worded. Of course, OMPI_FORTRAN_IGNORE_TKR_TYPE is certainly
> not a valid type declaration. I assume they intend TYPE(*).
>
> Cheers,
> Bill
>
>
>
>
> > --
> > Jeff Squyres
> > jsquyres at cisco.com
> >
> > _______________________________________________
> > mpiwg-fortran mailing list
> > mpiwg-fortran at lists.mpi-forum.org
> > https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
>
> Bill Long
> longb at cray.com
> Principal Engineer, Fortran Technical Support & voice: 651-605-9024
> Bioinformatics Software Development fax: 651-605-9143
> Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
>
>
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
>
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20180606/dd7fc4d3/attachment.html>
More information about the mpiwg-fortran
mailing list