parameters: (args)
docstring: Submit function of local jobs.
docstring_summary: Submit function of local jobs.
docstring_tokens: Submit function of local jobs .
function: def submit(args):
      """Submit function of local jobs."""
      def mthread_submit(nworker, nserver, envs):
          """
          customized submit script, that submit nslave jobs, each must contain args as parameter
          note this can be a lambda function containing additional parameters in input
  
          Parameters
          ----------
          nworker: number of slave process to start up
          nserver: number of server nodes to start up
          envs: enviroment variables to be added to the starting programs
          """
          procs = {}
          for i in range(nworker + nserver):
              if i < nworker:
                  role = 'worker'
              else:
                  role = 'server'
              procs[i] = Thread(target=exec_cmd, args=(args.command, args.local_num_attempt, role, i, envs))
              procs[i].setDaemon(True)
              procs[i].start()
  
      # call submit, with nslave, the commands to run each job and submit function
      tracker.submit(args.num_workers, args.num_servers, fun_submit=mthread_submit,
                     pscmd=(' '.join(args.command)))
function_tokens: def submit ( args ) : def mthread_submit ( nworker , nserver , envs ) : """
          customized submit script, that submit nslave jobs, each must contain args as parameter
          note this can be a lambda function containing additional parameters in input
  
          Parameters
          ----------
          nworker: number of slave process to start up
          nserver: number of server nodes to start up
          envs: enviroment variables to be added to the starting programs
          """ procs = { } for i in range ( nworker + nserver ) : if i < nworker : role = 'worker' else : role = 'server' procs [ i ] = Thread ( target = exec_cmd , args = ( args . command , args . local_num_attempt , role , i , envs ) ) procs [ i ] . setDaemon ( True ) procs [ i ] . start ( ) # call submit, with nslave, the commands to run each job and submit function tracker . submit ( args . num_workers , args . num_servers , fun_submit = mthread_submit , pscmd = ( ' ' . join ( args . command ) ) )