Compiling and linking a parallel routine
Moderators: chulett, rschirm, roy
Compiling and linking a parallel routine
Hi again
I am not able to get a routine working.Its my first time and i have read thru all previous posts on parallel routines but haven't found a solution
PLease help. Here are the details :
The code is a very simple small function written as cpp. Have compiled using a lot of different compilers such as xlC_r, gxlc++, xlc++.The code compiles but am not able to create a shared library out of it from which the function can be called thru the datastage program. AIX uses Visual C++ compiler rgt?
Please tell me which compiler shud i use? and what are the commands for creating a shared library.
Reading thru guides also didnt help much.
Thanks in advance
I am not able to get a routine working.Its my first time and i have read thru all previous posts on parallel routines but haven't found a solution
PLease help. Here are the details :
The code is a very simple small function written as cpp. Have compiled using a lot of different compilers such as xlC_r, gxlc++, xlc++.The code compiles but am not able to create a shared library out of it from which the function can be called thru the datastage program. AIX uses Visual C++ compiler rgt?
Please tell me which compiler shud i use? and what are the commands for creating a shared library.
Reading thru guides also didnt help much.
Thanks in advance
On AIX you need to have Visual Age C++ 6.0, XL C/C++ v7 installed.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Hello piyu,
This worked for me when i needed an object file:
1 - Log into Administrator and go into the Environment Variables of your project.
2 - Select the Compilet option under Parallel and you will see values for environment variables APT_COMPILEOPT, APT_COMPILER, APT_LINKER AND APT_LINKOPT.
3 - Use the values to create your shared library.
I created a simple shell script to aid my compiling:
aCC +DD64 -O -c -ext -z +Z $1.c
aCC +DD64 -b -Wl,+s -Wl,+vnocompatwarnings $1.o
This worked for me in creating an object file. Try it out
Regards,
M. Rama
This worked for me when i needed an object file:
1 - Log into Administrator and go into the Environment Variables of your project.
2 - Select the Compilet option under Parallel and you will see values for environment variables APT_COMPILEOPT, APT_COMPILER, APT_LINKER AND APT_LINKOPT.
3 - Use the values to create your shared library.
I created a simple shell script to aid my compiling:
aCC +DD64 -O -c -ext -z +Z $1.c
aCC +DD64 -b -Wl,+s -Wl,+vnocompatwarnings $1.o
This worked for me in creating an object file. Try it out
Regards,
M. Rama
-
- Premium Member
- Posts: 196
- Joined: Tue Nov 23, 2004 11:50 pm
- Location: Sydney (Australia)
I'm facing similar problem. I created an 'object' type parallel routine. It compiled successfully. At library path of the create routine page, I provided the path of this compiled program. Job compiled successfully but aborted. The abort msg is as follows:
"Transformer_7: Failed to load the library "V0S7_TestRoutine_Transformer_7.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 "V0S7_TestRoutine_Transformer_7": rtld: 0712-001 Symbol Test__FiT1 was referenced
from module /data/ds/cl/projectlibs/dpr_cl_dev/RT_BP842.O/V0S7_TestRoutine_Transformer_7.o(), but a runtime definition
of the symbol was not found.."
Please give suggestions to solve this error.
-Nripendra
"Transformer_7: Failed to load the library "V0S7_TestRoutine_Transformer_7.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 "V0S7_TestRoutine_Transformer_7": rtld: 0712-001 Symbol Test__FiT1 was referenced
from module /data/ds/cl/projectlibs/dpr_cl_dev/RT_BP842.O/V0S7_TestRoutine_Transformer_7.o(), but a runtime definition
of the symbol was not found.."
Please give suggestions to solve this error.
-Nripendra
piyu - that's it - just use it in a transformer. Right click in the derivation and select Ds Routine. You should find your routine there.
Nripendra,
Have you included the name of the object file as well as its path and selected an object type of 'Object'.
If yes, then try creating a simple routine that just returns an integer value of 1. This way you can rule out problems with other libraries you might have included.
Nripendra,
Have you included the name of the object file as well as its path and selected an object type of 'Object'.
If yes, then try creating a simple routine that just returns an integer value of 1. This way you can rule out problems with other libraries you might have included.
-
- Premium Member
- Posts: 196
- Joined: Tue Nov 23, 2004 11:50 pm
- Location: Sydney (Australia)
Dynamic Routine compile time error
Hi Eric
My operating system is HPUNIX. So with Samples\TrxExternalFunctions\HPUX examples I was able to use Static Routine. When I try to compile job with Dynamic Routine I am getting the following error. So can you help me how to fix this. I followed the document help exactly.
ThankYou
Nivas
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S1_TrxFuncExampleDynamic_Transformer_1 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int32 TrxFuncInt();
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink3;
0010: outputname 0 DSLink4;
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: DSLink4
0026: DSLink4.col1 = TrxFuncInt();
0027: writerecord 0;
0028: RowRejected0 = 0;
0029: }
0030:
0031: finish {
0032: }
0033:
*** End of Internal Generated Transformer Code
My operating system is HPUNIX. So with Samples\TrxExternalFunctions\HPUX examples I was able to use Static Routine. When I try to compile job with Dynamic Routine I am getting the following error. So can you help me how to fix this. I followed the document help exactly.
ThankYou
Nivas
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S1_TrxFuncExampleDynamic_Transformer_1 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int32 TrxFuncInt();
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink3;
0010: outputname 0 DSLink4;
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: DSLink4
0026: DSLink4.col1 = TrxFuncInt();
0027: writerecord 0;
0028: RowRejected0 = 0;
0029: }
0030:
0031: finish {
0032: }
0033:
*** End of Internal Generated Transformer Code
Eric wrote:Try looking at the examples on your DataStage client install Disk
[ Samples\TrxExternalFunctions\AIX ]
The routine is available in transformer and the job compliles as well. But at run time,This is the error i am getting :
Transformer_2: Failed to load the library "V0S2_test_parallel_routine_Transformer_2.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 "V0S2_test_parallel_routine_Transformer_2": rtld: 0712-001 Symbol sumnos__FiT1 was referenced
from module /data/ds/riskmi/projectlibs/dpr_riskmi_dev/RT_BP966.O/V0S2_test_parallel_routine_Transformer_2.o(), but a runtime definition of the symbol was not found..
I dont undertsand wat i am missing. From online docs, the only thing i gathered is that a am not able to create a shared library .so file. The -G or -qmkshrobj options dont work. I have specified tyoe OBJECT and given the pathh of the .o file in LIBrARY.
Transformer_2: Failed to load the library "V0S2_test_parallel_routine_Transformer_2.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 "V0S2_test_parallel_routine_Transformer_2": rtld: 0712-001 Symbol sumnos__FiT1 was referenced
from module /data/ds/riskmi/projectlibs/dpr_riskmi_dev/RT_BP966.O/V0S2_test_parallel_routine_Transformer_2.o(), but a runtime definition of the symbol was not found..
I dont undertsand wat i am missing. From online docs, the only thing i gathered is that a am not able to create a shared library .so file. The -G or -qmkshrobj options dont work. I have specified tyoe OBJECT and given the pathh of the .o file in LIBrARY.
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm