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

Sasha Khapyorsky sashak at voltaire.com
Sun Aug 30 03:36:15 PDT 2009


Hi Hal,

On 18:34 Thu 06 Aug     , Hal Rosenstock wrote:
> 
> @@ -773,6 +838,7 @@ static void seed_axes(lash_t *p_lash, int sw)
>  	mesh_node_t *node = p_lash->switches[sw]->node;
>  	int n = node->num_links;
>  	int i, j, c;
> +	char buf[256], *p;
>  
>  	OSM_LOG_ENTER(p_log);
>  	if (!node->matrix || !node->dimension)
> @@ -805,6 +871,12 @@ static void seed_axes(lash_t *p_lash, int sw)
>  		}
>  	}
>  
> +	for (i = 0; i < n; i++) {
> +		p = buf;
> +		print_axis(p_lash, p, sw, i);
> +		OSM_LOG(p_log, OSM_LOG_INFO, "%s", buf);
> +	}
> +

As far as I can see it is only debug prints, so why is OSM_LOG_INFO here?
Also please move whole chunk under:

	if (osm_log_is_active(p_log, OSM_LOG_DEBUG)) {
		char buf[256], *p;
		....
	}

>  done:
>  	OSM_LOG_EXIT(p_log);
>  }
> @@ -878,6 +950,12 @@ static void make_geometry(lash_t *p_lash, int sw)
>  			n = s1->node->num_links;
>  
>  			/*
> +			 * ignore chain fragments
> +			 */
> +			if (n < seed->node->num_links && n <= 2)
> +				continue;
> +
> +			/*
>  			 * only process 'mesh' switches
>  			 */
>  			if (!s1->node->matrix)
> @@ -908,7 +986,8 @@ static void make_geometry(lash_t *p_lash, int sw)
>  					if (j == i)
>  						continue;
>  
> -					if (s1->node->matrix[i][j] != 2) {
> +					if (s1->node->matrix[i][j] != 2 &&
> +						s1->node->matrix[i][j] <= 4) {

What does this ' <= 4' check?

Sasha

>  						if (s1->node->axes[j]) {
>  							if (s1->node->axes[j] != opposite(seed, s1->node->axes[i])) {
>  								OSM_LOG(p_log, OSM_LOG_DEBUG, "phase 1 mismatch\n");
> 



More information about the general mailing list