- Timestamp:
- 06/23/15 10:07:07 (11 months ago)
- Location:
- mystic
- Files:
-
- 14 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
mystic/examples/TEST_ffitPP.py
r776 r799 20 20 def main(): 21 21 from mystic.solvers import DifferentialEvolutionSolver2 22 #from pathos. multiprocessing import ProcessingPool as Pool23 from pathos.p p import ParallelPythonPool as Pool22 #from pathos.pools import ProcessPool as Pool 23 from pathos.pools import ParallelPool as Pool 24 24 25 25 solver = DifferentialEvolutionSolver2(ND, NP) -
mystic/examples/TEST_ffitPP_b.py
r776 r799 47 47 def main(servers,ncpus): 48 48 from mystic.solvers import DifferentialEvolutionSolver2 49 #from pathos. multiprocessing import ProcessingPool as Pool50 from pathos.p p import ParallelPythonPool as Pool49 #from pathos.pools import ProcessPool as Pool 50 from pathos.pools import ParallelPool as Pool 51 51 52 52 solver = DifferentialEvolutionSolver2(ND, NP) -
mystic/examples/buckshot_example06.py
r776 r799 27 27 # if available, use a multiprocessing worker pool 28 28 try: 29 from pathos. multiprocessing import ProcessingPool as Pool30 #from pathos.p p import ParallelPythonPool as Pool29 from pathos.pools import ProcessPool as Pool 30 #from pathos.pools import ParallelPool as Pool 31 31 except ImportError: 32 from mystic.p ython import PythonSerial as Pool32 from mystic.pools import SerialPool as Pool 33 33 34 34 # tools -
mystic/examples/lattice_example06.py
r776 r799 27 27 # if available, use a multiprocessing worker pool 28 28 try: 29 from pathos. multiprocessing import ProcessingPool as Pool30 #from pathos.p p import ParallelPythonPool as Pool29 from pathos.pools import ProcessPool as Pool 30 #from pathos.pools import ParallelPool as Pool 31 31 except ImportError: 32 from mystic.p ython import PythonSerial as Pool32 from mystic.pools import SerialPool as Pool 33 33 34 34 # tools -
mystic/examples/mpmap_desolve.py
r776 r799 24 24 25 25 try: 26 from pathos. multiprocessing import ProcessingPool as Pool26 from pathos.pools import ProcessPool as Pool 27 27 except: 28 28 print __doc__ -
mystic/examples/mpmap_desolve_rosen.py
r776 r799 24 24 25 25 try: 26 from pathos. multiprocessing import ProcessingPool as Pool26 from pathos.pools import ProcessPool as Pool 27 27 except: 28 28 print __doc__ -
mystic/examples/test_twistedgaussian3.py
r776 r799 33 33 # if available, use a multiprocessing worker pool 34 34 try: 35 from pathos. multiprocessing import ProcessingPool as Pool35 from pathos.pools import ProcessPool as Pool 36 36 map = Pool().map 37 37 except ImportError: -
mystic/examples_UQ/MM2_surrogate_diam_batchgrid.py
r797 r799 66 66 def optimize(cost,lower,upper,nbins): 67 67 from mystic.tools import random_seed 68 from pathos. multiprocessing import ProcessingPool as Pool68 from pathos.pools import ProcessPool as Pool 69 69 random_seed(123) 70 70 … … 110 110 ####################################################################### 111 111 def UQ(start,end,lower,upper): 112 #from pathos. multiprocessing import ProcessingPool as Pool113 from pathos. multiprocessing import ThreadingPool as Pool112 #from pathos.pools import ProcessPool as Pool 113 from pathos.pools import ThreadPool as Pool 114 114 #from pool_helper import func_pickle # if fails to pickle, try using a helper 115 115 -
mystic/examples_UQ/MM_surrogate_diam.py
r776 r799 65 65 ####################################################################### 66 66 def optimize(cost,lb,ub): 67 from pathos. multiprocessing import ProcessingPool as Pool67 from pathos.pools import ProcessPool as Pool 68 68 from mystic.solvers import DifferentialEvolutionSolver2 69 69 from mystic.termination import CandidateRelativeTolerance as CRT -
mystic/examples_UQ/MPI2_surrogate_diam_batchgrid.py
r776 r799 111 111 def UQ(start,end,lower,upper): 112 112 #from pyina.launchers import Mpi as Pool 113 from pathos. multiprocessing import ProcessingPool as Pool113 from pathos.pools import ProcessPool as Pool 114 114 #from pool_helper import func_pickle # if fails to pickle, try using a helper 115 115 -
mystic/examples_UQ/PP_surrogate_diam.py
r776 r799 65 65 ####################################################################### 66 66 def optimize(cost,lb,ub): 67 from pathos.p p import ParallelPythonPool as Pool67 from pathos.pools import ParallelPool as Pool 68 68 from mystic.solvers import DifferentialEvolutionSolver2 69 69 from mystic.termination import CandidateRelativeTolerance as CRT -
mystic/examples_UQ/QSUB2_surrogate_diam_batchgrid.py
r776 r799 111 111 def UQ(start,end,lower,upper): 112 112 #from pyina.launchers import Mpi as Pool 113 from pathos. multiprocessing import ProcessingPool as Pool113 from pathos.pools import ProcessPool as Pool 114 114 #from pool_helper import func_pickle # if fails to pickle, try using a helper 115 115 -
mystic/mystic/abstract_launcher.py
r792 r799 28 28 29 29 >>> # instantiate and configure the worker pool 30 >>> from pathos. multiprocessing import ProcessingPool31 >>> pool = Process ingPool(nodes=4)30 >>> from pathos.pools import ProcessPool 31 >>> pool = ProcessPool(nodes=4) 32 32 >>> 33 33 >>> # do a blocking map on the chosen function -
mystic/mystic/pools.py
r776 r799 22 22 23 23 >>> # instantiate and configure the worker pool 24 >>> from pathos. python import PythonSerial25 >>> pool = PythonSerial()24 >>> from pathos.serial import SerialPool 25 >>> pool = SerialPool() 26 26 >>> 27 27 >>> # do a blocking map on the chosen function 28 >>> results =pool.map(pow, [1,2,3,4], [5,6,7,8])28 >>> print pool.map(pow, [1,2,3,4], [5,6,7,8]) 29 29 >>> 30 30 >>> # do a non-blocking map, then extract the results from the iterator 31 31 >>> results = pool.imap(pow, [1,2,3,4], [5,6,7,8]) 32 >>> results = list(results) 32 >>> print "..." 33 >>> print list(results) 34 >>> 35 >>> # do one item at a time, using a pipe 36 >>> print pool.pipe(pow, 1, 5) 37 >>> print pool.pipe(pow, 2, 6) 33 38 34 39 … … 43 48 44 49 """ 45 __all__ = [' PythonSerial']50 __all__ = ['SerialPool'] 46 51 47 52 from abstract_launcher import AbstractWorkerPool … … 51 56 from __builtin__ import map as _map, apply as _apply 52 57 53 class PythonSerial(AbstractWorkerPool):58 class SerialPool(AbstractWorkerPool): 54 59 """ 55 60 Mapper that leverages standard (i.e. serial) python maps. … … 78 83 79 84 85 # backward compatibility 86 PythonSerial = SerialPool 87 88 # EOF -
mystic/tests/test_solver_constraints.py
r776 r799 181 181 182 182 # solver with mapper 183 #from pathos. multiprocessing import ProcessingPool as Pool184 from mystic.p ython import PythonSerial as Pool183 #from pathos.pools import ProcessPool as Pool 184 from mystic.pools import SerialPool as Pool 185 185 map = Pool(5).map 186 186 for solver in classes:
Note: See TracChangeset
for help on using the changeset viewer.