I believe that the problem is your "-DMPI" in your Makefile. The line
in question in mpicxx.h is:
namespace MPI {
When you use -DMPI, the preprocessor replaces this with:
namespace 1 {
which is not legal.
In short, the application using the name "MPI" is illegal. That name
is reserved for the MPI C++ namespace. If you change the name to
something else (like -DUSE_MPI, and change the source code to match),
this particular problem should be solved.
But then again, I'm not sure why you changed CPP to g++ and CC to gcc;
shouldn't they be mpicc?
It's also not clear from the context of Makefile.common whether CPP is
supposed to be the C preprocessor or the C++ compiler. If it's
supposed to be the C preprocessor, then "mpicc -E" would be fine; if
it's supposed to be the C++ compiler, then mpic++ (or mpiCC) would be
fine.
On Sep 18, 2008, at 1:46 AM, Shafagh Jafer wrote:
Thanks a lot. The problem i have is that i have installed
openmpi-1.2.7 and every thing went well and i tested hello_c and
ring_c. But the problem now is that when i use open mpi's mpicc and
mpic++ in my Makefile i get errors reported from inside openmpi's
source code. I am attaching my Makefile and here I paste a snapshot
of the errors I get:
=========================================================
In file included from /opt/openmpi/1.2.7/include/mpi.h:1795,
from stdaload.cpp:33:
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:136: parse
error before `1'
In file included from /opt/openmpi/1.2.7/include/openmpi/ompi/mpi/
cxx/mpicxx.h:168,
from /opt/openmpi/1.2.7/include/mpi.h:1795,
from stdaload.cpp:33:
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/functions.h:143:
parse error before `1'
In file included from /opt/openmpi/1.2.7/include/openmpi/ompi/mpi/
cxx/mpicxx.h:195,
from /opt/openmpi/1.2.7/include/mpi.h:1795,
from stdaload.cpp:33:
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/status.h:26: parse
error before `::'
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/status.h:27: parse
error before `::'
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/status.h:28: parse
error before `::'
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/status.h:102: parse
error before `1'
In file included from /opt/openmpi/1.2.7/include/openmpi/ompi/mpi/
cxx/mpicxx.h:196,
from /opt/openmpi/1.2.7/include/mpi.h:1795,
from stdaload.cpp:33:
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/request.h:200: parse
error before `1'
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/request.h:206: parse
error before `('
...
=========================================================
Please help me. I am being turtured by this errors and can't resolve
them :-(
--- On Wed, 9/17/08, Terry Frankcombe <te...@chem.gu.se> wrote:
From: Terry Frankcombe <te...@chem.gu.se>
Subject: Re: [OMPI users] what is inside mpicc/mpic++
To: "Open MPI Users" <us...@open-mpi.org>
Date: Wednesday, September 17, 2008, 10:35 PM
In OMPI these are binaries, not scripts. Not human readable.
[tjf@rscpc28 NH2+]$ ll /usr/local/bin/mpif90
lrwxrwxrwx 1 root root 12 2008-03-05 14:39 /usr/local/bin/mpif90 ->
opal_wrapper*
[tjf@rscpc28 NH2+]$ file /usr/local/bin/opal_wrapper
/usr/local/bin/opal_wrapper: ELF 32-bit LSB executable, Intel 80386,
version 1
(SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs),
not stripped
On Wed, 2008-09-17 at 22:31 -0700, Shafagh Jafer wrote:
> I am trying to figure out a problem that i am stuck in :-
( could
anyone please tell me how their mpicc/mpic++ looks like? is there
any thing
readable inside these files?because mine look corrupted and are
filled with
unreadable charachters.
> Please let me know.
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users
<Makefile.common>_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users
--
Jeff Squyres
Cisco Systems