Index: plugins/rt_topo/crbs_route.c =================================================================== --- plugins/rt_topo/crbs_route.c (revision 1374) +++ plugins/rt_topo/crbs_route.c (revision 1375) @@ -174,6 +174,7 @@ } */ +static int hop_cnt = 0; /* Attempt to create a grbs path segment from curr to pt:adir. If fails, return NULL. If succeeds, remove the path segment from the grbs context, add a @@ -183,7 +184,6 @@ grbs_addr_t *froma, *toa; grbs_2net_t *gtn = crbs->routing_tn; grbs_detached_addr_t *res = NULL, dtmp; - static int hop_cnt = 0; char tmp[128]; hop_cnt++; @@ -480,6 +480,7 @@ lasta->user_data = NULL; printf("GT 2net_new %s %f %f from P%ld", ctn->tn->net->hdr.oid, rt_topo_cfg.wire_thick, rt_topo_cfg.wire_clr, first->pt->uid); for(da = first->user_data; da != NULL; prev = da, da = da->user_data) { + hop_cnt++; switch(da->user_long) { case GRBS_ADIR_INC: printf(" to P%ld", da->pt->uid); break; case GRBS_ADIR_CONVEX_CCW: printf(" ccw P%ld", da->pt->uid); break; @@ -493,8 +494,14 @@ pa = na; firsta = na; } - else - fprintf(stderr, "Internal ERROR, TODO: failed to pre-realize the path (%s at P%ld)\n", ctn->tn->net->hdr.oid, da->pt->uid); + else { + if (hop_svg) { + char tmp[256]; + sprintf(tmp, "3_GRBS_routfail_%d_h%d_b.svg", cnt_grbs, hop_cnt); + crbs_grbs_draw(crbs, tmp); + } + printf("Internal ERROR, TODO: failed to pre-realize the path (%s at P%ld) {%d}\n", ctn->tn->net->hdr.oid, da->pt->uid, hop_cnt); + } } printf("\n");