Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-02-10 Thread Adam C Powell IV
On Fri, 2008-02-08 at 12:06 -0500, Jeff Squyres wrote: > On Feb 7, 2008, at 7:03 PM, Adam C Powell IV wrote: > > > But then, why wouldn't programs expect to be able to include C headers > > in a C++ extern C block? > > But that's exactly the issue: mpi.h is not a C header. It is mandated > by

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-02-08 Thread Jeff Squyres
On Feb 7, 2008, at 7:03 PM, Adam C Powell IV wrote: But then, why wouldn't programs expect to be able to include C headers in a C++ extern C block? But that's exactly the issue: mpi.h is not a C header. It is mandated by the MPI standard to be both a C and a C++ header file. We (Open

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-02-07 Thread Adam C Powell IV
On Wed, 2008-01-30 at 21:21 -0500, Jeff Squyres wrote: > On Jan 30, 2008, at 5:35 PM, Adam C Powell IV wrote: > > > With no reply in a couple of weeks, I'm wondering if my previous > > message > > got dropped. (Then again, my previous message was a couple of weeks > > late in replying to its

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-01-30 Thread Jeff Squyres
On Jan 30, 2008, at 5:35 PM, Adam C Powell IV wrote: With no reply in a couple of weeks, I'm wondering if my previous message got dropped. (Then again, my previous message was a couple of weeks late in replying to its predecessor...) No, it didn't get dropped -- it was exactly your

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-01-30 Thread Adam C Powell IV
Hello, With no reply in a couple of weeks, I'm wondering if my previous message got dropped. (Then again, my previous message was a couple of weeks late in replying to its predecessor...) I'm recommending a change to mpi.h which would let C headers included by C++ programs do: #define

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-01-13 Thread Adam C Powell IV
Hi again, Sorry about the hiatus; I thought "Great, my OMPI_SKIP_CXX hack works" and didn't check to see your reply, even though it came right away. On Tue, 2008-01-01 at 11:07 -0700, Brian Barrett wrote: > On Jan 1, 2008, at 12:47 AM, Adam C Powell IV wrote: > > > On Mon, 2007-12-31 at 20:01

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-01-01 Thread Brian Barrett
On Jan 1, 2008, at 12:47 AM, Adam C Powell IV wrote: On Mon, 2007-12-31 at 20:01 -0700, Brian Barrett wrote: Yeah, this is a complicated example, mostly because HDF5 should really be covering this problem for you. I think your only option at that point would be to use the #define to not

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2008-01-01 Thread Adam C Powell IV
On Mon, 2007-12-31 at 20:01 -0700, Brian Barrett wrote: > On Dec 31, 2007, at 7:26 PM, Adam C Powell IV wrote: > > > Okay, fair enough for this test example. > > > > But the Salomé case is more complicated: > > extern "C" > > { > > #include > > } > > What to do here? The hdf5 prototypes must be

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2007-12-31 Thread Brian Barrett
On Dec 31, 2007, at 7:26 PM, Adam C Powell IV wrote: Okay, fair enough for this test example. But the Salomé case is more complicated: extern "C" { #include } What to do here? The hdf5 prototypes must be in an extern "C" block, but hdf5.h #includes a file which #includes mpi.h... Thanks for

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2007-12-31 Thread Adam C Powell IV
On Mon, 2007-12-31 at 19:17 -0700, Brian Barrett wrote: > On Dec 31, 2007, at 7:12 PM, Adam C Powell IV wrote: > > > I'm trying to build the Salomé engineering simulation tool, and am > > having trouble compiling with OpenMPI. The full text of the error > > is at > >

Re: [OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2007-12-31 Thread Brian Barrett
On Dec 31, 2007, at 7:12 PM, Adam C Powell IV wrote: I'm trying to build the Salomé engineering simulation tool, and am having trouble compiling with OpenMPI. The full text of the error is at http://lyre.mit.edu/~powell/salome-error . The crux of the problem can be reproduced by trying

[OMPI users] Can't compile C++ program with extern "C" { #include mpi.h }

2007-12-31 Thread Adam C Powell IV
Greetings, I'm trying to build the Salomé engineering simulation tool, and am having trouble compiling with OpenMPI. The full text of the error is at http://lyre.mit.edu/~powell/salome-error . The crux of the problem can be reproduced by trying to compile a C++ file with: extern "C" { #include