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
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_delete_attr MPI_Win_delete_attr
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_delete_attr as PMPI_Win_delete_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Win_delete_attr(MPI_Win win, int win_keyval) __attribute__((weak,alias("PMPI_Win_delete_attr")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_free_keyval MPI_Win_free_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_free_keyval as PMPI_Win_free_keyval
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Win_free_keyval(int *win_keyval) __attribute__((weak,alias("PMPI_Win_free_keyval")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_get_attr MPI_Win_get_attr
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_get_attr as PMPI_Win_get_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag) __attribute__((weak,alias("PMPI_Win_get_attr")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_set_attr MPI_Win_set_attr
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_set_attr as PMPI_Win_set_attr
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) __attribute__((weak,alias("PMPI_Win_set_attr")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -45,6 +45,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allgather MPI_Allgather
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allgather as PMPI_Allgather
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Allgather")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -32,6 +32,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allgatherv MPI_Allgatherv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allgatherv as PMPI_Allgatherv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Allgatherv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -63,6 +63,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allreduce MPI_Allreduce
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allreduce as PMPI_Allreduce
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Allreduce")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -62,6 +62,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Alltoall MPI_Alltoall
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoall as PMPI_Alltoall
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Alltoall")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Alltoallv MPI_Alltoallv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoallv as PMPI_Alltoallv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Alltoallv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Alltoallw MPI_Alltoallw
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoallw as PMPI_Alltoallw
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[],
const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm) __attribute__((weak,alias("PMPI_Alltoallw")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -30,6 +30,8 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Barrier MPI_Barrier
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Barrier as PMPI_Barrier
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Barrier(MPI_Comm comm) __attribute__((weak,alias("PMPI_Barrier")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -103,6 +103,9 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Bcast MPI_Bcast
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Bcast as PMPI_Bcast
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Bcast")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Exscan MPI_Exscan
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Exscan as PMPI_Exscan
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Exscan")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -45,6 +45,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Gather MPI_Gather
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Gather as PMPI_Gather
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Gather")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -34,6 +34,11 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Gatherv MPI_Gatherv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Gatherv as PMPI_Gatherv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root,
MPI_Comm comm)
__attribute__((weak,alias("PMPI_Gatherv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallgather MPI_Iallgather
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallgather as PMPI_Iallgather
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iallgather")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallgatherv MPI_Iallgatherv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallgatherv as PMPI_Iallgatherv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
const int recvcounts[], const int displs[], MPI_Datatype recvtype,
MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iallgatherv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallreduce MPI_Iallreduce
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallreduce as PMPI_Iallreduce
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iallreduce")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Ialltoall MPI_Ialltoall
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ialltoall as PMPI_Ialltoall
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Ialltoall")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,12 @@
#pragma _HP_SECONDARY_DEF PMPI_Ialltoallv MPI_Ialltoallv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ialltoallv as PMPI_Ialltoallv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[],
MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm,
MPI_Request *request)
__attribute__((weak,alias("PMPI_Ialltoallv")));
#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