getDoParWorkers           package:foreach           R Documentation

_F_u_n_c_t_i_o_n_s _P_r_o_v_i_d_i_n_g _I_n_f_o_r_m_a_t_i_o_n _o_n _t_h_e _d_o_P_a_r _B_a_c_k_e_n_d

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

     The 'getDoParWorkers' function returns the number of execution
     workers there are in the currently registered doPar backend. It
     can be useful when determining how to split up the work to be
     executed in parallel.  A '1' is returned by default.

     The 'getDoParRegistered' function returns TRUE if a doPar backend
     has been registered, otherwise FALSE.

     The 'getDoParName' function returns the name of the currently
     registered doPar backend.  A 'NULL' is returned if no backend is
     registered.

     The 'getDoParVersion' function returns the version of the
     currently registered doPar backend.  A 'NULL' is returned if no
     backend is  registered.

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

     getDoParWorkers()
     getDoParRegistered()
     getDoParName()
     getDoParVersion()

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

     cat(sprintf('%s backend is registered\n',
                 if(getDoParRegistered()) 'A' else 'No'))
     cat(sprintf('Running with %d worker(s)\n', getDoParWorkers()))
     (name <- getDoParName())
     (ver <- getDoParVersion())
     if (getDoParRegistered())
       cat(sprintf('Currently using %s [%s]\n', name, ver))

