Skip to content

Commit

Permalink
c/cxx: use __func__ for printf()s
Browse files Browse the repository at this point in the history
Use __func__ instead of hard-coded function names so that we have less
to update when we change suffixes.  :-)

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
  • Loading branch information
jsquyres committed Jun 12, 2019
1 parent 0d9e911 commit 9ffc203
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion c/allgather_count.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Allgather_y(const void *sendbuf, MPI_Count sendcount,
void *recvbuf, MPI_Count recvcount,
MPI_Datatype recvtype, MPI_Comm comm)
{
printf("This is C MPI_Allgather_y\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/allgather_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount,
void *recvbuf, int recvcount,
MPI_Datatype recvtype, MPI_Comm comm)
{
printf("This is C MPI_Allgather\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/comm_rank.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

int MPI_Comm_rank(MPI_Comm comm, int *rank)
{
printf("This is C MPI_Comm_rank\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/comm_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

int MPI_Comm_size(MPI_Comm comm, int *size)
{
printf("This is C MPI_Comm_size\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/finalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

int MPI_Finalize(void)
{
printf("This is C MPI_Finalize\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/get_elements_count.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
int MPI_Get_elements_y(const MPI_Status *status,
MPI_Datatype datatype, MPI_Count *count)
{
printf("This is C MPI_Get_elements_y\n");
printf("This is C %s\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion c/get_elements_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
int MPI_Get_elements(const MPI_Status *status,
MPI_Datatype datatype, int *count)
{
printf("This is C MPI_Get_elements\n");
printf("This is C %s\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion c/get_elements_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
int MPI_Get_elements_x(const MPI_Status *status,
MPI_Datatype datatype, MPI_Count *count)
{
printf("This is C MPI_Get_elements_x\n");
printf("This is C %s\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion c/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

int MPI_Init(int *argc, char ***argv)
{
printf("This is C MPI_Init\n");
printf("This is C %s\n", __func__);

#if FROOZLE_HAVE_C11_GENERIC
printf("NOTE: This Froozle built with C11 _Generic support. Yay!\n");
Expand Down
2 changes: 1 addition & 1 deletion c/recv_count.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Recv_y(void *buf, MPI_Count count,
int source, int tag, MPI_Comm comm,
MPI_Status *status)
{
printf("This is C MPI_Recv_y\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/recv_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Recv(void *buf, int count,
int source, int tag, MPI_Comm comm,
MPI_Status *status)
{
printf("This is C MPI_Recv\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/send_count.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int MPI_Send_y(const void *buf, MPI_Count count,
MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
{
printf("This is C MPI_Send_y\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion c/send_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int MPI_Send(const void *buf, int count,
MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
{
printf("This is C MPI_Send\n");
printf("This is C %s\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/allgather_count.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Allgather(const void *sendbuf, MPI_Count sendcount,
void *recvbuf, MPI_Count recvcount,
MPI_Datatype recvtype, MPI_Comm comm)
{
printf("This is C++ MPI_Allgather (with count params)\n");
printf("This is C++ %s (with count params)\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/allgather_int.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount,
void *recvbuf, int recvcount,
MPI_Datatype recvtype, MPI_Comm comm)
{
printf("This is C++ MPI_Allgather (with int params)\n");
printf("This is C++ %s (with int params)\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/get_elements_count.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
int MPI_Get_elements(const MPI_Status *status,
MPI_Datatype datatype, MPI_Count *count)
{
printf("This is C++ MPI_Get_elements (with MPI_Count params)\n");
printf("This is C++ %s (with MPI_Count params)\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion cxx/get_elements_int.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
int MPI_Get_elements(const MPI_Status *status,
MPI_Datatype datatype, int *count)
{
printf("This is C++ MPI_Get_elements (with int params)\n");
printf("This is C++ %s (with int params)\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion cxx/get_elements_x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
int MPI_Get_elements_x(const MPI_Status *status,
MPI_Datatype datatype, MPI_Count *count)
{
printf("This is C++ MPI_Get_elements_x (with MPI_Count params)\n");
printf("This is C++ %s (with MPI_Count params)\n", __func__);

// The test programs are passing in bogus statuses (e.g.,
// MPI_STATUS_IGNORE), so generate a status here and set a value
Expand Down
2 changes: 1 addition & 1 deletion cxx/recv_count.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Recv(void *buf, MPI_Count count,
int source, int tag, MPI_Comm comm,
MPI_Status *status)
{
printf("This is C++ MPI_Recv (with count params)\n");
printf("This is C++ %s (with count params)\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/recv_int.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int MPI_Recv(void *buf, int count,
int source, int tag, MPI_Comm comm,
MPI_Status *status)
{
printf("This is C++ MPI_Recv (with int params)\n");
printf("This is C++ %s (with int params)\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/send_count.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int MPI_Send(const void *buf, MPI_Count count,
MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
{
printf("This is C++ MPI_Send (with count params)\n");
printf("This is C++ %s (with count params)\n", __func__);

return MPI_SUCCESS;
}
2 changes: 1 addition & 1 deletion cxx/send_int.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int MPI_Send(const void *buf, int count,
MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
{
printf("This is C++ MPI_Send (with int params)\n");
printf("This is C++ %s (with int params)\n", __func__);

return MPI_SUCCESS;
}

0 comments on commit 9ffc203

Please sign in to comment.