Re: [OMPI users] compilation error about Open Macro when building the code with OpenMPI on Mac OS 10.5.5

2008-10-08 Thread Sudhakar Mahalingam

Jed,

You are correct. I found an "Open" macro defined in our another header  
file which was included before the mpi header files (Actually this  
order was working fine with the mpich-1.2.7 but both openmpi-1.2.7 and  
MPICH-2 complained and threw errors to me). Now when I change the  
order of inclusion (i.e., first mpi and then my other header file),  
the code compiles and builds fine.


Thanks,

Sudhakar



On Wed, Oct 8, 2008 at 21:19, Sudhakar Mahalingam  
 wrote:
> I am having a problem about "Open" Macro's number of arguments,  
when I try
> to build a C++ code with the openmpi-1.2.7 on my Mac OS 10.5.5  
machine. The
> error message is given below. When I look at the file.h and  
file_inln.h
> header files in the cxx folder, I am seeing that the "Open"  
function indeed
> takes four arguments but I don't know why there is this error about  
the
> number of arguments of 4. Does anyone else seen this type of error  
before ?.


MPI::File::Open is an inline function, not a macro. You must have an
unqualified Open macro defined in this compilation unit. Maybe in one
of the headers that were included in your code before hdf5.h. Does it
work if you include hdf5.h first?

Jed 

Re: [OMPI users] compilation error about Open Macro when building the code with OpenMPI on Mac OS 10.5.5

2008-10-08 Thread Jed Brown
On Wed, Oct 8, 2008 at 21:19, Sudhakar Mahalingam  wrote:
> I am having a problem about "Open" Macro's number of arguments, when I try
> to build a C++ code with the openmpi-1.2.7 on my Mac OS 10.5.5 machine. The
> error message is given below. When I look at the file.h and file_inln.h
> header files in the cxx folder, I am seeing that the "Open" function indeed
> takes four arguments but I don't know why there is this error about the
> number of arguments of 4. Does anyone else seen this type of error before ?.

MPI::File::Open is an inline function, not a macro.  You must have an
unqualified Open macro defined in this compilation unit.  Maybe in one
of the headers that were included in your code before hdf5.h.  Does it
work if you include hdf5.h first?

Jed


[OMPI users] compilation error about Open Macro when building the code with OpenMPI on Mac OS 10.5.5

2008-10-08 Thread Sudhakar Mahalingam

Hi,

I am having a problem about "Open" Macro's number of arguments, when I  
try to build a C++ code with the openmpi-1.2.7 on my Mac OS 10.5.5  
machine. The error message is given below. When I look at the file.h  
and file_inln.h header files in the cxx folder, I am seeing that the  
"Open" function indeed takes four arguments but I don't know why there  
is this error about the number of arguments of 4. Does anyone else  
seen this type of error before ?.


Thanks for your help.

Sudhakar

/usr/local/mpi/bin/mpicxx -DHAVE_CONFIG_H -I. -I. -I.. -I../advisor - 
I../physics -I../otools -I../otools -I../config -I../xg -I/usr/local/ 
hdf5mpi/include -I/usr/local/txphysics-2.1/include -I/usr/local/ 
petscmpi/include -I/usr/local/petscmpi/bmake/darwin9.5.0-c-debug - 
I.-O3 -pipe -funroll-loops -Wall -Wno-unused  -O3 -pipe -funroll- 
loops   -DQT3_SUPPORT -DUNIX -DMPI_VERSION   -DNOX -c -o OopicMain.o  
OopicMain.cpp

In file included from /usr/local/hdf5mpi/include/H5public.h:54,
   from /usr/local/hdf5mpi/include/hdf5.h:24,
   from ../otools/dumpHDF5.h:20,
   from ../physics/plsmadev.h:35,
   from OopicMain.h:42,
   from OopicMain.cpp:20:
/usr/local/openmpi-1.2.7/include/mpi.h:162:1: warning: "MPI_VERSION"  
redefined
:1:1: warning: this is the location of the previous  
definition
In file included from /usr/local/openmpi-1.2.7/include/openmpi/ompi/ 
mpi/cxx/mpicxx.h:200,

   from /usr/local/openmpi-1.2.7/include/mpi.h:1795,
   from /usr/local/hdf5mpi/include/H5public.h:54,
   from /usr/local/hdf5mpi/include/hdf5.h:24,
   from ../otools/dumpHDF5.h:20,
   from ../physics/plsmadev.h:35,
   from OopicMain.h:42,
   from OopicMain.cpp:20:
/usr/local/openmpi-1.2.7/include/openmpi/ompi/mpi/cxx/file.h:124:25:  
error: macro "Open" passed 4 arguments, but takes just 1
In file included from /usr/local/openmpi-1.2.7/include/openmpi/ompi/ 
mpi/cxx/mpicxx.h:257,

   from /usr/local/openmpi-1.2.7/include/mpi.h:1795,
   from /usr/local/hdf5mpi/include/H5public.h:54,
   from /usr/local/hdf5mpi/include/hdf5.h:24,
   from ../otools/dumpHDF5.h:20,
   from ../physics/plsmadev.h:35,
   from OopicMain.h:42,
   from OopicMain.cpp:20:
/usr/local/openmpi-1.2.7/include/openmpi/ompi/mpi/cxx/file_inln.h: 
189:27: error: macro "Open" passed 4 arguments, but takes just 1
/usr/local/openmpi-1.2.7/include/openmpi/ompi/mpi/cxx/file_inln.h:187:  
error: invalid function declaration

make[2]: *** [OopicMain.o] Error 1
make[2]: *** Waiting for unfinished jobs
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2