"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "a2a1b66ffc8020f2786e17f5d85094bc6d9d2358"
Commit 05de0b1d authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

lib/nicbm: clean up warnings for full queues

Only show one message when we start to wait, and one when we succeeded.
parent 832c5d43
...@@ -84,17 +84,33 @@ static void sigusr2_handler(int dummy) { ...@@ -84,17 +84,33 @@ static void sigusr2_handler(int dummy) {
volatile union SimbricksProtoPcieD2H *Runner::D2HAlloc() { volatile union SimbricksProtoPcieD2H *Runner::D2HAlloc() {
volatile union SimbricksProtoPcieD2H *msg; volatile union SimbricksProtoPcieD2H *msg;
bool first = true;
while ((msg = SimbricksNicIfD2HAlloc(&nicif_, main_time)) == NULL) { while ((msg = SimbricksNicIfD2HAlloc(&nicif_, main_time)) == NULL) {
fprintf(stderr, "D2HAlloc: no entry available\n"); if (first) {
fprintf(stderr, "D2HAlloc: warning waiting for entry\n");
first = false;
}
} }
if (!first)
fprintf(stderr, "D2HAlloc: entry successfully allocated\n");
return msg; return msg;
} }
volatile union SimbricksProtoNetD2N *Runner::D2NAlloc() { volatile union SimbricksProtoNetD2N *Runner::D2NAlloc() {
volatile union SimbricksProtoNetD2N *msg; volatile union SimbricksProtoNetD2N *msg;
bool first = true;
while ((msg = SimbricksNicIfD2NAlloc(&nicif_, main_time)) == NULL) { while ((msg = SimbricksNicIfD2NAlloc(&nicif_, main_time)) == NULL) {
fprintf(stderr, "D2NAlloc: no entry available\n"); if (first) {
fprintf(stderr, "D2NAlloc: warning waiting for entry\n");
first = false;
}
} }
if (!first)
fprintf(stderr, "D2NAlloc: entry successfully allocated\n");
return msg; return msg;
} }
......
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