Commit b208dd70 authored by Antonio J. Pena's avatar Antonio J. Pena Committed by Kenneth Raffenetti
Browse files

Fix usage of weak,alias attributes



Moved the weak,alias attribute declarations from header files to the
implementation. Complies with the requirement that alias targets are
defined in the same compilation unit.

Fixes #2002
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent 0011344a
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_complex MPI_Type_create_f90_complex #pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_complex MPI_Type_create_f90_complex
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_create_f90_complex as PMPI_Type_create_f90_complex #pragma _CRI duplicate MPI_Type_create_f90_complex as PMPI_Type_create_f90_complex
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_create_f90_complex(int precision, int range, MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_create_f90_complex")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_integer MPI_Type_create_f90_integer #pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_integer MPI_Type_create_f90_integer
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_create_f90_integer as PMPI_Type_create_f90_integer #pragma _CRI duplicate MPI_Type_create_f90_integer as PMPI_Type_create_f90_integer
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_create_f90_integer(int range, MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_create_f90_integer")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_real MPI_Type_create_f90_real #pragma _HP_SECONDARY_DEF PMPI_Type_create_f90_real MPI_Type_create_f90_real
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_create_f90_real as PMPI_Type_create_f90_real #pragma _CRI duplicate MPI_Type_create_f90_real as PMPI_Type_create_f90_real
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_create_f90_real(int precision, int range, MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_create_f90_real")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
This diff is collapsed.
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Attr_delete MPI_Attr_delete #pragma _HP_SECONDARY_DEF PMPI_Attr_delete MPI_Attr_delete
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Attr_delete as PMPI_Attr_delete #pragma _CRI duplicate MPI_Attr_delete as PMPI_Attr_delete
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Attr_delete(MPI_Comm comm, int keyval) __attribute__((weak,alias("PMPI_Attr_delete")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Attr_get MPI_Attr_get #pragma _HP_SECONDARY_DEF PMPI_Attr_get MPI_Attr_get
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Attr_get as PMPI_Attr_get #pragma _CRI duplicate MPI_Attr_get as PMPI_Attr_get
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag) __attribute__((weak,alias("PMPI_Attr_get")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Attr_put MPI_Attr_put #pragma _HP_SECONDARY_DEF PMPI_Attr_put MPI_Attr_put
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Attr_put as PMPI_Attr_put #pragma _CRI duplicate MPI_Attr_put as PMPI_Attr_put
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) __attribute__((weak,alias("PMPI_Attr_put")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_create_keyval MPI_Comm_create_keyval #pragma _HP_SECONDARY_DEF PMPI_Comm_create_keyval MPI_Comm_create_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_create_keyval as PMPI_Comm_create_keyval #pragma _CRI duplicate MPI_Comm_create_keyval as PMPI_Comm_create_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
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) __attribute__((weak,alias("PMPI_Comm_create_keyval")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_delete_attr MPI_Comm_delete_attr #pragma _HP_SECONDARY_DEF PMPI_Comm_delete_attr MPI_Comm_delete_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_delete_attr as PMPI_Comm_delete_attr #pragma _CRI duplicate MPI_Comm_delete_attr as PMPI_Comm_delete_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) __attribute__((weak,alias("PMPI_Comm_delete_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_free_keyval MPI_Comm_free_keyval #pragma _HP_SECONDARY_DEF PMPI_Comm_free_keyval MPI_Comm_free_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_free_keyval as PMPI_Comm_free_keyval #pragma _CRI duplicate MPI_Comm_free_keyval as PMPI_Comm_free_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_free_keyval(int *comm_keyval) __attribute__((weak,alias("PMPI_Comm_free_keyval")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_get_attr MPI_Comm_get_attr #pragma _HP_SECONDARY_DEF PMPI_Comm_get_attr MPI_Comm_get_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_get_attr as PMPI_Comm_get_attr #pragma _CRI duplicate MPI_Comm_get_attr as PMPI_Comm_get_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag) __attribute__((weak,alias("PMPI_Comm_get_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_set_attr MPI_Comm_set_attr #pragma _HP_SECONDARY_DEF PMPI_Comm_set_attr MPI_Comm_set_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_set_attr as PMPI_Comm_set_attr #pragma _CRI duplicate MPI_Comm_set_attr as PMPI_Comm_set_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) __attribute__((weak,alias("PMPI_Comm_set_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
#pragma _HP_SECONDARY_DEF PMPI_Keyval_create MPI_Keyval_create #pragma _HP_SECONDARY_DEF PMPI_Keyval_create MPI_Keyval_create
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Keyval_create as PMPI_Keyval_create #pragma _CRI duplicate MPI_Keyval_create as PMPI_Keyval_create
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn,
int *keyval, void *extra_state) __attribute__((weak,alias("PMPI_Keyval_create")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Keyval_free MPI_Keyval_free #pragma _HP_SECONDARY_DEF PMPI_Keyval_free MPI_Keyval_free
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Keyval_free as PMPI_Keyval_free #pragma _CRI duplicate MPI_Keyval_free as PMPI_Keyval_free
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Keyval_free(int *keyval) __attribute__((weak,alias("PMPI_Keyval_free")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_create_keyval MPI_Type_create_keyval #pragma _HP_SECONDARY_DEF PMPI_Type_create_keyval MPI_Type_create_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_create_keyval as PMPI_Type_create_keyval #pragma _CRI duplicate MPI_Type_create_keyval as PMPI_Type_create_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
MPI_Type_delete_attr_function *type_delete_attr_fn,
int *type_keyval, void *extra_state) __attribute__((weak,alias("PMPI_Type_create_keyval")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_delete_attr MPI_Type_delete_attr #pragma _HP_SECONDARY_DEF PMPI_Type_delete_attr MPI_Type_delete_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_delete_attr as PMPI_Type_delete_attr #pragma _CRI duplicate MPI_Type_delete_attr as PMPI_Type_delete_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval) __attribute__((weak,alias("PMPI_Type_delete_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_free_keyval MPI_Type_free_keyval #pragma _HP_SECONDARY_DEF PMPI_Type_free_keyval MPI_Type_free_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_free_keyval as PMPI_Type_free_keyval #pragma _CRI duplicate MPI_Type_free_keyval as PMPI_Type_free_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_free_keyval(int *type_keyval) __attribute__((weak,alias("PMPI_Type_free_keyval")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_get_attr MPI_Type_get_attr #pragma _HP_SECONDARY_DEF PMPI_Type_get_attr MPI_Type_get_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_get_attr as PMPI_Type_get_attr #pragma _CRI duplicate MPI_Type_get_attr as PMPI_Type_get_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, int *flag) __attribute__((weak,alias("PMPI_Type_get_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_set_attr MPI_Type_set_attr #pragma _HP_SECONDARY_DEF PMPI_Type_set_attr MPI_Type_set_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_set_attr as PMPI_Type_set_attr #pragma _CRI duplicate MPI_Type_set_attr as PMPI_Type_set_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val) __attribute__((weak,alias("PMPI_Type_set_attr")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_create_keyval MPI_Win_create_keyval #pragma _HP_SECONDARY_DEF PMPI_Win_create_keyval MPI_Win_create_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_create_keyval as PMPI_Win_create_keyval #pragma _CRI duplicate MPI_Win_create_keyval as PMPI_Win_create_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
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) __attribute__((weak,alias("PMPI_Win_create_keyval")));
#endif #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment