Parallel routine usage

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
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Parallel routine usage

Post by Kirtikumar »

hi,

I am getting following error while using the routine.

Transformer_15: Failed to load the library
"V0S15_SeqToDS_Transformer_15.o". Either the directory containing the library file is not on the library search path, or the library was compiled on a system that is incompatible with this system.
Could not load "V0S15_SeqToDS_Transformer_15": rtld: 0712-001 Symbol AddNumber__FiT1 was referenced from module /gcdm/dev/project/AGREE_AA/RT_BP469.O/V0S15_SeqToDS_Transformer_15.o(), but a runtime definition of the symbol was not found.


I have seen the post, and tried everything mentioned in the post as well as tried all steps mentioned in DS manager's guide--> PX routines development topic.
I used a compiler mentioned in DS Project properties to compile the C file AddNumber.c and created AddNumber.o which was with permission rwxrwxrwx.
Also as mentioned in the post, I have used $LIBPATH in parameters and set it to dir where AddNumber.o is stored as I am on AIX.

The object file when linked with normal C programs with main function it works fine. But when used in DS PX job, is giving this error. I am wondering why it is trying to refer AddNumber__FiT1 even though there no function or variable with this name in my C file.

Some additional info routine which may be useful:
Routine name: AddNumber
External routine name: AddNumber
Library path: /home/kirtis/ee/routines/AddNumber.o
Actual C code for AddNumber.c:

Code: Select all

AddNumber( int a, int b)
{
int c;
c = a + b;
return c;
}
Any inputs will be appreciated.
Regards,
S. Kirtikumar.
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

I assume you PX routine definition has the Object type = 'Object'.
(Not Library) if so:

Have you tried using the examples from your DataStage Install media?
Which Platform and compiler options have you used?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

Yes

The option is set to Object.

I am using AIX compiler xlc. The same name has been mentioned in the PX project properties and in logs. I have not tried using the existing sample as there is some problem in imp/exp on our server.

But what I am wondering the most is why even after following all steps it's not working :(

Thanks for reply
Regards,
S. Kirtikumar.
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

In your 'c' code you haven't declared the function return type.
[ i.e int AddNumber( int a, int b) }

When building the object file, did you use:
CompilerOptions = -+ -O -g
LinkerOptions = -G -qmkshrobj=1000

Have you declared the arguments in the PX routine definition?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

I have declared 2 arguments for PX routine as a and b integers and return type as int.
As mentioned in ur post, added return type as int.
I used the mentioned compiler options which are for optimzation and debugging. The linker options are used in PX execution and I have not used it explicitly outside PX :?
Is there any need to use linker outside the PX?
Regards,
S. Kirtikumar.
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

To build just an object file for a routine you don't need to run the linker.
If you wish to build a library file for a routine then you will need to use the linker (and thus the options).

I think the referenced compiler for AIX is xlC_r ?

Just to be sure - each time you rebuild the object file you should perform a Force compile on your job.

I assume you have no problem compiling the job?
and that you get the same runtime error?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

Yes Eric

I getting no compile time error, but getting the same error each time I execute the job.
Regards,
S. Kirtikumar.
Post Reply