LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Ole Holm Nielsen (Ole.H.Nielsen_at_[hidden])
Date: 2005-07-07 11:06:17


I have reported the suspected PGI compiler optimizer bug
to Portland Group on July 5, 2005.

/Ole

Jeff Squyres wrote:
> Yes, I guess I could see this happening. You might also want to look
> at the resulting assembly to see if this is the case, too.
>
> But I agree with Ralf -- please report this to PGI, and let's get their
> take on it as well.
>
> On Jul 4, 2005, at 5:17 AM, Ole Holm Nielsen wrote:
>
>> The LAM-MPI integer*2 test dtyp/fint2_f.f fails with PGI 6.0-4
>> as described below. I added a couple of print-statements in the
>> code as requested, and now the code works as expected !
>>
>> So I went back to the original code and added a -O0 (no
>> optimization) to FFLAGS in the dtyp/Makefile.
>> Now the error is absent even with the original code.
>> Then I changed the optimization to -O1 (the PGI default level),
>> and the error returns.
>>
>> I have repeated this test on another system with the
>> Portland Group PGI compiler 5.2-4, and the exact same
>> behavior is observed: The error goes away when I insert
>> a print statement.
>>
>> If I copy the receiver's test
>> if (int2array(2) .ne. int2) then
>> call lamtest_error_f('MPI_INTEGER2 receive error')
>> endif
>> into the sender's code (rank .eq. 0) after the MPI_SEND,
>> the error exists also on the sender side.
>>
>> I've experimented with this a bit, and it seems to me that
>> the PGI optimizer has removed the variable named "int2".
>> If I make a "call dummy(int2)" subroutine call, or if I
>> turn int2 into an array(3), the error goes away.
>>
>> It seems to me that an "optimizer fooler" code such as
>> "call dummy(int2)" or better should be added to dtyp/fint2_f.f.
>> On the other hand, I'm not enough of an expert to judge
>> whether the present error is really a compiler bug or not.
>> I'd be happy to report the error to the Portland Group, in case
>> someone is dead sure that it's a compiler bug.