Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

getting RESetMapReduce to use multiple cores

I am reading the documentation on how to parallelize recursive-enumeration computations, and I cannot for thenlife of me get RESetMapReduce to use more than one core of my machine.

I am using the example immediately before the bulleted item titled Generating series on that page, with a minor modification:

sage: from sage.parallel.map_reduce import RESetMapReduce
sage: S = RESetMapReduce(
....:     roots=[[]],
....:     children=lambda l: [l + [0], l + [1]] if len(l) < 32 else [],
....:     map_function=lambda x: 1,
....:     reduce_function=lambda x, y: x + y,
....:     reduce_init=0)
sage: S.run()

I changed the length to 32 to make the computation heftier. If I run this, I can watch the process with htop, using only one of my 8 cores to 100% capacity, but ignoring the others.

I have even tried passing the argument max_proc=8 to the .run() method, to no effect.

getting RESetMapReduce to use multiple cores

I am reading the documentation on how to parallelize recursive-enumeration computations, and I cannot for thenlife the life of me get RESetMapReduce to use more than one core of my machine.

I am using the example immediately before the bulleted item titled Generating series on that page, with a minor modification:

sage: from sage.parallel.map_reduce import RESetMapReduce
sage: S = RESetMapReduce(
....:     roots=[[]],
....:     children=lambda l: [l + [0], l + [1]] if len(l) < 32 else [],
....:     map_function=lambda x: 1,
....:     reduce_function=lambda x, y: x + y,
....:     reduce_init=0)
sage: S.run()

I changed the length to 32 to make the computation heftier. If I run this, I can watch the process with htop, using only one of my 8 cores to 100% capacity, but ignoring the others.

I have even tried passing the argument max_proc=8 to the .run() method, to no effect.

getting RESetMapReduce to use multiple cores

I am reading the documentation on how to parallelize recursive-enumeration computations, and I cannot for the life of me get RESetMapReduce to use more than one core of my machine.

I am using the example immediately before the bulleted item titled Generating series on that page, with a minor modification:

sage: from sage.parallel.map_reduce import RESetMapReduce
sage: S = RESetMapReduce(
....:     roots=[[]],
....:     children=lambda l: [l + [0], l + [1]] if len(l) < 32 else [],
....:     map_function=lambda x: 1,
....:     reduce_function=lambda x, y: x + y,
....:     reduce_init=0)
sage: S.run()

I changed the length to 32 to make the computation heftier. If I run this, I can watch the process with htop, using : it uses only one of my 8 cores to 100% capacity, but ignoring the others.

I have even tried passing the argument max_proc=8 to the .run() method, to no effect.

getting RESetMapReduce to use multiple cores

I am reading the documentation on how to parallelize recursive-enumeration computations, and I cannot for the life of me get RESetMapReduce to use more than one core of my machine.

I am using the example immediately before the bulleted item titled Generating series on that page, with a minor modification:

sage: from sage.parallel.map_reduce import RESetMapReduce
sage: S = RESetMapReduce(
....:     roots=[[]],
....:     children=lambda l: [l + [0], l + [1]] if len(l) < 32 else [],
....:     map_function=lambda x: 1,
....:     reduce_function=lambda x, y: x + y,
....:     reduce_init=0)
sage: S.run()

I changed the length to 32 to make the computation heftier. If I run this, I can this and watch the process with htop: I can see it uses using only one of my 8 cores to 100% capacity, ignoring the others.

I have even tried passing the argument max_proc=8 to the .run() method, to no effect.