Page 1 of 1

Parallel routine error

Posted: Tue Apr 08, 2008 9:14 am
by venkatvelpula
I am getting the following error when i used parallel routine in a transformer.I wrote c++ code and i compiled and produced *.o
file and i used that file in the library path of the parallel routine dialogbox.

I got following fatal error when i ran the job and then it aborted.


Transformer_3: Failed to load the library "V0S3_testPR_Transformer_3.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 "V0S3_testPR_Transformer_3": rtld: 0712-001 Symbol PMExists__Fi was referenced
from module /IISPROJECTS/Sales/RT_BP3065.O/V0S3_testPR_Transformer_3.o(), but a runtime definition
of the symbol was not found..

Used Object File option while creating the parallel routine in DataStage. Provide the path of the object file(.o). The external name provided will be the name of my function as its in the code.




Thanks
Venkat

Re: Parallel routine error

Posted: Tue Apr 08, 2008 9:49 am
by Nagin
Can you post the C++ code as well? It will give us a better idea about the error.

Posted: Tue Apr 08, 2008 9:50 am
by venkatvelpula
#include <string>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
//================================
int PMExists(string& elem)
{
size_t startpos = elem.find_first_not_of(" \t\n");
size_t endpos = elem.find_last_not_of(" \t\n");
int ans =0;
if((string::npos != startpos) && ( string::npos != endpos))
{
// elem=elem.substr( startpos, endpos-startpos+1 );
ans=1;
}
// else elem=""; return elem;
return ans;
}

Posted: Tue Apr 08, 2008 9:51 am
by venkatvelpula
#include <string>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
//================================
int PMExists(string& elem)
{
size_t startpos = elem.find_first_not_of(" \t\n");
size_t endpos = elem.find_last_not_of(" \t\n");
int ans =0;
if((string::npos != startpos) && ( string::npos != endpos))
{
// elem=elem.substr( startpos, endpos-startpos+1 );
ans=1;
}
// else elem=""; return elem;
return ans;
}

Posted: Tue Apr 08, 2008 11:01 am
by sud
Include the LD_LIBRARY_PATH to your job and add the directory where you have the object file to that path's value.

Posted: Tue Apr 08, 2008 12:14 pm
by venkatvelpula
Tried after adding the new parameter LD_library_Path but same error.

I don't have access to create or put files in to LD_library_Path. So I tried to put those files under Datastage/PXEngine.

Is that the problem?

Posted: Tue Apr 08, 2008 12:15 pm
by venkatvelpula
Tried after adding the new parameter LD_library_Path but same error.

I don't have access to create or put files in to LD_library_Path. So I kept those files( cpp code and generated object file) under the Datastage/PXEngine.

Is that the problem?

Posted: Tue Apr 08, 2008 12:42 pm
by venkatvelpula
Where can I find sample code(built in) for parallel routines?

Posted: Tue Apr 08, 2008 1:05 pm
by sud
In whichever directory you have put the object file, add that path to the value of LD_LIBRARY_PATH while running the job.

Posted: Tue Apr 08, 2008 1:31 pm
by venkatvelpula
I tried that already and still not working.

Posted: Tue Apr 08, 2008 1:42 pm
by venkatvelpula
I do have $LIB_PATH only. So I changed the path to this environmental variable defalut value.

I can't find $LD_LIBRARY_PATH variable. Looks like it doesn't exist here.

Posted: Tue Apr 08, 2008 2:14 pm
by sud
Hmmm, I can't quite comment on WHY it doesn't exist. Hopefully some of the experts will take notice of this post and write about possible reasons. But, can you just create a user defined environment variable for your project and use it in your job - just have the LD_LIBRARY_PATH equal to the URL of the folder where you have deployed the object file.

Posted: Wed Apr 09, 2008 12:28 pm
by venkatvelpula
Even if I use user defined variable, I am giving the total path with object file name for linking object code to datastage. Where do you want me to use the user defined varaible?

Posted: Wed Apr 09, 2008 1:54 pm
by venkatvelpula
Additional Info:

When I try to execute c++ code..It's giving the following error

0509-036 Cannot load program because of the following error

0509-108 The .loader section does not exist.

Is that the problem?

can we execute the c++ code on AIX5?

Posted: Wed Oct 06, 2010 12:14 pm
by vinothkumar
I am also getting same error. Let me know if there are any updates in this