bin.nchar                package:Rmpi                R Documentation

_I_n_t_e_r_n_a_l _f_u_n_c_t_i_o_n_s

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

     Internal functions used by other MPI functions.

     'bin.nchar' is used to find the number of char in a binary 
     character vector (length 1) produced by  'serialize'.

     'getpid' is used to get R process id which then is used for
     setting R slave  log files.

     'mpi.comm.is.null' is used to test if a comm is MPI_COMM_NULL
     (empty  members).

     'mpi.wrap.fun' is used by 'mpi.parallel.sim' for preparing a  wrap
     function.

     'mpi.remote.slave' is executed on R slaves by  'mpi.remote.exec'
     (to carry out a remote command). 

     'mpi.parallel.slave' is executed on R slaves by 
     'mpi.parallel.sim' (to carry out parallel Monte Carlo 
     simulation). 

     'string'  create a string (empty space character) buffer.

     'typeindex' checks an R object mode (integer, double, char, or
     others).

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

     bin.nchar(x)
     getpid()
     mpi.comm.is.null(comm)
     mpi.wrap.fun(cmd,arg,cmd.name=as.character(substitute(cmd)))
     mpi.remote.slave()
     mpi.parallel.slave()
     string(length)
     typeindex(x)

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

    comm: a communicator number.

     cmd: a function name.

     arg: optional argument list to 'cmd'.

cmd.name: a function name as character.

       x: an R object.

  length: length of a string.

_V_a_l_u_e:

     'bin.nchar' returns the length of a binary char vector.

     'getpid' returns an integer (process id).

     'mpi.wrap.fun' returns a function with argument values replaced
     from  'arg'. If there is no ... argument in 'cmd', the original 
     function is returned. Otherwise a wrapper function is returned (it
     is a  wrapper to the function 'cmd'). 

     'string' returns an empty character string.

     'typeindex' returns 'c(1, length(x))' if 'x' is an integer 
     vector; 'c(2,length(x))' if 'x' is a double vector; and -1 for
     other  objects.

_A_u_t_h_o_r(_s):

     Hao Yu

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

     'mpi.spawn.Rslaves',  'mpi.remote.exec'. 'mpi.parallel.sim'.

