LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Clotho (wytsang_at_[hidden])
Date: 2005-02-02 23:18:19


I run lam testsuite 7.0.6 on EM64T and find error "Error in set/get
attribute"
for program comm/attrsetget_f.f . The program shows no error in 32 bit
machines.

Finally I find that I need to explicitly declare "integer" as
"integer*8" to solve
the problem.

Here is part of the program

------------------------------
:
     integer attr
     integer newattr
:
     attr = 1234
     call MPI_Comm_set_attr(MPI_COMM_WORLD, key, attr, ierr)
     call MPI_Comm_get_attr(MPI_COMM_WORLD, key, newattr,
    + flag, ierr)

     if (newattr .ne. attr)then
        call lamtest_error_f('Error in set/get attribute')
     endif
:
-------------------------------

Debug the program, I find that the "newattr" is correctly set to "1234",
but "attr"
is strangely modified to other values (eg., 1, 2) after
MPI_Comm_get_attr().

Declare "attr" and "newattr" with 8-bytes integers can solve the problem.
     integer*8 attr
     integer*8 newattr