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,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_size MPI_Comm_size
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_size as PMPI_Comm_size
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_size(MPI_Comm comm, int *size) __attribute__((weak,alias("PMPI_Comm_size")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -36,6 +36,8 @@ cvars:
#pragma _HP_SECONDARY_DEF PMPI_Comm_split MPI_Comm_split
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_split as PMPI_Comm_split
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_split")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_split_type MPI_Comm_split_type
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_split_type as PMPI_Comm_split_type
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm) __attribute__((weak,alias("PMPI_Comm_split_type")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Comm_test_inter MPI_Comm_test_inter
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Comm_test_inter as PMPI_Comm_test_inter
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Comm_test_inter(MPI_Comm comm, int *flag) __attribute__((weak,alias("PMPI_Comm_test_inter")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -17,6 +17,9 @@
#pragma _HP_SECONDARY_DEF PMPI_Intercomm_create MPI_Intercomm_create
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Intercomm_create as PMPI_Intercomm_create
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm,
int remote_leader, int tag, MPI_Comm *newintercomm) __attribute__((weak,alias("PMPI_Intercomm_create")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -15,6 +15,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Intercomm_merge MPI_Intercomm_merge
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Intercomm_merge as PMPI_Intercomm_merge
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm) __attribute__((weak,alias("PMPI_Intercomm_merge")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Address MPI_Address
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Address as PMPI_Address
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Address(const void *location, MPI_Aint *address) __attribute__((weak,alias("PMPI_Address")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Get_address MPI_Get_address
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Get_address as PMPI_Get_address
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Get_address(const void *location, MPI_Aint *address) __attribute__((weak,alias("PMPI_Get_address")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Get_count MPI_Get_count
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Get_count as PMPI_Get_count
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count) __attribute__((weak,alias("PMPI_Get_count")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Get_elements MPI_Get_elements
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Get_elements as PMPI_Get_elements
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count) __attribute__((weak,alias("PMPI_Get_elements")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Get_elements_x MPI_Get_elements_x
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Get_elements_x as PMPI_Get_elements_x
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count) __attribute__((weak,alias("PMPI_Get_elements_x")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,9 @@
#pragma _HP_SECONDARY_DEF PMPI_Pack MPI_Pack
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Pack as PMPI_Pack
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf,
int outsize, int *position, MPI_Comm comm) __attribute__((weak,alias("PMPI_Pack")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,10 @@
#pragma _HP_SECONDARY_DEF PMPI_Pack_external MPI_Pack_external
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Pack_external as PMPI_Pack_external
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Pack_external(const char datarep[], const void *inbuf, int incount,
MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint *position)
__attribute__((weak,alias("PMPI_Pack_external")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,9 @@
#pragma _HP_SECONDARY_DEF PMPI_Pack_external_size MPI_Pack_external_size
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Pack_external_size as PMPI_Pack_external_size
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype,
MPI_Aint *size) __attribute__((weak,alias("PMPI_Pack_external_size")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Pack_size MPI_Pack_size
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Pack_size as PMPI_Pack_size
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size) __attribute__((weak,alias("PMPI_Pack_size")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Status_set_elements MPI_Status_set_elements
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Status_set_elements as PMPI_Status_set_elements
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count) __attribute__((weak,alias("PMPI_Status_set_elements")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Status_set_elements_x MPI_Status_set_elements_x
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Status_set_elements_x as PMPI_Status_set_elements_x
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count) __attribute__((weak,alias("PMPI_Status_set_elements_x")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_commit MPI_Type_commit
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_commit as PMPI_Type_commit
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_commit(MPI_Datatype *datatype) __attribute__((weak,alias("PMPI_Type_commit")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -13,6 +13,8 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_contiguous MPI_Type_contiguous
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_contiguous as PMPI_Type_contiguous
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_contiguous")));
#endif
/* -- End Profiling Symbol Block */
......
......@@ -14,6 +14,11 @@
#pragma _HP_SECONDARY_DEF PMPI_Type_create_darray MPI_Type_create_darray
#elif defined(HAVE_PRAGMA_CRI_DUP)
#pragma _CRI duplicate MPI_Type_create_darray as PMPI_Type_create_darray
#elif defined(HAVE_WEAK_ATTRIBUTE)
int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[],
const int array_of_distribs[], const int array_of_dargs[],
const int array_of_psizes[], int order, MPI_Datatype oldtype,
MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_create_darray")));
#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