POBJ                 package:taskPR                 R Documentation

_P_a_r_a_l_l_e_l _O_b_j_e_c_t (_R_e_t_u_r_n _a _P_a_r_a_l_l_e_l _O_b_j_e_c_t_i_o_n _t_o _R'_s _w_o_r_k_s_p_a_c_e)

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

     Blocks and waits for the specified variable to be returned by the
     parallel engine.

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

     POBJ(x)

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

       x: variable to return. 

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

     Because the 'PE' function executes jobs in the background, there
     must be a way to return jobs to the foreground - to R's workspace.
     That method is the POBJ function.  When passed a variable (which
     doesn't have to exist in R's workspace, yet), the POBJ function
     waits until that variable is available and returned from the
     parallel engine. If variable to return is given as NULL, then the
     POBJ function waits for all variables to be returned. The POBJ
     function returns the *symbol* of the variable, not the variable
     itself.

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

     'StartPE'  For enabling the parallel engine. 'PE'  For executing
     jobs in parallel.

_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)

