Skip to content

Commit

Permalink
Simplified _check_requests function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce J Palmer committed Oct 10, 2024
1 parent 9bd76e6 commit ef55ab9
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions comex/src-mpi-pr/comex.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ sicm_device_list nill;
#define HOST_NAME_MAX 256
#endif

/* data structures */

int64_t send_cnt;
int64_t recv_cnt;
int64_t wait_cnt;
int64_t req_cnt;
void _check_requests(const char* string)
{
printf("p[%d] (%s) send_cnt: %ld recv_cnt: %ld wait_cnt: %ld net_req: %ld\n",
g_state.rank,string,send_cnt,recv_cnt,wait_cnt,req_cnt);
}

/* data structures */

typedef enum {
OP_PUT = 0,
Expand Down Expand Up @@ -3534,9 +3539,7 @@ STATIC void _progress_server()
}
iloop++;
if (iloop%100000 == 0) {
int me = g_state.rank;
printf("p[%d] send_cnt: %ld recv_cnt: %ld wait_cnt: %ld net_req: %ld\n",
send_cnt,recv_cnt,wait_cnt,req_cnt);
_check_requests("progress server");
}
}

Expand Down Expand Up @@ -7663,12 +7666,3 @@ STATIC void count_open_fds(void) {
}
#endif
}

STATIC void _check_requests(int64_t *send, int64_t *recv, int64_t *wait,
int64_t *req)
{
*send = send_cnt;
*recv = recv_cnt;
*wait = wait_cnt;
*req = req_cnt;
}

0 comments on commit ef55ab9

Please sign in to comment.