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
......@@ -32,6 +32,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Scatter MPI_Scatter
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Scatter as PMPI_Scatter
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Scatter")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Scatterv MPI_Scatterv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Scatterv as PMPI_Scatterv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Scatterv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_compare MPI_Comm_compare
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_compare as PMPI_Comm_compare
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) __attribute__((weak,alias("PMPI_Comm_compare")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_create MPI_Comm_create
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_create as PMPI_Comm_create
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_create")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_create_group MPI_Comm_create_group
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_create_group as PMPI_Comm_create_group
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_create_group")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_dup MPI_Comm_dup
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_dup as PMPI_Comm_dup
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_dup")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_dup_with_info MPI_Comm_dup_with_info
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_dup_with_info as PMPI_Comm_dup_with_info
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_dup_with_info")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_free MPI_Comm_free
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_free as PMPI_Comm_free
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_free(MPI_Comm *comm) __attribute__((weak,alias("PMPI_Comm_free")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_get_info MPI_Comm_get_info
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_get_info as PMPI_Comm_get_info
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info) __attribute__((weak,alias("PMPI_Comm_get_info")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_get_name MPI_Comm_get_name
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_get_name as PMPI_Comm_get_name
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen) __attribute__((weak,alias("PMPI_Comm_get_name")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_group MPI_Comm_group
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_group as PMPI_Comm_group
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) __attribute__((weak,alias("PMPI_Comm_group")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPIX_Comm_group_failed MPIX_Comm_group_failed
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Comm_group_failed as PMPIX_Comm_group_failed
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPIX_Comm_group_failed(MPI_Comm comm, MPI_Group *failed_group) __attribute__((weak,alias("PMPIX_Comm_group_failed")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_idup MPI_Comm_idup
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_idup as PMPI_Comm_idup
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request) __attribute__((weak,alias("PMPI_Comm_idup")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_rank MPI_Comm_rank
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_rank as PMPI_Comm_rank
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_rank(MPI_Comm comm, int *rank) __attribute__((weak,alias("PMPI_Comm_rank")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPIX_Comm_reenable_anysource MPIX_Comm_reenable_anysource
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Comm_reenable_anysource as PMPIX_Comm_reenable_anysource
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPIX_Comm_reenable_anysource(MPI_Comm comm, MPI_Group *failed_group) __attribute__((weak,alias("PMPIX_Comm_reenable_anysource")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_remote_group MPI_Comm_remote_group
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_remote_group as PMPI_Comm_remote_group
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) __attribute__((weak,alias("PMPI_Comm_remote_group")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPIX_Comm_remote_group_failed MPIX_Comm_remote_group_failed
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPIX_Comm_remote_group_failed as PMPIX_Comm_remote_group_failed
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPIX_Comm_remote_group_failed(MPI_Comm comm, MPI_Group *failed_group) __attribute__((weak,alias("PMPIX_Comm_remote_group_failed")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_remote_size MPI_Comm_remote_size
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_remote_size as PMPI_Comm_remote_size
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_remote_size(MPI_Comm comm, int *size) __attribute__((weak,alias("PMPI_Comm_remote_size")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -16,6 +16,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_set_info MPI_Comm_set_info
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_set_info as PMPI_Comm_set_info
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info) __attribute__((weak,alias("PMPI_Comm_set_info")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_set_name MPI_Comm_set_name
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_set_name as PMPI_Comm_set_name
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name) __attribute__((weak,alias("PMPI_Comm_set_name")));
#endif
/* -- 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