diff --git a/src/mpi/c/Makefile.am b/src/mpi/c/Makefile.am index ac6ad6ee32..099a575cb3 100644 --- a/src/mpi/c/Makefile.am +++ b/src/mpi/c/Makefile.am @@ -111,7 +111,7 @@ libmpi_c_mpi_la_SOURCES = \ comm_rank.c \ comm_remote_group.c \ comm_remote_size.c \ - comm_set_attribute.c \ + comm_set_attr.c \ comm_set_errhandler.c \ comm_set_name.c \ comm_size.c \ diff --git a/src/mpi/c/attr_delete.c b/src/mpi/c/attr_delete.c index bb0c5e869b..1407a4912a 100644 --- a/src/mpi/c/attr_delete.c +++ b/src/mpi/c/attr_delete.c @@ -17,17 +17,21 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Attr_delete"; + int MPI_Attr_delete(MPI_Comm comm, int keyval) { int ret; - if (MPI_COMM_NULL == comm) - return MPI_ERR_COMM; + if (MPI_PARAM_CHECK) { + if (MPI_COMM_NULL == comm) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + FUNC_NAME); + } + } - ret = lam_attr_delete(COMM_ATTR, comm, keyval, 0); + ret = lam_attr_delete(COMM_ATTR, comm, comm->c_keyhash, keyval, 0); - /* Error hanndling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/attr_get.c b/src/mpi/c/attr_get.c index e1dbef9304..3b438f00da 100644 --- a/src/mpi/c/attr_get.c +++ b/src/mpi/c/attr_get.c @@ -17,14 +17,20 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Attr_get"; + int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag) { int ret; - if ((NULL == attribute_val) || (NULL == flag)) - return MPI_ERR_ARG; + + if (MPI_PARAM_CHECK) { + if ((NULL == attribute_val) || (NULL == flag)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + + ret = lam_attr_get(comm->c_keyhash, keyval, attribute_val, flag); - ret = lam_attr_get(COMM_ATTR, comm, keyval, attribute_val, flag); - - return ret; } diff --git a/src/mpi/c/attr_put.c b/src/mpi/c/attr_put.c index b3697e1929..36130197a7 100644 --- a/src/mpi/c/attr_put.c +++ b/src/mpi/c/attr_put.c @@ -17,16 +17,22 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Attr_put"; + int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) { int ret; - if (MPI_COMM_NULL == comm) - return MPI_ERR_COMM; - ret = lam_attr_set(COMM_ATTR, comm, keyval, attribute_val, 0); + if (MPI_PARAM_CHECK) { + if (MPI_COMM_NULL == comm) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + FUNC_NAME); + } + } - /* Error handling code here */ + ret = lam_attr_set(COMM_ATTR, comm, comm->c_keyhash, + keyval, attribute_val, 0); - return ret; + LAM_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/comm_create_keyval.c b/src/mpi/c/comm_create_keyval.c index d30ac9e0d9..b3f04b5c5f 100644 --- a/src/mpi/c/comm_create_keyval.c +++ b/src/mpi/c/comm_create_keyval.c @@ -16,21 +16,29 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Comm_create_keyval"; + int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state) { int ret; - - if ((NULL == comm_copy_attr_fn) || (NULL == comm_delete_attr_fn) || - (NULL == comm_keyval)) - return MPI_ERR_ARG; + lam_attribute_fn_ptr_union_t copy_fn; + lam_attribute_fn_ptr_union_t del_fn; - ret = lam_attr_create_keyval(COMM_ATTR, (void *)comm_copy_attr_fn, - (void *)comm_delete_attr_fn, - comm_keyval, extra_state, 0); + if (MPI_PARAM_CHECK) { + if ((NULL == comm_copy_attr_fn) || (NULL == comm_delete_attr_fn) || + (NULL == comm_keyval)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + + copy_fn.attr_communicator_copy_fn = comm_copy_attr_fn; + del_fn.attr_communicator_delete_fn = comm_delete_attr_fn; - /* Error handling code here */ + ret = lam_attr_create_keyval(COMM_ATTR, copy_fn, + del_fn, comm_keyval, extra_state, 0); - return ret; + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/comm_delete_attr.c b/src/mpi/c/comm_delete_attr.c index 439794bbc6..1120174cc3 100644 --- a/src/mpi/c/comm_delete_attr.c +++ b/src/mpi/c/comm_delete_attr.c @@ -16,16 +16,20 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Comm_delete_attr"; + int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) { int ret; - if (MPI_COMM_NULL == comm) - return MPI_ERR_COMM; + if (MPI_PARAM_CHECK) { + if (MPI_COMM_NULL == comm) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, + FUNC_NAME); + } + } - ret = lam_attr_delete(COMM_ATTR, comm, comm_keyval, 0); + ret = lam_attr_delete(COMM_ATTR, comm, comm->c_keyhash, comm_keyval, 0); - /* Error hanndling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/comm_free_keyval.c b/src/mpi/c/comm_free_keyval.c index d923aec033..e8ac18f44a 100644 --- a/src/mpi/c/comm_free_keyval.c +++ b/src/mpi/c/comm_free_keyval.c @@ -16,16 +16,22 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Comm_free_keyval"; + int MPI_Comm_free_keyval(int *comm_keyval) { int ret; /* Check for valid key pointer */ - if (NULL == comm_keyval) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if (NULL == comm_keyval) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } ret = lam_attr_free_keyval(COMM_ATTR, comm_keyval, 0); - return ret; + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/comm_get_attr.c b/src/mpi/c/comm_get_attr.c index 49dedb444b..370e133afd 100644 --- a/src/mpi/c/comm_get_attr.c +++ b/src/mpi/c/comm_get_attr.c @@ -16,15 +16,22 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Comm_get_attr"; + int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag) { int ret; - if ((NULL == attribute_val) || (NULL == flag)) - return MPI_ERR_ARG; - ret = lam_attr_get(COMM_ATTR, comm, comm_keyval, + if (MPI_PARAM_CHECK) { + if ((NULL == attribute_val) || (NULL == flag)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + + ret = lam_attr_get(comm->c_keyhash, comm_keyval, attribute_val, flag); - return ret; + LAM_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/keyval_create.c b/src/mpi/c/keyval_create.c index 335c379f47..bc48bbc3fb 100644 --- a/src/mpi/c/keyval_create.c +++ b/src/mpi/c/keyval_create.c @@ -16,22 +16,28 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Keyval_create"; + int MPI_Keyval_create(MPI_Copy_function *copy_attr_fn, MPI_Delete_function *delete_attr_fn, int *keyval, void *extra_state) { int ret; - + lam_attribute_fn_ptr_union_t copy_fn; + lam_attribute_fn_ptr_union_t del_fn; + + if (MPI_PARAM_CHECK) { if ((NULL == copy_attr_fn) || (NULL == delete_attr_fn) || - (NULL == keyval)) - return MPI_ERR_ARG; + (NULL == keyval)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + copy_fn.attr_communicator_copy_fn = copy_attr_fn; + del_fn.attr_communicator_delete_fn = delete_attr_fn; - ret = lam_attr_create_keyval(COMM_ATTR, (void *)copy_attr_fn, - (void *)delete_attr_fn, - keyval, extra_state, 0); - - /* Error handling code here */ - - return ret; + ret = lam_attr_create_keyval(COMM_ATTR, copy_fn, + del_fn, keyval, extra_state, 0); + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/keyval_free.c b/src/mpi/c/keyval_free.c index cc563dc42f..43d2f0a2cb 100644 --- a/src/mpi/c/keyval_free.c +++ b/src/mpi/c/keyval_free.c @@ -16,17 +16,21 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Keyval_free"; + int MPI_Keyval_free(int *keyval) { int ret; /* Check for valid key pointer */ - - if (NULL == keyval) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if (NULL == keyval) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } ret = lam_attr_free_keyval(COMM_ATTR, keyval, 0); - return ret; - + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/profile/Makefile.am b/src/mpi/c/profile/Makefile.am index a9d2c75007..176fcea7fb 100644 --- a/src/mpi/c/profile/Makefile.am +++ b/src/mpi/c/profile/Makefile.am @@ -84,7 +84,7 @@ nodist_libmpi_c_pmpi_la_SOURCES = \ pcomm_rank.c \ pcomm_remote_group.c \ pcomm_remote_size.c \ - pcomm_set_attribute.c \ + pcomm_set_attr.c \ pcomm_set_errhandler.c \ pcomm_set_name.c \ pcomm_size.c \ diff --git a/src/mpi/c/type_create_keyval.c b/src/mpi/c/type_create_keyval.c index 70660ab6c0..f0ce186129 100644 --- a/src/mpi/c/type_create_keyval.c +++ b/src/mpi/c/type_create_keyval.c @@ -16,6 +16,8 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Type_create_keyval"; + int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, MPI_Type_delete_attr_function *type_delete_attr_fn, @@ -23,18 +25,24 @@ MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, void *extra_state) { int ret; + lam_attribute_fn_ptr_union_t copy_fn; + lam_attribute_fn_ptr_union_t del_fn; - if ((NULL == type_copy_attr_fn) || (NULL == type_delete_attr_fn) || - (NULL == type_keyval)) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if ((NULL == type_copy_attr_fn) || (NULL == type_delete_attr_fn) || + (NULL == type_keyval)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + + copy_fn.attr_datatype_copy_fn = type_copy_attr_fn; + del_fn.attr_datatype_delete_fn = type_delete_attr_fn; - ret = lam_attr_create_keyval(TYPE_ATTR, (void *)type_copy_attr_fn, - (void *)type_delete_attr_fn, + ret = lam_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn, type_keyval, extra_state, 0); - /* Error handling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/type_delete_attr.c b/src/mpi/c/type_delete_attr.c index 33df2c58a4..73620efc6f 100644 --- a/src/mpi/c/type_delete_attr.c +++ b/src/mpi/c/type_delete_attr.c @@ -16,17 +16,21 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Type_delete_attr"; + int MPI_Type_delete_attr (MPI_Datatype type, int type_keyval) { int ret; - if (MPI_DATATYPE_NULL == type) - return MPI_ERR_TYPE; + if (MPI_PARAM_CHECK) { + if (MPI_DATATYPE_NULL == type) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, + FUNC_NAME); + } + } - ret = lam_attr_delete(TYPE_ATTR, type, type_keyval, 0); + ret = lam_attr_delete(TYPE_ATTR, type, type->d_keyhash, type_keyval, 0); - /* Error handling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, type, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/type_free_keyval.c b/src/mpi/c/type_free_keyval.c index d5ed8a6b0e..78ea73d94d 100644 --- a/src/mpi/c/type_free_keyval.c +++ b/src/mpi/c/type_free_keyval.c @@ -16,6 +16,8 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Type_free_keyval"; + int MPI_Type_free_keyval(int *type_keyval) { @@ -23,10 +25,14 @@ MPI_Type_free_keyval(int *type_keyval) /* Check for valid key pointer */ - if (NULL == type_keyval) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if (NULL == type_keyval) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } ret = lam_attr_free_keyval(TYPE_ATTR, type_keyval, 0); - - return ret; + + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/type_get_attr.c b/src/mpi/c/type_get_attr.c index 0a2a71d74c..d7cbe5b28a 100644 --- a/src/mpi/c/type_get_attr.c +++ b/src/mpi/c/type_get_attr.c @@ -16,6 +16,8 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Type_get_attr"; + int MPI_Type_get_attr (MPI_Datatype type, int type_keyval, @@ -24,11 +26,15 @@ MPI_Type_get_attr (MPI_Datatype type, { int ret; - if ((NULL == attribute_val) || (NULL == flag)) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if ((NULL == attribute_val) || (NULL == flag)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } - ret = lam_attr_get(TYPE_ATTR, type, type_keyval, + ret = lam_attr_get(type->d_keyhash, type_keyval, attribute_val, flag); - - return ret; + + LAM_ERRHANDLER_RETURN(ret, type, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/type_set_attr.c b/src/mpi/c/type_set_attr.c index b405c11e80..fe772ac3e2 100644 --- a/src/mpi/c/type_set_attr.c +++ b/src/mpi/c/type_set_attr.c @@ -16,6 +16,8 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Type_set_attr"; + int MPI_Type_set_attr (MPI_Datatype type, int type_keyval, @@ -23,12 +25,16 @@ MPI_Type_set_attr (MPI_Datatype type, { int ret; - if (MPI_DATATYPE_NULL == type) - return MPI_ERR_TYPE; + if (MPI_PARAM_CHECK) { + if (MPI_DATATYPE_NULL == type) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, + FUNC_NAME); + } + } - ret = lam_attr_set(TYPE_ATTR, type, type_keyval, attribute_val, 0); + ret = lam_attr_set(TYPE_ATTR, type, type->d_keyhash, + type_keyval, attribute_val, 0); - /* Error handling code here */ + LAM_ERRHANDLER_RETURN(ret, type, MPI_ERR_OTHER, FUNC_NAME); - return ret; } diff --git a/src/mpi/c/win_create_keyval.c b/src/mpi/c/win_create_keyval.c index e2a9e8ba5b..8d466a96d4 100644 --- a/src/mpi/c/win_create_keyval.c +++ b/src/mpi/c/win_create_keyval.c @@ -16,21 +16,28 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Win_create_keyval"; + int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state) { int ret; + lam_attribute_fn_ptr_union_t copy_fn; + lam_attribute_fn_ptr_union_t del_fn; - if ((NULL == win_copy_attr_fn) || (NULL == win_delete_attr_fn) || - (NULL == win_keyval)) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if ((NULL == win_copy_attr_fn) || (NULL == win_delete_attr_fn) || + (NULL == win_keyval)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + copy_fn.attr_win_copy_fn = win_copy_attr_fn; + del_fn.attr_win_delete_fn = win_delete_attr_fn; - ret = lam_attr_create_keyval(WIN_ATTR, (void *)win_copy_attr_fn, - (void *)win_delete_attr_fn, + ret = lam_attr_create_keyval(WIN_ATTR, copy_fn, del_fn, win_keyval, extra_state, 0); - /* Error handling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/win_delete_attr.c b/src/mpi/c/win_delete_attr.c index 24c8d204e0..62560ebbef 100644 --- a/src/mpi/c/win_delete_attr.c +++ b/src/mpi/c/win_delete_attr.c @@ -16,16 +16,20 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Win_delete_attr"; + int MPI_Win_delete_attr(MPI_Win win, int win_keyval) { int ret; - if (MPI_WIN_NULL == win) - return MPI_ERR_WIN; + if (MPI_PARAM_CHECK) { + if (MPI_WIN_NULL == win) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, + FUNC_NAME); + } + } - ret = lam_attr_delete(WIN_ATTR, win, win_keyval, 0); + ret = lam_attr_delete(WIN_ATTR, win, win->w_keyhash, win_keyval, 0); - /* Error hanndling code here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/win_free_keyval.c b/src/mpi/c/win_free_keyval.c index 4a967c0140..6844cb8a31 100644 --- a/src/mpi/c/win_free_keyval.c +++ b/src/mpi/c/win_free_keyval.c @@ -16,16 +16,22 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Win_free_keyval"; + int MPI_Win_free_keyval(int *win_keyval) { int ret; /* Check for valid key pointer */ - if (NULL == win_keyval) - return MPI_ERR_ARG; + if (MPI_PARAM_CHECK) { + if (NULL == win_keyval) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } ret = lam_attr_free_keyval(WIN_ATTR, win_keyval, 0); - return ret; + LAM_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME); } diff --git a/src/mpi/c/win_get_attr.c b/src/mpi/c/win_get_attr.c index 5bb8c43d5c..1260183a90 100644 --- a/src/mpi/c/win_get_attr.c +++ b/src/mpi/c/win_get_attr.c @@ -16,16 +16,22 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Win_get_attr"; + int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag) { int ret; - if ((NULL == attribute_val) || (NULL == flag)) - - return MPI_ERR_ARG; - - ret = lam_attr_get(WIN_ATTR, win, win_keyval, + if (MPI_PARAM_CHECK) { + if ((NULL == attribute_val) || (NULL == flag)) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, + FUNC_NAME); + } + } + + ret = lam_attr_get(win->w_keyhash, win_keyval, attribute_val, flag); - return ret; + LAM_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); + } diff --git a/src/mpi/c/win_set_attr.c b/src/mpi/c/win_set_attr.c index b584d4809c..ebea505258 100644 --- a/src/mpi/c/win_set_attr.c +++ b/src/mpi/c/win_set_attr.c @@ -16,16 +16,21 @@ #include "mpi/c/profile/defines.h" #endif +static char FUNC_NAME[] = "MPI_Win_set_attr"; + int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) { int ret; - if (MPI_WIN_NULL == win) - return MPI_ERR_WIN; + if (MPI_PARAM_CHECK) { + if (MPI_WIN_NULL == win) { + return LAM_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, + FUNC_NAME); + } + } - ret = lam_attr_set(WIN_ATTR, win, win_keyval, attribute_val, 0); + ret = lam_attr_set(WIN_ATTR, win, win->w_keyhash, + win_keyval, attribute_val, 0); - /* Error handling here */ - - return ret; + LAM_ERRHANDLER_RETURN(ret, win, MPI_ERR_OTHER, FUNC_NAME); }