From e64562e9587e660d3750d517b7eb1c9b67854d4e Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Thu, 28 Oct 2004 23:37:14 +0000 Subject: [PATCH] Now they seems to work. This commit was SVN r3422. --- src/mpi/c/attr_put.c | 12 ++++++------ src/mpi/f77/attr_put_f.c | 9 ++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/mpi/c/attr_put.c b/src/mpi/c/attr_put.c index 6b6f139fb6..ec35437282 100644 --- a/src/mpi/c/attr_put.c +++ b/src/mpi/c/attr_put.c @@ -25,15 +25,15 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) if (MPI_PARAM_CHECK) { OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (MPI_COMM_NULL == comm) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, - FUNC_NAME); - } + if (MPI_COMM_NULL == comm) { + return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + FUNC_NAME); + } } - + ret = ompi_attr_set(COMM_ATTR, comm, &comm->c_keyhash, keyval, attribute_val, false, true); - + OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/f77/attr_put_f.c b/src/mpi/f77/attr_put_f.c index 57af778ccd..4f6662c848 100644 --- a/src/mpi/f77/attr_put_f.c +++ b/src/mpi/f77/attr_put_f.c @@ -50,7 +50,6 @@ void mpi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, MPI_Fint *ierr) { MPI_Comm c_comm; - int *c_value; c_comm = MPI_Comm_f2c(*comm); @@ -62,11 +61,7 @@ void mpi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, possible that the C value is larger than the Fortran value. MPI says that we sign-extend in this case. */ - c_value = (int *) *attribute_val; *ierr = OMPI_INT_2_FINT(MPI_Attr_put(c_comm, - OMPI_FINT_2_INT(*keyval), - attribute_val)); - if (MPI_SUCCESS == *ierr) { - - } + OMPI_FINT_2_INT(*keyval), + attribute_val)); }