sla.gridInit           package:RScaLAPACK           R Documentation

_I_n_i_t_i_a_l_i_z_e _t_h_e _P_r_o_c_e_s_s _G_r_i_d _f_o_r _S_c_a_L_A_P_A_C_K _C_o_m_p_u_t_a_t_i_o_n_s

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

     Sets up grid for use by the sla.* functions by spawning the
     requested number of processes.

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

     sla.gridInit(NPROCS=0)

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

  NPROCS: Number of Processes that form the process grid 

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

     The requested number of processes are spawned and left waiting for
     further instruction.  If a grid a already present, the function
     instead prints and error and returns.  The grid can then be used
     by sla.* functions by setting the 'SPAWN' parameter of those
     function to zero (most of the time, 'RFLAG' should also be set to
     zero).  Functions do not have to use the full grid, and the shape
     doesn't matter.  For example if user spawns 6 processes by
     "sla.gridInit(6)", it can be used as a "2 x 2", "1 x 6", "2 x 3",
     "3 x 2", etc process grid.

_N_o_t_e:

     This was implemented for two reasons.  One, it slightly reduces
     the overhead of the call.  Second, it allows many ScaLAPACK calls
     without needing to open lots of sockets (as LAM/MPI does for each
     process spawned).  We strongly recommend that you release the
     process grid before exiting R, although in our tests the MPI
     daemon usually closed the child processes when the R session was
     closed.

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.netlib.org/scalapack/>

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

     'sla.gridExit' for releasing the Process Grid,

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

     x = matrix(rnorm(128*128), 128, 128)
     sla.gridInit(NPROCS=4)
     sla.solve(x, NPROWS=4)->a
     sla.gridExit()

