[mvapich-discuss] problem with MPI::Get_processor_name on MVAPICH

Sayantan Sur surs at cse.ohio-state.edu
Fri Sep 8 19:10:20 EDT 2006


Hello Scott,

Thanks for sending this detailed report. As you might know, MVAPICH is derived from MPICH and follows all functionalities and features according to MPI-1 spec (the original design of which didn't have C++ interface). MVAPICH2 is derived from MPICH2 and follows MPI-2 spec completely. It has the correct definition for Get_processor_name() function   according to MPI-2 standard and the program compiles fine. For users interested in functionalities and features according to MPI-2 spec should use MVAPICH2 (not MVAPICH).

Thanks,
Sayantan.



Scott Weitzenkamp (sweitzen) wrote:

> The enclosed C++ program won't compile with MVAPICH, but does with 
> Open MPI, Intel MPI, and HP MPI.
>  
> $ cat get_proc_name.cpp
> #include <mpi.h>
> int main(int argc, char* argv[])
> {
>     char name[MPI_MAX_PROCESSOR_NAME];
>     int namelen;
>     MPI::Init(argc, argv);
>     MPI::Get_processor_name(name, namelen);
>     MPI::Finalize();
>     return 0;
> }
> $ /usr/local/ofed/mpi/gcc/mvapich-0.9.7-mlx2.2.0/bin/mpiCC 
> get_proc_name.cpp
> get_proc_name.cpp: In function `int main(int, char**)':
> get_proc_name.cpp:7: error: invalid initialization of non-const 
> reference of typ
> e 'char*&' from a temporary of type 'char*'
> ///usr/local/ofed/mpi/gcc/mvapich-0.9.7-mlx2.2.0/include/mpi2c++/functions.h:52:
>  error: in passing argument 1 of `void MPI::Get_processor_name(char*&, 
> int&)'
> Jeff Squyres said:
>  
>
>     The problem is the definition of MPI::Get_processor_name().
>      
>     According to the MPI-2 spec, the function should be:
>      
>     void MPI::Get_processor_name(char* name, int& resultlen)
>      
>     But it looks like MVAPICH's definition is:
>      
>     void MPI::Get_processor_name(char*&, int&)
>      
>     (note the different types of the first param)
>
>  
> Scott Weitzenkamp
> SQA and Release Manager
> Server Virtualization Business Unit
> Cisco Systems
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mvapich-discuss mailing list
>mvapich-discuss at mail.cse.ohio-state.edu
>http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>  
>


-- 
http://www.cse.ohio-state.edu/~surs



More information about the mvapich-discuss mailing list