Jeff Squyres wrote:
> On Feb 23, 2011, at 2:20 PM, Prentice Bisbal wrote:
>
>> I suspected that and checked for it earlier. I just double-checked, and
>> that is not the problem. Out of the two source files, 'include mpif.h'
>> appears once, and 'use mpi' does not appear at all. I'm beginning to
>> suspect it is the compiler that is the problem. I'm using ifort 11.1.
>> It's not the latest version, but it's only about 1 year old.
>
> 11.1 should be fine - I test with that regularly.
>
> Can you put together a small example that shows the problem and isn't proprietary?
>
Jeff,
Thanks for requesting that. As I was looking at the oringinal code to
write a small test program, I found the source of the error. Doesn't it
aways work that way.
The code I'm debugging looked like this:
c main program
implicit integer(i-m)
integer ierr,istatus(MPI_STATUS_SIZE)
include 'mpif.h'
call MPI_Init(ierr)
call MPI_Comm_rank(MPI_COMM_WORLD,imy_rank,ierr)
call MPI_Comm_size(MPI_COMM_WORLD,iprocess,ierr)
call MPI_FINALIZE(ierr)
stop
end
Can you see the error? Scroll down for answer ;)
It's using MPI_STATUS_SIZE to dimension istatus before mpif.h is even
read! Correcting the order of the include and declaration statements
fixed the problem. D'oh!
--
Prentice
|