OmniRPC User's Guide Version 1.2: http://www.omni.hpcc.jp/omnirpc/ <omnirpc@omni.hpcc.jp> | ||
---|---|---|
Prev | Next |
Let's begin programming with OmniRPC using a simple example. In this case, we consider a program to calculate from 1 to 10 using sine function.
#include <stdio.h> #include <math.h> int main(){ int i; double x, res[10]; x = 0.0; for(i = 0; i < 10; i++){ res[i] = sin(x); x += 1.0; } for(i = 0; i < 10; i++) printf("sin(%d)=%g\n",i,res[i]); }
On this program, we calculate the sine in a remote node using OmniRPC. We label the computer node on which the program makes the Remote Procedure Call (RPC) as the client host, and the computer node on which procedures are executed by the RPC call as the remote host.