[ofa-general] Re: [PATCH] opensm/osm_mesh.c: Remove edges in lash matrix

Sasha Khapyorsky sashak at voltaire.com
Thu Aug 6 14:06:01 PDT 2009


Hi Hal,

On 18:06 Wed 05 Aug     , Hal Rosenstock wrote:
> 
> +
> +static void print_axis(lash_t *p_lash, int sw, int port)
> +{
> +	mesh_node_t *node = p_lash->switches[sw]->node;
> +	char *name = p_lash->switches[sw]->p_sw->p_node->print_desc;
> +	int c = node->axes[port];
> +
> +	printf("%s[%d] = ", name, port);
> +	if (c)
> +		printf("%s%c -> ", ((c - 1) & 1) ? "-" : "+", 'X' + (c - 1)/2);
> +	else
> +		printf("N/A -> ");
> +	printf("%s\n",
> +	       p_lash->switches[node->links[port]->switch_id]->p_sw->p_node->print_desc);
>  }
>  
>  /*
> @@ -805,6 +864,11 @@ static void seed_axes(lash_t *p_lash, int sw)
>  		}
>  	}
>  
> +	for (i = 0; i < n; i++) {
> +		printf("seed: ");
> +		print_axis(p_lash, sw, i);
> +	}

Please remove debug prints or move it to use osm_log().

Sasha



More information about the general mailing list