https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120958

--- Comment #9 from kargls at comcast dot net ---
(In reply to anlauf from comment #8)
> (In reply to Martin Jambor from comment #7)
> > (In reply to kargls from comment #5)
> > > 
> > > So, if I understand, you want an fnspec of ". . w w w w w w w".
> > > Can you show f->sym and f->sym-attr from gdb?
> > > 
> > 
> > (gdb) p *f->sym
> > $5 = {name = 0x7fffbe64a100 "_formal_70", module = 0x0, declared_at = {nextc
> > = 0x4c006a4, u = {lb = 0x4c00620, location = 79693344}}, ts = {type =
> > BT_REAL, kind = 8, u = {derived = 0x0,
> 
> The interface is guessed by gfc_get_formal_from_actual_arglist, which
> creates the artifical symbol "_formal_%d".  Can we use that information?

Unfortunately, I don't think we can.  The actual argument list has been
collapsed to the formal argument list.  I was hoping that one of the
attributes would help, but only f->sym->attr.dummy=1.

Looking at the code Martin posted (removing some actual arguments to
reduce line length), his description suggests that norm_temp2 is 
modified after mpi_irecv returns, i.e., asynchronous behavior.

         do i = 1, l2npcols
            if (timeron) call timer_start(t_ncomm)

            call mpi_irecv(norm_temp2, ...)
            call mpi_send (norm_temp1, ...)
            call mpi_wait( request, status, ierr )

            if (timeron) call timer_stop(t_ncomm)

            norm_temp1(1) = norm_temp1(1) + norm_temp2(1)
            norm_temp1(2) = norm_temp1(2) + norm_temp2(2)
         enddo

If this is an implicit interface, then norm_temp2 can only be modified
through its associated dummy argument.  IIRC, the addition of the ASYNCHRONOUS
attribute and assumed-rank (i.e, DIMENSION(..)) feature were movitated by
MPI.  See comment #5 for the different interfaces from 'USE MPI' and
'USE MPI_F08'.

I downloaded the code Martin points to.  Just need to build openmpi with
top-of-tree gfortran to do some sleuthing.

Reply via email to