comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Running IDL RPC on Linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Running IDL RPC on Linux [message #43182] Thu, 17 March 2005 13:33
webuser is currently offline  webuser
Messages: 1
Registered: March 2005
Junior Member
Hi,

We run IDL through the RPC interface written in C and are currently
porting our application (website) from IRIX to Linux, and upgrading to
IDL 6.0. We have IDL as an RPC server and our own programs as clients.
Each idlrpc server handles simultaneous requests from multiple
clients. A development instance typically runs 4 idlrpc
servers/sessions, and a production instance runs 14 idlrpc sessions.
Here are some system details:

NEW SYSTEM:
Version: IDL 6.0
OS: Linux, Debian 3.0

OLD SYSTEM:
Version: IDL 5.3
OS: IRIX64, release 6.5

Our commands for starting idlrpc sessions are:
on Linux:
/usr/local/rsi/idl_6.0/bin/idlrpc -server=C2500001
/usr/local/rsi/idl_6.0/bin/idlrpc -server=C2500002
etc.
on IRIX:
/usr/local/rsi/idl_5.3/bin/idlrpc -server=C2500001
etc.

On our new system, idlrpc seems to start up correctly with such
commands. The current status of porting is that web applications which
are supposed to run IDL through idlrpc are not able to connect to an
idlrpc server. (Error messages include "Problems acquiring server",
"Can't find server", "no host".)

We have conducted these tests:

Start idlrpc without any options, so its main process looks as follows:
www1 3132 3121 0 17:52 pts/0 00:00:00
/usr/local/rsi/idl_6.0/bin/bin.linux.x86/idlrpc

Test1 program source code:
----------
#include <stdio.h>
#include "idl_rpc.h"

int main(int argc, char **argv)
{
CLIENT *pClient;
int i;
IDL_VPTR v;
double *d;

/* Initialize the Client */
if((pClient = IDL_RPCInit(0, (char*)NULL)) == (CLIENT*)NULL)
{
fprintf(stderr, "Can't register with IDL server.\n");
exit(1);
}
/* initialize the data structure */
IDL_RPCExecuteStr(pClient, "data=dindgen(10)");

/* Get the data variable back from IDL */
v = IDL_RPCGetMainVariable(pClient, "DATA");
printf("Array is: \n");
d=(double *) v->value.arr->data;
for (i=0;i<v->value.arr->n_elts;i++) printf("%lf\n",d[i]);
IDL_RPCCleanup(pClient, TRUE);
return 1;
}
----------

Output from running test1 program:
----------
Array is:
0.000000
1.000000
2.000000
3.000000
4.000000
5.000000
6.000000
7.000000
8.000000
9.000000
----------

Now, we try to follow the same pattern, but with a serverid. Start
idlrpc with a serverid, so its main process looks as follows:
www1 3606 1 0 18:02 ? 00:00:00
/usr/local/rsi/idl_6.0/bin/bin.linux.x86/idlrpc -server=C2500001

Test2 program source code:
----------
#include <stdio.h>
#include "idl_rpc.h"

int main(int argc, char **argv)
{
CLIENT *pClient;
int i;
IDL_VPTR v;
double *d;

/* Initialize the Client */
if((pClient = IDL_RPCInit((IDL_LONG)"C2500001", (char*)NULL)) ==
(CLIENT*)NULL)
{
fprintf(stderr, "Can't register with IDL server.\n");
exit(1);
}
/* initialize the data structure */
IDL_RPCExecuteStr(pClient, "data=dindgen(10)");

/* Get the data variable back from IDL */
v = IDL_RPCGetMainVariable(pClient, "DATA");
printf("Array is: \n");
d=(double *) v->value.arr->data;
for (i=0;i<v->value.arr->n_elts;i++) printf("%lf\n",d[i]);
IDL_RPCCleanup(pClient, TRUE);
return 1;
}
----------

Output from running test2 program:
----------
clnttcp_create: RPC: Program not registered
Can't register with IDL server.
----------

Such error messages are similar to those we get from our web
applications built from the same source code that worked on IRIX, so
fixing this test case may help with our main problem. Do you have any
suggestions?

Thanks,
webuser
[Message index]
 
Read Message
Previous Topic: Widget text
Next Topic: Re: Running IDL RPC on Linux

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:07:31 PDT 2025

Total time taken to generate the page: 0.00895 seconds