Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cluster Computing and the Grid, Proceedings

Similar presentations


Presentation on theme: "Cluster Computing and the Grid, Proceedings"— Presentation transcript:

1 OmniRPC a Grid RPC System for Parallel Programming in Cluster and Grid Environment
Cluster Computing and the Grid, Proceedings. CCGrid rd IEEE/ACM International Symposium 碩電一甲 鍾翔航

2 Outline INTRODUCTION The OmniRPC system Implementation
Parallel programming using OmniRPC Related Work Current Status and Future Work

3 INTRODUCTION(1) high-performance network computing: clusters of workstations/PCs and computational grids a thread-safe remote procedure call system a thread-safe implementation of Ninf RPC intuitive programming interface The remote libraries: implemented as executable programs, and registered

4 INTRODUCTION(2) OmniRPC supports a limited persistence model
initialization procedure Globus toolkit: a grid software infrastructure local environments are supported by the use of rsh (remote shell) remote hosts by ssh (secure shell)

5 The OmniRPC system(1) Background: Ninf RPC
OmniRPC inherits its API(Application Programming Interface ) and basic architecture from Ninf A client and the remote computational hosts may be connected via a local area network or over a wide-area network The remote libraries are implemented as an executable program containing a network stub routine as the main routine

6 The OmniRPC system(2) OmniRpcCall
/* declaration */ double A[N][N],B[N][N],C[N][N]; .... /*calls matrix multiplication, C = A*B */ dmmul(A,B,C,N); /* call remote library */ OmniRpcCall("dmmul",A,B,C,N); dmmul is the entry name of the library registered as an executable on a remote host

7 The OmniRPC system(3) MatrixMult Module MatrixMult; ...
Define dmmul(long mode_in int n, mode_in double A[n][n], mode_in double B[n][n], mode_out double C[n][n]) "... description ..." /* Use C calling convention. */ Calls "C" dmmul(n,A,B,C);

8 The OmniRPC system(4) OmniRPC persistence model: automatic initializable module Once a remote executable is invoked, the client attempts to use the invoked remote executable for subsequent RPC calls persistence of the remote executable can be exploited in certain applications

9 The OmniRPC system(5) Module MatrixMult; ... /* define procedure */
Define Initialize(long int n, double B[n][n]){ /* store B somewhere */ storeB(n,B); } Define dmmulB(long mode_in int n, mode_in double A[n][n], mode_out double C[n][n]) Calls "C" dmmulB(n,A,C);

10 The OmniRPC system(6) The client would then set initialization of the module as follows: double A[N][N],B[N][N],C[N][N] ... OmniRpcInitModule("MatrixMult",n,B); .... OmniRpcCall("dmmulB",N,A,C); OmniRpcInitModule only specifies the arguments for the initialization procedure, and does not execute the initialization

11 The OmniRPC system(7) OmniRPC environment setting
By default, the registry is located in the home directory of each user Each remote executable is registered in each remote host registry Cluster: the user can enter the server host of the cluster in the host file with a particular job scheduler private IP address: the user needs to specify the use of a proxy for communication between the client and the remote hosts inside the cluster

12 Implementation(1) OmniRPC agent in the remote host omrpc-agent
remote shell command rsh (local area network) Globus Resource Allocation Manager (GRAM) API of the Globus toolkit (grid environment) secure remote shell command ssh

13 Implementation(2) Submission of the job of the remote executable with the local job scheduler specified in the host file the job scheduler is not specified, the agent executes the remote executable by the fork system call Management of processes for the submitted jobs Reading of the registry information in the remote host, and delivery to the client Proxy for communications between the client and the remote executables executed at cluster nodes

14 Implementation(3) Scheduling and re-use of remote executables
OmniRPC initialization function OmniRpcCallmakes remote host use the agent the initialization procedure is automatically called the executable waits for subsequent requests for this module in an inactive state the scheduler selects an appropriate remote host to invoke the executable when all executables are active and no executable can be terminated, the thread requesting a remote procedure call is blocked until a remote host becomes available

15 Implementation(4) I/O multiplexing using the OmniRPC agent
Usually, the executable running in a remote host makes the connection directly to the client The OmniRPC agent can work as a proxy between the client and the remote executables invoked by the agent to allow multiplexing of multiple communications from several remote executables into a single connection to the client

16 Implementation(5) Ssh port forwarding
The user uses ssh to invoke the OmniRPC agent in a secure way using the authentication agent ssh-agent This is very convenient when using remote hosts behind a firewall

17 Implementation(6) Basic performance of OmniRPC
The cluster is a PC cluster with 8 node of Athlon MP dual processors (1.5GHz), placed behind the firewall Host B (also Althon MP dual) is a server node of the cluster, and have a global IP address Host A (Pentium4 Xeon 2.8GHz) is a client, which connect to host B via the campus backbone network of University of Tsukuba Host C is a node of the PC cluster that cannot be directly connected from Host A

18 Implementation(7) Module sample;
Define echo(IN int in_size, IN int in_buf[in_size], IN int out_size, OUT int out_buf[out_size]) { /* do nothing */ } Define hostname(OUT string ss[], OUT int r[]) { char s[100]; *r = gethostname(s,100); *ss = s; }

19 Parallel programming using OmniRPC(1)
OpenMP client using OmniRPC OmniRpcinit(&argc,&argv); /* initialize RPC */ .... #pragma omp parallel for for(i = 0; i < N; i++) OmniRpcCall("work",i,...); #pragma omp parallel sections { #pragma omp section OmniRpcCall("subA"); #pragma omp section OmniRpcCall("subB"); #pragma omp section OmniRpcCall("subC"); }

20 Parallel programming using OmniRPC(2)
Example: the knapsack problem main(int argc,char *argv[]){ OmniRpcInit(&argc,&argv); ... r = knap_bfs(Cap,breadth); OmniRpcInitModule("knap",N,W,P); #pragma omp parallel for private(rr) for(k=0;k<breadth;k++){ OmniRpcCall("knap_dfs",states[k].i, states[k].cp,states[k].M,&GLow,&rr); #pragma omp critical { if(rr > r) r = rr; } } OmniRpcFinalize();

21 Parallel programming using OmniRPC(3)
The sample knapsack contained 40i tems with the same unit value The number of subtree generated by the sequential breadth-first search was 100 This strategy may have the disadvantage that the variance for the sub-tree search could be substantial, resulting in load imbalance The maximum execution time of sub-tasks was 61 sec, and the average of the execution time of sub-tasks was 12.3 sec

22 Future Work The current implementation employs a simple round-robin scheduling over available remote hosts In the grid environment, the computation time of RPCs may be greatly influenced by many factors, including the computational ability of the hosts, the distance to the hosts with respect to the communication bandwidth, and the status of the hosts A more sophisticated scheduling scheme using dynamic information reported by the local job scheduler in the remote host will be required for efficient remote execution, especially in cluster of clusters

23


Download ppt "Cluster Computing and the Grid, Proceedings"

Similar presentations


Ads by Google