pymor.parallel.ipython¶
Module Contents¶
Classes¶
Create a new IPython parallel cluster and connect to it. |
|
|
|
int([x]) -> integer |
Functions¶
- class pymor.parallel.ipython.new_ipcluster_pool(profile=None, cluster_id=None, num_engines=None, ipython_dir=None, min_wait=1, timeout=60)[source]¶
Bases:
pymor.core.base.BasicObjectCreate a new IPython parallel cluster and connect to it.
This context manager can be used to create an
IPythonPoolWorkerPool. When entering the context a new IPython cluster is created using theipclusterscript and anIPythonPoolis instantiated for the newly created cluster. When leaving the context the cluster is shut down.Parameters
- profile
Passed as
--profileparameter to theipclusterscript.- cluster_id
Passed as
--cluster-idparameter to theipclusterscript.- nun_engines
Passed as
--nparameter to theipclusterscript.- ipython_dir
Passed as
--ipython-dirparameter to theipclusterscript.- min_wait
Wait at least this many seconds before trying to connect to the new cluster.
- timeout
Wait at most this many seconds for all Ipython cluster engines to become available.
- class pymor.parallel.ipython.IPythonPool(num_engines=None, **kwargs)[source]¶
Bases:
pymor.parallel.basic.WorkerPoolBaseWorkerPoolbased on the IPython parallel computing features.Parameters
- num_engines
Number of IPython engines to use. If
None, all available engines are used.- kwargs
Keyword arguments used to instantiate the IPython cluster client.
- class pymor.parallel.ipython.RemoteId[source]¶
Bases:
intint([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4