For the love of all that is holy, do not put 1MB arrays on the stack.
This was causing JVMs to run out of stack space, and all manner of badness ensued. Instead, use the heap -- that's what it's there for. cmr=v1.7.5:reviewer=rhc:subject=make coll/ml use the heap for large debug array This commit was SVN r31073.
Этот коммит содержится в:
родитель
ce5274652f
Коммит
036db91f3d
@ -2440,12 +2440,14 @@ static int mca_coll_ml_fill_in_route_tab(mca_coll_ml_topology_t *topo, ompi_comm
|
|||||||
|
|
||||||
#if OPAL_ENABLE_DEBUG
|
#if OPAL_ENABLE_DEBUG
|
||||||
#define COLL_ML_ROUTE_BUFF_SIZE (1024*1024)
|
#define COLL_ML_ROUTE_BUFF_SIZE (1024*1024)
|
||||||
{
|
/* Only bother creating the string if we're actually going to
|
||||||
|
print it out (i.e., if the verbose level is >= 10) */
|
||||||
|
if (mca_coll_ml_component.verbose >= 10) {
|
||||||
int ii, jj;
|
int ii, jj;
|
||||||
char buff[COLL_ML_ROUTE_BUFF_SIZE];
|
char *buff, *output;
|
||||||
char *output = buff;
|
|
||||||
|
|
||||||
memset(buff, 0, COLL_ML_ROUTE_BUFF_SIZE);
|
output = buff = calloc(1, COLL_ML_ROUTE_BUFF_SIZE);
|
||||||
|
assert(NULL != output);
|
||||||
|
|
||||||
sprintf(output, "ranks: ");
|
sprintf(output, "ranks: ");
|
||||||
|
|
||||||
@ -2499,7 +2501,8 @@ static int mca_coll_ml_fill_in_route_tab(mca_coll_ml_topology_t *topo, ompi_comm
|
|||||||
}
|
}
|
||||||
|
|
||||||
ML_VERBOSE(10, ("\nThe table is:\n============\n%s\n", buff));
|
ML_VERBOSE(10, ("\nThe table is:\n============\n%s\n", buff));
|
||||||
}
|
free(buff);
|
||||||
|
} while(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (level = 0; level < topo->n_levels; ++level) {
|
for (level = 0; level < topo->n_levels; ++level) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user