[mpich2-commits] r3958 - mpich2/trunk/src/util/other
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Fri Mar 6 15:41:00 CST 2009
Author: goodell
Date: 2009-03-06 15:40:59 -0600 (Fri, 06 Mar 2009)
New Revision: 3958
Modified:
mpich2/trunk/src/util/other/outliers.c
Log:
Fix compilation errors and warnings in outliers.c.
These errors only occur when configured with --enable-strict and --enable-g=mem.
They were introduced in r3943.
Reviewed by balaji at .
Modified: mpich2/trunk/src/util/other/outliers.c
===================================================================
--- mpich2/trunk/src/util/other/outliers.c 2009-03-06 20:07:14 UTC (rev 3957)
+++ mpich2/trunk/src/util/other/outliers.c 2009-03-06 21:40:59 UTC (rev 3958)
@@ -65,7 +65,7 @@
assert (k < n);
ngroups = (n + GROUPSIZE-1) / GROUPSIZE;
- medians = malloc (ngroups * sizeof (int));
+ medians = MPIU_Malloc(ngroups * sizeof (int));
/* Divide 'a' into groups, sort the elements of each group and
pull out the median of each group */
@@ -79,13 +79,13 @@
if (ngroups == 1) {
*value = a[n - 1 - k];
- free(medians);
+ MPIU_Free(medians);
return;
}
/* use k_select to find the median of medians */
k_select_r((ngroups / 2) - 1 + (ngroups % 2), medians, ngroups, &median_median);
- free(medians);
+ MPIU_Free(medians);
/* partition array a around the median of medians and return the
index of the median of medians */
@@ -120,6 +120,8 @@
return mpi_errno;
}
+/* silence "no previous prototype" warnings */
+int MPIU_Outlier_ratio(int * sizes, int n_sizes, double outlier_frac, double threshold);
/* Returns the ratio of the maximum size and the outlier_frac
* percentile size. */
More information about the mpich2-commits
mailing list