LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Kevin Kuo (kkuo_at_[hidden])
Date: 2004-09-15 11:50:21


Hi everyone,

I have LAM/MPI 7.0.6 running on a small linux cluster. When I tried to
compile a c++ project I get the following errors in constant.h

/usr/local/lam/include/mpi2cxx/constants.h:128: redeclaration of C++
built-in
   type `int'
/usr/local/lam/include/mpi2cxx/constants.h:129: declaration does not
declare
   anything

my g++ version is "3.2 20020903 (Red Hat Linux 8.0 3.2-7)"

here is what constants.h says:

    127 // c++ types
    128 extern const Datatype BOOL;
    129 extern const Datatype COMPLEX;
    130 extern const Datatype DOUBLE_COMPLEX;
    131 extern const Datatype LONG_DOUBLE_COMPLEX;

so what's wrong here? If I put a #if 0...#endif block around these
lines, it will continue to compile, but why was there an error in the
first place?

Secondly, I have access to some C/C++ code that uses MPI_DOUBLE_COMPLEX
data type in the MPI_Datatype argument for Send, recv, etc. This type
is suppose to be only Fortran only? Mpich 1.2.6 allows me to compile
it, but breaks on the offending line when executing, while lam-7.0.6
does not allow me to compile it, saying that MPI_DOUBLE_COMPLEX is
undefined. So which implementation has it correct? I imagine LAM's got
it correct because C doesn't have any support for COMPLEX numbers and
the users have to use MPI's functions to generate derived types for the
Complex structures.

Thirdly, if I generate a derived type for a structure (call it Complex)
in C, and I want to send an array of these Complex structures, is the
count field the number the number of elements in the array (using
MPI_Type_vector), or should the derived type be generated for the array
of Complex objects and in that case the count is 1? Thanks for any
feedback.

Sincerely,

Kevin Kuo