mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-10 12:37:30 +08:00
Add support for bootstrapping remote namespace based on code from Problem or Dispatcher.
This commit is contained in:
+4
-7
@@ -250,7 +250,7 @@ class SystemSolver(object):
|
|||||||
|
|
||||||
class RemoteInterface(object):
|
class RemoteInterface(object):
|
||||||
|
|
||||||
def __init__(self, profile=None, MPI=None, nThreads=1):
|
def __init__(self, profile=None, MPI=None, nThreads=1, bootstrap=None):
|
||||||
|
|
||||||
# TODO: Add interface for namespace bootstrapping from
|
# TODO: Add interface for namespace bootstrapping from
|
||||||
# the dispatcher / problem side
|
# the dispatcher / problem side
|
||||||
@@ -315,12 +315,9 @@ class RemoteInterface(object):
|
|||||||
|
|
||||||
self.nThreads = nThreads
|
self.nThreads = nThreads
|
||||||
|
|
||||||
# Generate 'par' object for Problem to grab
|
if bootstrap is not None:
|
||||||
self.par = {
|
for command in bootstrap.strip().split('\n'):
|
||||||
'pclient': self.pclient,
|
dview.execute(command.strip())
|
||||||
'dview': self.dview,
|
|
||||||
'lview': self.pclient.load_balanced_view(),
|
|
||||||
}
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nThreads(self):
|
def nThreads(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user