Sorry for the delay in replying.

Was Open MPI configured/compiled with the intel compilers?  That's usually the 
best idea -- use a single compiler suite for both Open MPI and your end 
application.

That being said, I'm kinda guessing OMPI *was* built with the Intel compiler 
suite (because you imply that mpic++ is using icpc); I'm just asking to be sure.

If OMPI was build with the Intel compilers, you might want to add a -E to the 
compile line and redirect the stdout to foo.cc.  -E sends the code through the 
preprocessor, but doesn't actually compile it.  What will end up in foo.cc will 
be what the code looks like after it goes through the preprocessor (i.e., all 
#define's resolved, all #include's expanded, etc.).

Find the lines that it is complaining about and see why it thinks that there 
are no type specifiers.  I.e., OMPI's "virtual void Free();" lines in 
datatype.h shouldn't be causing any problems.  See if there is something wrong 
-- after the preprocessor -- in the line above that in datatype.h, for example.

Perhaps some errant #define from elsewhere in the application is conflicting 
with OMPI's header files...?



On Aug 12, 2012, at 12:33 AM, Stephen J. Barr wrote:

> Hello,
> 
> I have the latest OpenMPI on linux which I compiled with the Intel compiler 
> suite. I am trying to compile an OpenMPI application. My particular 
> application uses RInside and RcppEigen. If I comment out the openMPI parts of 
> my code, the compile string is:
> 
> icpc -I/usr/share/R/include -I/usr/lib/R/site-library/Rcpp/include 
> -I/usr/local/lib/R/site-library/RInside/include -O3 -pipe -g -Wall  
> -I/usr/local/lib/R/site-library/RcppEigen/include   
> sjb_simple_smle_with_Rinside.cpp  -L/usr/lib/R/lib -lR  -lblas -llapack 
> -L/usr/lib/R/site-library/Rcpp/lib -lRcpp 
> -Wl,-rpath,/usr/lib/R/site-library/Rcpp/lib 
> -L/usr/local/lib/R/site-library/RInside/lib -lRInside 
> -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib  -o 
> sjb_simple_smle_with_Rinside
> 
> Thus, I tried to compile with mpic++ using:
> 
> mpic++ -I/usr/share/R/include -I/usr/lib/R/site-library/Rcpp/include 
> -I/usr/local/lib/R/site-library/RInside/include -O3 -pipe -g -Wall  
> -I/usr/local/lib/R/site-library/RcppEigen/include   
> sjb_simple_smle_with_Rinside.cpp  -L/usr/lib/R/lib -lR  -lblas -llapack 
> -L/usr/lib/R/site-library/Rcpp/lib -lRcpp 
> -Wl,-rpath,/usr/lib/R/site-library/Rcpp/lib 
> -L/usr/local/lib/R/site-library/RInside/lib -lRInside 
> -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib  -o 
> sjb_simple_smle_with_Rinside
> 
> If I uncomment
> #include "mpi.h"
> 
> and try to compile, I get the errors below. Is there any trick to compiling 
> OpenMPI applications with the Intel compilers?
> 
> Thanks,
> Stephen
> 
> COMPILE ERROR:
> 
> stevejb@ursamajor:~/Projects/big_data_sim_mle/simple_smle/R_inside_version$ 
> mpic++ -I/usr/share/R/include -I/usr/lib/R/site-library/Rcpp/include 
> -I/usr/local/lib/R/site-library/RInside/include -O3 -pipe -g -Wall 
> -I/usr/local/lib/R/site-library/RcppEigen/include 
> sjb_simple_smle_with_Rinside.cpp -L/usr/lib/R/lib -lR -lblas -llapack 
> -L/usr/lib/R/site-library/Rcpp/lib -lRcpp 
> -Wl,-rpath,/usr/lib/R/site-library/Rcpp/lib 
> -L/usr/local/lib/R/site-library/RInside/lib -lRInside 
> -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib -o 
> sjb_simple_smle_with_Rinside -shared-intel -I/usr/local/include -pthread 
> -L/usr/local/lib -lmpi_cxx -lmpi -ldl -lm -Wl,--export-dynamic -lrt -lnsl 
> -lutil
> /usr/local/include/openmpi/ompi/mpi/cxx/datatype.h(142): error: expected a 
> type specifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/datatype.h(142): error: expected a ")"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/datatype.h(142): error: expected an 
> identifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/datatype.h(142): error: "virtual" is 
> not allowed
>     virtual void Free();
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/datatype.h(142): error: expected a ";"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op.h(48): error: expected a type 
> specifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op.h(48): error: expected a ")"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op.h(48): error: expected an 
> identifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op.h(48): error: "virtual" is not 
> allowed
>     virtual void Free();
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op.h(48): error: expected a ";"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request.h(96): error: expected a type 
> specifier
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request.h(96): error: expected a ")"
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request.h(96): error: expected an 
> identifier
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request.h(96): error: "virtual" is 
> not allowed
>     virtual void Free(void);
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request.h(96): error: expected a ";"
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/group.h(111): error: expected a type 
> specifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/group.h(111): error: expected a ")"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/group.h(111): error: expected an 
> identifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/group.h(111): error: "virtual" is not 
> allowed
>     virtual void Free();
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/group.h(111): error: expected a ";"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/comm.h(264): error: expected a type 
> specifier
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/comm.h(264): error: expected a ")"
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/comm.h(264): error: expected an 
> identifier
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/comm.h(264): error: "virtual" is not 
> allowed
>     virtual void Free(void);
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/comm.h(264): error: expected a ";"
>     virtual void Free(void);
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/win.h(118): error: expected a type 
> specifier
>     virtual void Free(); 
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/win.h(118): error: expected a ")"
>     virtual void Free(); 
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/win.h(118): error: expected an 
> identifier
>     virtual void Free(); 
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/win.h(118): error: "virtual" is not 
> allowed
>     virtual void Free(); 
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/win.h(118): error: expected a ";"
>     virtual void Free(); 
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/errhandler.h(59): error: expected a 
> type specifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/errhandler.h(59): error: expected a 
> ")"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/errhandler.h(59): error: expected an 
> identifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/errhandler.h(59): error: "virtual" is 
> not allowed
>     virtual void Free();
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/errhandler.h(59): error: expected a 
> ";"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/info.h(84): error: expected a type 
> specifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/info.h(84): error: expected a ")"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/info.h(84): error: expected an 
> identifier
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/info.h(84): error: "virtual" is not 
> allowed
>     virtual void Free();
>     ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/info.h(84): error: expected a ";"
>     virtual void Free();
>                  ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(39): error: expected 
> an identifier
>   MPI::Request::Free() 
>                 ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(38): error: inline 
> specifier allowed on function declarations only
>   inline void
>   ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(39): error: incomplete 
> type is not allowed
>   MPI::Request::Free() 
>                 ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(39): error: a 
> nonstatic member reference must be relative to a specific object
>   MPI::Request::Free() 
>                 ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(39): error: expected 
> an expression
>   MPI::Request::Free() 
>                 ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(39): error: expected a 
> ")"
>   MPI::Request::Free() 
>                 ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/request_inln.h(40): error: expected a 
> ";"
>   {
>   ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(123): error: identifier 
> "ompi_op_set_cxx_callback" is undefined
>       ompi_op_set_cxx_callback(mpi_op, (MPI_User_function*) func);
>       ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(128): error: expected an 
> identifier
>   MPI::Op::Free()
>            ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(127): error: inline 
> specifier allowed on function declarations only
>   inline void
>   ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(128): error: incomplete 
> type is not allowed
>   MPI::Op::Free()
>            ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(128): error: a nonstatic 
> member reference must be relative to a specific object
>   MPI::Op::Free()
>            ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(128): error: expected an 
> expression
>   MPI::Op::Free()
>            ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(128): error: expected a ")"
>   MPI::Op::Free()
>            ^
> 
> /usr/local/include/openmpi/ompi/mpi/cxx/op_inln.h(129): error: expected a ";"
>   {
>   ^
> 
> sjb_simple_smle_with_Rinside.cpp(35): warning #12: parsing restarts here 
> after previous syntax error
>   using namespace Rcpp;
>                       ^
> 
> sjb_simple_smle_with_Rinside.cpp(77): error: identifier "as" is undefined
>     const Map<MatrixXd> Xmat(as<Map<MatrixXd> >(Xmat_sexp));
>                              ^
> 
> sjb_simple_smle_with_Rinside.cpp(77): error: type name is not allowed
>     const Map<MatrixXd> Xmat(as<Map<MatrixXd> >(Xmat_sexp));
>                                 ^
> 
> sjb_simple_smle_with_Rinside.cpp(80): error: type name is not allowed
>     const Map<MatrixXd> Ymat(as<Map<MatrixXd> >(Ymat_sexp));
>                                 ^
> 
> sjb_simple_smle_with_Rinside.cpp(87): error: type name is not allowed
>     const Map<MatrixXd> ua(as<Map<MatrixXd> >(ua_sexp));
>                               ^
> 
> sjb_simple_smle_with_Rinside.cpp(89): error: type name is not allowed
>     const Map<MatrixXd> ub(as<Map<MatrixXd> >(ub_sexp));
>                               ^
> 
> sjb_simple_smle_with_Rinside.cpp(98): error: type name is not allowed
>     const Map<VectorXd> start_vector(as<Map<VectorXd> >(start_sexp));
>                                         ^
> 
> compilation aborted for sjb_simple_smle_with_Rinside.cpp (code 2)
> 
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to