Direct Execution of Remote Program

Usually, in OmniRPC we execute remote executable programs via the agent. It is possible to execute directly to specify a remote executable module.
The case of direct activation of remote executable program
Setting environment for remote nodes
APIs for direct activation of remote program
Program execution
The limitation in case of direct activation of remote executable program

The case of direct activation of remote executable program

Usually in OmniRPC, the client program executes a remote executable program via the agent. Here are some advantages.

In this explanation, without the agent, we introduce a method to execute directly the remote executable module and to call RPCs. If there are remote executable programs for which you know the path in a certain remote host, you can omit registering remote executable programs, and so on. The advantages as are listed below.

Setting environment for remote nodes.

We assume this environment, as an example.

  1. Client host is jones.tsukuba.ac.jp
  2. Remote host is dennis.hpcc.jp
  3. Set calc_sin.rex, which we introduced already as an example program, to "/usr/local/tmp/" .
  4. Globus gate keeper is running on dennis.hpcc.jp, and it is possible to execute programs with GRAM.

If you use this function, it executes rex directly without the agent.

API for direct execution of remote program

Because, we don't use the agent for direct execution, initialization of the library is taken by OmniRpcExecInit() API.

APIs which activate remote executable programs on the remote host, are like APIs which use OmniRpcHandle. OmniRpcExecOnHost() API enables the execution of a remote executable program, which is specified by its path, on the specified remote host, and it returns OmniRpcExecHandle, which presents its connection. By using OmniRpcExecCall it is possible to call a function which is inside a module.

We show this example below.

#include <OmniRpc.h>
#include <stdio.h>

int main(int argc,char *argv[]){
   double r;
   OmniRpcExecHandle handle;

   OmniRpcExecInit(&argc,&argv);
   handle = OmniRpcExecOnHost("dennis.hpcc.jp","/usr/local/tmp/calc_sin.rex");

   OmniRpcExecCall(handle,"calc_sin",10,&r);
   printf("sin(10)=%g\n",r);
  
   OmniRpcExecTerminate(handle);

   OmniRpcExecFinalize();
   exit(0);
}

OmniRpcExecTerminate API enables the termination of the remote executable program which responds to the handle. Finally, you should use OmniExecFinalize() at the end of the program.

Program execution

You should specify the path of an executable program to activate the remote executable program. For example, the case of an execution using Globus is as follows.

 $% a.out --globus  args 

In the case of SSH activation, you specify "--ssh."; if don't specify this, rsh is used to activate.

The limitation of direct activation of remote executable programs.

At this time, there are some limitations with this method.

We hope to improve these issues in the future.