[openib-general] [PATCH] OpenSM/osmtest.c: Fix float calculation in osmtest_stress_large_rmpp_pr

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Sun Oct 15 08:18:16 PDT 2006


Good catch, thanks.

--
Yevgeny

Hal Rosenstock wrote:
> OpenSM/osmtest.c: Fix float calculation in osmtest_stress_large_rmpp_pr
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
> ---
> Index: osmtest/osmtest.c
> ===================================================================
> --- osmtest/osmtest.c	(revision 9795)
> +++ osmtest/osmtest.c	(working copy)
> @@ -2868,7 +2868,7 @@ osmtest_stress_large_rmpp_pr( IN osmtest
>        if (num_recs == 0)
>          ratio = 0;
>        else
> -        ratio = (float)(num_queries / num_recs);
> +        ratio = ((float)num_queries / (float)num_recs);
>        printf( "-I- Queries to Record Ratio is %" PRIu64 " records, %" PRIu64 " queries : %.2f \n",
>                num_recs, num_queries, ratio);
>        print_freq = 0;
> 
> 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 




More information about the general mailing list