Ya, probably so.

But I'm still going to blame Fortran for that bug.  Just 'cause it's easier.  
:-)

(I also spent all morning writing an MPI_COMM_SPAWN_MULTIPLE test *in Fortran*, 
which was exceedingly painful, and I had to send it off to a Fortran expert to 
tell me what I did wrong...  So my frustration with the language that I'm sorta 
familiar with is a little high at the moment :-) )

What actually happened was that this is a side effect of me getting the 0/1 
indexing mixed up.  I.e., we loop from 1-100 in Fortran (vs. 0-99 in C).  If I 
did "for (i = 0; i < 100; ++i)" in C, then i would have been 100 at the end of 
the loop -- which is the value I wanted.  The issue was twofold:

- I was thinking in that mindset (at the end of the loop in C, i == 100)
- There's no explicit increment in Fortran, so I assumed it would actually stop 
at 100, not 101

Maybe I'll just blame Craig Rasmussen (my partner in crime in the Fortran OMPI 
bindings).  He's not even on this list.  Yeah, that sounds like a better idea.  
:-p


On Jul 11, 2012, at 2:36 PM, Larry Baker wrote:

> The value of i is exactly as it would be in C for the value of a loop control 
> variable at loop exit.  (As opposed to being undefined, which is what is used 
> to be.)  This dates from Fortran-77.
> 
> Larry Baker
> US Geological Survey
> 650-329-5608
> ba...@usgs.gov
> 
> 
> 
> On 11 Jul 2012, at 10:44 AM, Jeff Squyres wrote:
> 
>> Ya, I saw Brian's commit, too.
>> 
>> Ah, I see what happens -- i is actually 101, not 100.  Frackin' Fortran...
>> 
>> 
>> On Jul 11, 2012, at 12:57 PM, Eugene Loh wrote:
>> 
>>> Brian caught it.  I simply applied the change to the other ibarrier_f* 
>>> tests.  With this and your "remove bozo debug statements" (+ sleeps) 
>>> putbacks (26768/trunk and 26769/v1.7), I'm hoping our ibarrier_f* MTT 
>>> time-outs will disappear.
>>> 
>>> On 7/11/2012 9:26 AM, Jeff Squyres wrote:
>>>> I thought i would be 100 at the end of that do loop.
>>>> 
>>>> $%#@#@$% Fortran.  :-(
>>>> 
>>>> 
>>>> On Jul 11, 2012, at 12:25 PM,<svn-commit-mai...@open-mpi.org>  wrote:
>>>> 
>>>>> Author: eugene (Eugene Loh)
>>>>> Date: 2012-07-11 12:25:09 EDT (Wed, 11 Jul 2012)
>>>>> New Revision: 2002
>>>>> 
>>>>> Log:
>>>>> Apply the "right value when calling waitall" fix to
>>>>> all ibm/collective/ibarrier_f* tests.
>>>>> 
>>>>> Text files modified:
>>>>>  trunk/ibm/collective/ibarrier_f.f90   |     4 ++--
>>>>>  trunk/ibm/collective/ibarrier_f08.f90 |     3 ++-
>>>>>  trunk/ibm/collective/ibarrier_f90.f90 |     3 ++-
>>>>>  3 files changed, 6 insertions(+), 4 deletions(-)
>>>>> 
>>>>> Modified: trunk/ibm/collective/ibarrier_f.f90
>>>>> ==============================================================================
>>>>> --- trunk/ibm/collective/ibarrier_f.f90   Wed Jul 11 12:03:04 2012        
>>>>> (r2001)
>>>>> +++ trunk/ibm/collective/ibarrier_f.f90   2012-07-11 12:25:09 EDT (Wed, 
>>>>> 11 Jul 2012)      (r2002)
>>>>> @@ -31,6 +31,7 @@
>>>>> ! Comments may be sent to:
>>>>> !    Richard Treumann
>>>>> !    treum...@kgn.ibm.com
>>>>> +! Copyright (c) 2012      Oracle and/or its affiliates.
>>>>> 
>>>>>      program ibarrier
>>>>>      implicit none
>>>>> @@ -57,8 +58,7 @@
>>>>>      do i = 1, 100
>>>>>         call MPI_Ibarrier(MPI_COMM_WORLD, req(i), ierr)
>>>>>      end do
>>>>> -      i = 100
>>>>> -      call MPI_Waitall(i, req, statuses, ierr)
>>>>> +      call MPI_Waitall(100, req, statuses, ierr)
>>>>> 
>>>>>      call MPI_Barrier(MPI_COMM_WORLD, ierr)
>>>>>      call MPI_Finalize(ierr)
>>>>> 
>>>>> Modified: trunk/ibm/collective/ibarrier_f08.f90
>>>>> ==============================================================================
>>>>> --- trunk/ibm/collective/ibarrier_f08.f90 Wed Jul 11 12:03:04 2012        
>>>>> (r2001)
>>>>> +++ trunk/ibm/collective/ibarrier_f08.f90 2012-07-11 12:25:09 EDT (Wed, 
>>>>> 11 Jul 2012)      (r2002)
>>>>> @@ -31,6 +31,7 @@
>>>>> ! Comments may be sent to:
>>>>> !    Richard Treumann
>>>>> !    treum...@kgn.ibm.com
>>>>> +! Copyright (c) 2012      Oracle and/or its affiliates.
>>>>> 
>>>>>      program ibarrier
>>>>>      use mpi_f08
>>>>> @@ -56,7 +57,7 @@
>>>>>      do i = 1, 100
>>>>>         call MPI_Ibarrier(MPI_COMM_WORLD, req(i))
>>>>>      end do
>>>>> -      call MPI_Waitall(i, req, MPI_STATUSES_IGNORE)
>>>>> +      call MPI_Waitall(100, req, MPI_STATUSES_IGNORE)
>>>>> 
>>>>>      call MPI_Barrier(MPI_COMM_WORLD)
>>>>>      call MPI_Finalize()
>>>>> 
>>>>> Modified: trunk/ibm/collective/ibarrier_f90.f90
>>>>> ==============================================================================
>>>>> --- trunk/ibm/collective/ibarrier_f90.f90 Wed Jul 11 12:03:04 2012        
>>>>> (r2001)
>>>>> +++ trunk/ibm/collective/ibarrier_f90.f90 2012-07-11 12:25:09 EDT (Wed, 
>>>>> 11 Jul 2012)      (r2002)
>>>>> @@ -31,6 +31,7 @@
>>>>> ! Comments may be sent to:
>>>>> !    Richard Treumann
>>>>> !    treum...@kgn.ibm.com
>>>>> +! Copyright (c) 2012      Oracle and/or its affiliates.
>>>>> 
>>>>>      program ibarrier
>>>>>      use mpi
>>>>> @@ -57,7 +58,7 @@
>>>>>      do i = 1, 100
>>>>>         call MPI_Ibarrier(MPI_COMM_WORLD, req(i), ierr)
>>>>>      end do
>>>>> -      call MPI_Waitall(i, req, statuses, ierr)
>>>>> +      call MPI_Waitall(100, req, statuses, ierr)
>>>>> 
>>>>>      call MPI_Barrier(MPI_COMM_WORLD, ierr)
>>>>>      call MPI_Finalize(ierr)
>>>>> _______________________________________________
>>>>> svn-docs-full mailing list
>>>>> svn-docs-f...@open-mpi.org
>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/svn-docs-full
>>>> 
>>> _______________________________________________
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> 
>> -- 
>> Jeff Squyres
>> jsquy...@cisco.com
>> For corporate legal information go to: 
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>> 
>> 
>> _______________________________________________
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to