From de51464aade7e663301ed8ad991c3bab51e6a142 Mon Sep 17 00:00:00 2001 From: Pak Lui Date: Tue, 9 Jan 2007 23:48:39 +0000 Subject: [PATCH] * fix #730 for removing an extra argument from MPI::Win::Get_attr as being corrected in the MPI 2.0 errata. * initialized some variables to make our sensitive sun compiler not to not warn about them when user apps are compiling. This commit was SVN r13058. --- ompi/mpi/cxx/intracomm_inln.h | 3 ++- ompi/mpi/cxx/request_inln.h | 3 ++- ompi/mpi/cxx/topology_inln.h | 5 +++-- ompi/mpi/cxx/win.h | 4 ++-- ompi/mpi/cxx/win_inln.h | 6 +++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ompi/mpi/cxx/intracomm_inln.h b/ompi/mpi/cxx/intracomm_inln.h index eb0bf07fdf..e6079391cc 100644 --- a/ompi/mpi/cxx/intracomm_inln.h +++ b/ompi/mpi/cxx/intracomm_inln.h @@ -11,6 +11,7 @@ // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. // Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -20,7 +21,7 @@ inline MPI::Intracomm::Intracomm(MPI_Comm data) { - int flag; + int flag = 0; if (MPI::Is_initialized() && (data != MPI_COMM_NULL)) { (void)MPI_Comm_test_inter(data, &flag); if (flag) { diff --git a/ompi/mpi/cxx/request_inln.h b/ompi/mpi/cxx/request_inln.h index 201152a945..7bfd6a95fa 100644 --- a/ompi/mpi/cxx/request_inln.h +++ b/ompi/mpi/cxx/request_inln.h @@ -11,6 +11,7 @@ // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. // Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -313,7 +314,7 @@ MPI::Prequest::Startall(int count, MPI:: Prequest array_of_requests[]) inline bool MPI::Request::Get_status(MPI::Status& status) const { - int flag; + int flag = 0; MPI_Status c_status; // Call the underlying MPI function rather than simply returning diff --git a/ompi/mpi/cxx/topology_inln.h b/ompi/mpi/cxx/topology_inln.h index 2757d44f72..c44d74b7d2 100644 --- a/ompi/mpi/cxx/topology_inln.h +++ b/ompi/mpi/cxx/topology_inln.h @@ -10,6 +10,7 @@ // University of Stuttgart. All rights reserved. // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. +// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -23,7 +24,7 @@ inline MPI::Cartcomm::Cartcomm(const MPI_Comm& data) { - int status; + int status = 0; if (MPI::Is_initialized() && (data != MPI_COMM_NULL)) { (void)MPI_Topo_test(data, &status) ; if (status == MPI_CART) @@ -141,7 +142,7 @@ MPI::Cartcomm::Clone() const inline MPI::Graphcomm::Graphcomm(const MPI_Comm& data) { - int status; + int status = 0; if (MPI::Is_initialized() && (data != MPI_COMM_NULL)) { (void)MPI_Topo_test(data, &status) ; if (status == MPI_GRAPH) diff --git a/ompi/mpi/cxx/win.h b/ompi/mpi/cxx/win.h index 9728ba10af..3bbd5b3f51 100644 --- a/ompi/mpi/cxx/win.h +++ b/ompi/mpi/cxx/win.h @@ -11,6 +11,7 @@ // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. // Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -150,8 +151,7 @@ public: static void Free_keyval(int& win_keyval); - bool Get_attr(const Win& win, int win_keyval, - void* attribute_val) const; + bool Get_attr(int win_keyval, void* attribute_val) const; virtual void Get_name(char* win_name, int& resultlen) const; diff --git a/ompi/mpi/cxx/win_inln.h b/ompi/mpi/cxx/win_inln.h index b90cb905f6..ed5222e327 100644 --- a/ompi/mpi/cxx/win_inln.h +++ b/ompi/mpi/cxx/win_inln.h @@ -10,6 +10,7 @@ // University of Stuttgart. All rights reserved. // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. +// Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -189,11 +190,10 @@ MPI::Win::Delete_attr(int win_keyval) inline bool -MPI::Win::Get_attr(const Win& win, int win_keyval, - void* attribute_val) const +MPI::Win::Get_attr(int win_keyval, void* attribute_val) const { int ret; - (void) MPI_Win_get_attr(win, win_keyval, attribute_val, &ret); + (void) MPI_Win_get_attr(mpi_win, win_keyval, attribute_val, &ret); return OPAL_INT_TO_BOOL(ret); }