From fbeaf0919d58aa77a4a19aed72c6fee51ed31f2c Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 16 Jan 2007 22:22:08 +0000 Subject: [PATCH] Fixes trac:732. The 2nd parameter in MPI_WIN_CREATE is actually an address integer, not a regular integer. The F77 prototype for this function was wrong, causing Bad Things on some 64 bit platforms (on other 64 bit platforms, we just got lucky). This commit was SVN r13133. The following Trac tickets were found above: Ticket 732 --> https://svn.open-mpi.org/trac/ompi/ticket/732 --- ompi/mpi/f77/prototypes_mpi.h | 4 ++-- ompi/mpi/f77/win_create_f.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ompi/mpi/f77/prototypes_mpi.h b/ompi/mpi/f77/prototypes_mpi.h index 223530de25..a6e92586e8 100644 --- a/ompi/mpi/f77/prototypes_mpi.h +++ b/ompi/mpi/f77/prototypes_mpi.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2006-2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -318,7 +318,7 @@ PN(void, mpi_wait, MPI_WAIT, (MPI_Fint *request, MPI_Fint *status, MPI_Fint *ier PN(void, mpi_waitsome, MPI_WAITSOME, (MPI_Fint *incount, MPI_Fint *array_of_requests, MPI_Fint *outcount, MPI_Fint *array_of_indices, MPI_Fint *array_of_statuses, MPI_Fint *ierr)); PN(void, mpi_win_call_errhandler, MPI_WIN_CALL_ERRHANDLER, (MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr)); PN(void, mpi_win_complete, MPI_WIN_COMPLETE, (MPI_Fint *win, MPI_Fint *ierr)); -PN(void, mpi_win_create, MPI_WIN_CREATE, (char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr)); +PN(void, mpi_win_create, MPI_WIN_CREATE, (char *base, MPI_Aint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr)); PN(void, mpi_win_create_errhandler, MPI_WIN_CREATE_ERRHANDLER, (ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr)); PN(void, mpi_win_create_keyval, MPI_WIN_CREATE_KEYVAL, (ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr)); PN(void, mpi_win_delete_attr, MPI_WIN_DELETE_ATTR, (MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr)); diff --git a/ompi/mpi/f77/win_create_f.c b/ompi/mpi/f77/win_create_f.c index 104d8e02fe..28db264f9f 100644 --- a/ompi/mpi/f77/win_create_f.c +++ b/ompi/mpi/f77/win_create_f.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +32,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_CREATE, pmpi_win_create_, pmpi_win_create__, pmpi_win_create_f, - (char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr), + (char *base, MPI_Aint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr), (base, size, disp_unit, info, comm, win, ierr) ) #endif @@ -48,7 +49,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE, mpi_win_create_, mpi_win_create__, mpi_win_create_f, - (char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr), + (char *base, MPI_Aint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr), (base, size, disp_unit, info, comm, win, ierr) ) #endif @@ -57,7 +58,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE, #include "ompi/mpi/f77/profile/defines.h" #endif -void mpi_win_create_f(char *base, MPI_Fint *size, MPI_Fint *disp_unit, +void mpi_win_create_f(char *base, MPI_Aint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr) {