Parallel routine relative library path

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dfong
Participant
Posts: 35
Joined: Tue Feb 25, 2003 9:59 am

Parallel routine relative library path

Post by dfong »

Hi all,

Instead of having the library path of parallel routine hardcoded ( at the routine) is it possible to make the path relative? For example instead of specifying /somewhere/lib/function.so can I specify somewhere '/somewhere/lib' and put only 'function.so' in the routine? I have tried LD_LIBRARY_PATH in project environment but it does not work out. Thank you
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

You can add the environment variable LD_LIBRARY_PATH to you Job properties - as a job parameter. Then specify the full path and file name of the *.so file at runtime.
nivas
Participant
Posts: 117
Joined: Sun Mar 21, 2004 4:40 pm

Post by nivas »

Hi

I compiled the c file for example myfile.c as following to create myfile.o

aCC -c +z myfile.c

Then I am able to create and use parallel routine with object type object.

Then I compiled as follows to create myfile.os
aCC -o myfile.o +b myfile.os
This myfile.os is in /apps/edw/dev/bin path
Now I created the parallel routine with object type Library.I gave the library path same /apps/edw/dev/bin.

I am calling this parallel routine with object type library in a parallel job.
When I am trying to compile it is throwing error. The error message I got is not helpful to fix the problem.DId I put myfile.os in right location. Please any body tell me how to fix this problem.

thanks
Nivas
nivas
Participant
Posts: 117
Joined: Sun Mar 21, 2004 4:40 pm

Post by nivas »

Hi
Any body explain the steps behind creating a parallel routine with object type library.

thanks
Niavas
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please post the actual error(s) thrown by the compiler, let us contemplate whether or not it is helpful in diagnosing the problem.

Do you refuse to tell your doctor your symptoms when you visit, dismissing them as unhelpful?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nivas
Participant
Posts: 117
Joined: Sun Mar 21, 2004 4:40 pm

Post by nivas »

ray.wurlod wrote:Please post the actual error(s) thrown by the compiler, let us contemplate whether or not it is helpful in diagnosing the problem.
First I run the following command to create an object
aCC -O +z -c Sri_Funcs.c -o Sri_Funcs.o
Then I run the following to create a library
aCC -b Sri_Funcs.o -o Sri_Funcs.so

I called the Sri_Funcs.so from ParallelRoutine with object type Library . Then I tried to compile job which is calling the parallel routine.

The error I got is

External routine library name 'Sri_Funcs.so' is invalid, routine 'SriDynamic' (DynamicFUncTest.rtn)

When I click on More button I got the following.

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S1_DynamicFuncTest_trn transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int8 FuncInt();
0007:
0008: // define our input/output link names
0009: inputname 0 src;
0010: outputname 0 pipe_peek;
0011:
0012: initialize {
0013: // define our row rejected variable
0014: int8 RowRejected0;
0015:
0016: // define our null set variable
0017: int8 NullSetVar0;
0018:
0019: }
0020:
0021: mainloop {
0022: // initialise our row rejected variable
0023: RowRejected0 = 1;
0024:
0025: // evaluate columns (no constraints) for link: pipe_peek
0026: pipe_peek.col1 = FuncInt();
0027: writerecord 0;
0028: RowRejected0 = 0;
0029: }
0030:
0031: finish {
0032: }
0033:
*** End of Internal Generated Transformer Code
Post Reply