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 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_delete_attr MPI_Win_delete_attr #pragma _HP_SECONDARY_DEF PMPI_Win_delete_attr MPI_Win_delete_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_delete_attr as PMPI_Win_delete_attr #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_free_keyval MPI_Win_free_keyval #pragma _HP_SECONDARY_DEF PMPI_Win_free_keyval MPI_Win_free_keyval
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_free_keyval as PMPI_Win_free_keyval #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_get_attr MPI_Win_get_attr #pragma _HP_SECONDARY_DEF PMPI_Win_get_attr MPI_Win_get_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_get_attr as PMPI_Win_get_attr #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Win_set_attr MPI_Win_set_attr #pragma _HP_SECONDARY_DEF PMPI_Win_set_attr MPI_Win_set_attr
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Win_set_attr as PMPI_Win_set_attr #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -45,6 +45,10 @@ cvars: ...@@ -45,6 +45,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allgather MPI_Allgather #pragma _HP_SECONDARY_DEF PMPI_Allgather MPI_Allgather
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allgather as PMPI_Allgather #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -32,6 +32,10 @@ cvars: ...@@ -32,6 +32,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allgatherv MPI_Allgatherv #pragma _HP_SECONDARY_DEF PMPI_Allgatherv MPI_Allgatherv
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allgatherv as PMPI_Allgatherv #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -63,6 +63,10 @@ cvars: ...@@ -63,6 +63,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Allreduce MPI_Allreduce #pragma _HP_SECONDARY_DEF PMPI_Allreduce MPI_Allreduce
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Allreduce as PMPI_Allreduce #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -62,6 +62,10 @@ cvars: ...@@ -62,6 +62,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Alltoall MPI_Alltoall #pragma _HP_SECONDARY_DEF PMPI_Alltoall MPI_Alltoall
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoall as PMPI_Alltoall #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Alltoallv MPI_Alltoallv #pragma _HP_SECONDARY_DEF PMPI_Alltoallv MPI_Alltoallv
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoallv as PMPI_Alltoallv #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Alltoallw MPI_Alltoallw #pragma _HP_SECONDARY_DEF PMPI_Alltoallw MPI_Alltoallw
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Alltoallw as PMPI_Alltoallw #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -30,6 +30,8 @@ cvars: ...@@ -30,6 +30,8 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Barrier MPI_Barrier #pragma _HP_SECONDARY_DEF PMPI_Barrier MPI_Barrier
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Barrier as PMPI_Barrier #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -103,6 +103,9 @@ cvars: ...@@ -103,6 +103,9 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Bcast MPI_Bcast #pragma _HP_SECONDARY_DEF PMPI_Bcast MPI_Bcast
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Bcast as PMPI_Bcast #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Exscan MPI_Exscan #pragma _HP_SECONDARY_DEF PMPI_Exscan MPI_Exscan
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Exscan as PMPI_Exscan #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -45,6 +45,10 @@ cvars: ...@@ -45,6 +45,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Gather MPI_Gather #pragma _HP_SECONDARY_DEF PMPI_Gather MPI_Gather
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Gather as PMPI_Gather #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -34,6 +34,11 @@ cvars: ...@@ -34,6 +34,11 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Gatherv MPI_Gatherv #pragma _HP_SECONDARY_DEF PMPI_Gatherv MPI_Gatherv
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Gatherv as PMPI_Gatherv #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallgather MPI_Iallgather #pragma _HP_SECONDARY_DEF PMPI_Iallgather MPI_Iallgather
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallgather as PMPI_Iallgather #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallgatherv MPI_Iallgatherv #pragma _HP_SECONDARY_DEF PMPI_Iallgatherv MPI_Iallgatherv
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallgatherv as PMPI_Iallgatherv #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iallreduce MPI_Iallreduce #pragma _HP_SECONDARY_DEF PMPI_Iallreduce MPI_Iallreduce
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iallreduce as PMPI_Iallreduce #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Ialltoall MPI_Ialltoall #pragma _HP_SECONDARY_DEF PMPI_Ialltoall MPI_Ialltoall
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ialltoall as PMPI_Ialltoall #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 #endif
/* -- End Profiling Symbol Block */ /* -- End Profiling Symbol Block */
......
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
#pragma _HP_SECONDARY_DEF PMPI_Ialltoallv MPI_Ialltoallv #pragma _HP_SECONDARY_DEF PMPI_Ialltoallv MPI_Ialltoallv
#elif defined(HAVE_PRAGMA_CRI_DUP) #elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ialltoallv as PMPI_Ialltoallv #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 #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