PE                  package:taskPR                  R Documentation

_P_a_r_a_l_l_e_l _E_x_e_c_u_t_e

_D_e_s_c_r_i_p_t_i_o_n:

     Attempts to execute the given expression through the parallel
     engine.

_U_s_a_g_e:

     PE(x, global=FALSE)

_A_r_g_u_m_e_n_t_s:

       x: expression to execute in background/parallel 

  global: should this command be executed globally? 

_D_e_t_a_i_l_s:

     The parallel engine takes the given expression and tries to
     execute it on a worker process (which may be on a remote system). 
     It will be executed in the background and possibly in parallel
     with other PE calls.

     Only a limited number of jobs can be run through the parallel
     engine at once.  If that number is exceeded, then the PE call will
     block until some of the jobs have finished.

     _The given expression *must* be of the form "out <- f(...)"._

     When code{global} is true, the command is executed globally.  This
     does several things.  First, the parallel engine will wait until
     all workers are free before started to execute the command. 
     Second, the command will be executed on all worker processes
     simultaneously.  Third, the output of the command will NOT be
     deleted from the worker processes' workspaces (as is usually
     done).  This "global execute" functionality is designed for
     loading libraries or defining functions, and not for the parallel
     execution of common commands.

_S_e_e _A_l_s_o:

     'StartPE'  For enabling the parallel engine. 'POBJ'  For returning
     background jobs to the main process.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # If you have MPI running
     StartPE(2)

     x = matrix(rnorm(128 * 128), 128, 128)

     PE( a <- svd(x) )
     PE( b <- solve(x) )
     PE( y <- b %*% a$u )
     POBJ( y )
     str(y)
     StopPE()
     ## End(Not run)

