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
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Ialltoallw MPI_Ialltoallw
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ialltoallw as PMPI_Ialltoallw
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ialltoallw(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,
MPI_Request *request) __attribute__((weak,alias("PMPI_Ialltoallw")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Ibarrier MPI_Ibarrier
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ibarrier as PMPI_Ibarrier
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request) __attribute__((weak,alias("PMPI_Ibarrier")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,9 @@
#pragma _HP_SECONDARY_DEF PMPI_Ibcast MPI_Ibcast
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ibcast as PMPI_Ibcast
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm,
MPI_Request *request) __attribute__((weak,alias("PMPI_Ibcast")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iexscan MPI_Iexscan
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iexscan as PMPI_Iexscan
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iexscan")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Igather MPI_Igather
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Igather as PMPI_Igather
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm,
MPI_Request *request)
__attribute__((weak,alias("PMPI_Igather")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Igatherv MPI_Igatherv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Igatherv as PMPI_Igatherv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root,
MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Igatherv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Ireduce_scatter MPI_Ireduce_scatter
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ireduce_scatter as PMPI_Ireduce_scatter
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Ireduce_scatter")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Ireduce_scatter_block MPI_Ireduce_scatter_block
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ireduce_scatter_block as PMPI_Ireduce_scatter_block
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
MPI_Request *request)
__attribute__((weak,alias("PMPI_Ireduce_scatter_block")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Ireduce MPI_Ireduce
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Ireduce as PMPI_Ireduce
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, int root, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Ireduce")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Iscan MPI_Iscan
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iscan as PMPI_Iscan
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iscan")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Iscatter MPI_Iscatter
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iscatter as PMPI_Iscatter
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm,
MPI_Request *request)
__attribute__((weak,alias("PMPI_Iscatter")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Iscatterv MPI_Iscatterv
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Iscatterv as PMPI_Iscatterv
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[],
MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm, MPI_Request *request)
__attribute__((weak,alias("PMPI_Iscatterv")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Op_commutative MPI_Op_commutative
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Op_commutative as PMPI_Op_commutative
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Op_commutative(MPI_Op op, int *commute) __attribute__((weak,alias("PMPI_Op_commutative")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Op_create MPI_Op_create
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Op_create as PMPI_Op_create
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op) __attribute__((weak,alias("PMPI_Op_create")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Op_free MPI_Op_free
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Op_free as PMPI_Op_free
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Op_free(MPI_Op *op) __attribute__((weak,alias("PMPI_Op_free")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -33,6 +33,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Reduce_scatter MPI_Reduce_scatter
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Reduce_scatter as PMPI_Reduce_scatter
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Reduce_scatter")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -21,6 +21,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Reduce_scatter_block MPI_Reduce_scatter_block
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Reduce_scatter_block as PMPI_Reduce_scatter_block
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Reduce_scatter_block")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -55,6 +55,10 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Reduce MPI_Reduce
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Reduce as PMPI_Reduce
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, int root, MPI_Comm comm)
__attribute__((weak,alias("PMPI_Reduce")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Reduce_local MPI_Reduce_local
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Reduce_local as PMPI_Reduce_local
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype,
MPI_Op op)
__attribute__((weak,alias("PMPI_Reduce_local")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Scan MPI_Scan
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Scan as PMPI_Scan
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
MPI_Comm comm)
__attribute__((weak,alias("PMPI_Scan")));
#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