def _start_engines(node, user, n_engines=None, kill_existing=False):
 if (n_engines is None):
  n_engines = node.num_processors
 node.ssh.switch_user(user)
 if kill_existing:
  node.ssh.execute('pkill -f ipengineapp', ignore_exit_status=True)
 node.ssh.execute(('ipcluster engines --n=%i --daemonize' % n_engines))
 node.ssh.switch_user('root')

def _start_engines ( node , user , n_engines = None , kill_existing = False ) : if ( n_engines is None ) : n_engines = node . num_processors node . ssh . switch_user ( user ) if kill_existing : node . ssh . execute ( 'pkill -f ipengineapp' , ignore_exit_status = True ) node . ssh . execute ( ( 'ipcluster engines --n=%i --daemonize' % n_engines ) ) node . ssh . switch_user ( 'root' )
launch ipython engines on the given node start one engine per cpu except on master where 1 cpu is reserved for house keeping tasks when possible .