Giter Club home page Giter Club logo

rhpc's Introduction

!!! This package require MPI Library. !!!

<<build>>
   OpenMPI or MPICH2
       R CMD INSTALL Rhpc_0.yy-yday.tar.gz

   other MPI *nix.
       R CMD INSTALL Rhpc_0.yy-yday.tar.gz \
          --configure-args='--with-mpi-cflags=-I/opt/FJSVplang/include64/mpi/fujitsu \
                            --with-mpi-ldflags="-lmpi_f -lfjgmp64 -L/opt/FJSVpnple/lib -ljrm -L/opt/FJSVpnidt/lib -lfjidt -L/opt/FJSVplang/lib64 -lfj90i -lfj90f -lelf -lm -lpthread -lrt -ldl"'
       
   MS-MPI for Windows
       require set MSMPI environment variable

       c.f. Default install MS-MPI v6
       C:\Users\boofoo>set MSMPI
       MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
       MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
       MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\

<<program launch>>

  <*nix OS's>
   Generated in the package top directory, please use the Rhpc shell.

   ex.
     $ mpirun -n 4 ~/R/x86_64-unknown-linux-gnu-library/3.2/Rhpc/Rhpc CMD BATCH -q --no-save test.R

   MPI_Comm_Spawn if available,
   ex.
     $ R -q
     > library(Rhpc)
     > Rhpc_initialize()
     > cl<-Rhpc_getHandle(4)    # set number of workers
     > Rhpc_worker_call(cl,Sys.getpid)
     [[1]]
     [1] 10571
     
     [[2]]
     [1] 10572
     
     [[3]]
     [1] 10573
     
     [[4]]
     [1] 10574
     
     > Rhpc_finalize()
     > q("no")
   

  <MS-Windows>
     please get and install MS-MPI
     http://www.microsoft.com/en-us/download/details.aspx?id=47259

   * Cheaty usage:D
     We have upgraded the package Rhpc, especially for Windows OS. In the
     former Windows MPI version, batch process using mpiexec was required
     for execusion. Recently, MS-MPI supports MPI_Comm_Spawn.
     However, we still need to execute master process by mpiexec.
     So we make a program fakemaster which enables to execute mpiexec
     in the background and extract environments in MPI and pass them
     to original R process, then it performs MPI_Init.
     This is very tricky but it works, and make it possible to execute
     MPI from RGui and Rstudio.
     Caution that mpiexec and fakemaster start command line console
     windows, which should not be stopped during execution.
     If you hope to perform MPI on several machines, msmpilauchsvc is
     required, but we did not test it sufficiently.
     Arguments of mpiexec can be specified such as
          options(Rhpc.mpiexec="mpiexec -n 1")
     and it adds fakemaster at the end of mpiexec command like
          "mpiexec -n 1 fakemaster"
     when Rhpc_initialize.
     There seems to be no way to activate processes of other nodes
     at MPI_Comm_spawn on MS-MPI v9.01.
     (only single node MPI-Comm-spawn on MS-MPI v 9.01)

     ex. launch Rgui,Rstudio or Rterm
     follow input
     > library(Rhpc)
     > Rhpc_initialize()
     > cl<-Rhpc_getHandle(3)
     > Rhpc_worker_call(cl,Sys.getpid)
     > Rhpc_finalize()
     > q("no")


    * Traditional usage (Really hard to use...)

     Installed in the package top directory, please look and use the Rhpc*.cmd shell.
     R_home reference from registry.

     ex. launch Rgui(x64)
       Click %USERPROFILE%\Documents\R\win-binary\3.2\Rhpc\RhpcWin64.cmd
     follow input 
     > library(Rhpc)
     > Rhpc_initialize()
     > cl<-Rhpc_getHandle()
     > Rhpc_worker_call(cl,Sys.getpid)
     > Rhpc_finalize()
     > q("no")
     
     ex. launch batch(x64)
     C:> %USERPROFILE%\Documents\R\win-binary\3.2\Rhpc\Rhpc64.cmd BATCH test.R

rhpc's People

Contributors

com1nakama avatar e-nakama avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.