I'm having an issue with creating a C++ parallel routine. I have this simple CPP code (IntTest.cpp):
Code: Select all
#include <stdio.h>
int trans(int i)
{
if(i>5)
return i;
else
return i+5;
}
1. Created an parrelel routine
Routine name: myRoutine
External subroutine name: trans
Type: External Function
Object Type: Object
Return type: int
Library path: C:\DS_Adv_BC\Dev\IntTest
-Arguments tab-
Argument name: i
I/O type: I
Native type: int
2. Add the routine in the transformer, compiled.
Output from transformer compilation follows:
##I IIS-DSEE-TFCN-00001 07:46:54(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.1.0.4987
Copyright (c) 2001, 2005-2008 IBM Corporation. All rights reserved
##I IIS-DSEE-TFCN-00006 07:46:54(001) <main_program> conductor uname: -s=Windows_NT; -r=1; -v=5; -n=VMWARE-IMG; -m=Pentium
##I IIS-DSEE-TOSH-00002 07:46:54(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 07:46:54(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 07:46:54(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 07:46:55(002) <main_program> Parameter specified but not used in flow: DSPXWorkingDir [osl\osl.C:623]
##I IIS-DSEE-TCOS-00021 07:46:55(003) <main_program> Echo:
transform -inputschema record
(
test:int32;
)
-outputschema record
(
test:int32;
)
-expressionfile RT_SC154/V0S2_TestInt_Transformer_2.trx
-flag compile
-staticobj 'C:/DS_Adv_BC/Dev/IntTest'
-compiler 'cxx'
-compileopt '-W/TP -W/EHa -DAPT USE ANSI IOSTREAMS -c '
-linker 'cxx'
-linkopt '-s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-'
-name V0S2_TestInt_Transformer_2
-dir D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O
.
##W IIS-DSEE-TOSH-00049 07:46:55(004) <main_program> Parameter specified but not used in flow: DSPXWorkingDir [osl\osl.C:623]
##I IIS-DSEE-TCOS-00022 07:46:55(006) <main_program> Explanation:
Step has 1 operator.
???, invoked with args: -inputschema record ( test: int32; ) -outputschema record ( test: int32; ) -expressionfile RT_SC154/V0S2_TestInt_Transformer_2.trx -flag compile -staticobj C:/DS_Adv_BC/Dev/IntTest -compiler cxx -compileopt -W/TP -W/EHa -DAPT USE ANSI IOSTREAMS -c -linker cxx -linkopt -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t- -name V0S2_TestInt_Transformer_2 -dir D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O
Step has 0 data entities.
.
##I IIS-DSEE-TCOS-00023 07:46:55(007) <main_program> Dump:
{
text="transform -inputschema record ( test: int32; )\r\n-outputschema record ( test: int32; )\r\n-expressionfile RT_SC154/V0S2_TestInt_Transformer_2.trx\r\n-flag compile\r\n-staticobj 'C:/DS_Adv_BC/Dev/IntTest'\r\n-compiler 'cxx'\r\n-compileopt '-W/TP -W/EHa -DAPT USE ANSI IOSTREAMS -c '\r\n-linker 'cxx'\r\n-linkopt '-s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-'\r\n-name V0S2_TestInt_Transformer_2\r\n-dir D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O",
line=1, column=1, name="", qualname="",
op={
text="transform -inputschema record ( test: int32; )\r\n-outputschema record ( test: int32; )\r\n-expressionfile RT_SC154/V0S2_TestInt_Transformer_2.trx\r\n-flag compile\r\n-staticobj 'C:/DS_Adv_BC/Dev/IntTest'\r\n-compiler 'cxx'\r\n-compileopt '-W/TP -W/EHa -DAPT USE ANSI IOSTREAMS -c '\r\n-linker 'cxx'\r\n-linkopt '-s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-'\r\n-name V0S2_TestInt_Transformer_2\r\n-dir D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O",
line=1, column=1, name=transform, qualname=transform,
wrapout={},
wrapperfile=transform, kind=non_wrapper_cdi_op, exec_mode=none,
args="'record ( test: int32; )'-outputschema'record ( test: int32; )'-expressionfile'RT_SC154/V0S2_TestInt_Transformer_2.trx'-flag'compile'-staticobj'C:/DS_Adv_BC/Dev/IntTest'-compiler'cxx'-compileopt'-W/TP -W/EHa -DAPT USE ANSI IOSTREAMS -c '-linker'cxx'-linkopt'-s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-'-name'V0S2_TestInt_Transformer_2'-dir'D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O'"
}
}
.
##E IIS-DSEE-TBLD-00076 07:47:21(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40,192. [buildop\compile.C:594]
##E IIS-DSEE-TFSR-00019 07:47:21(001) <main_program> Could not check all operators because of previous error(s) [api\step_rep.C:1186]
##W IIS-DSEE-TFTM-00012 07:47:21(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1". [transform\transform.C:1940]
##I IIS-DSEE-TBLD-00000 07:47:21(003) <main_program> Error when checking composite operator: Output from subprocess: Unknown parameter USE (ignored)
Unknown parameter ANSI (ignored)
Unknown parameter IOSTREAMS (ignored)
##I IIS-DSEE-TBLD-00000 07:47:21(004) <main_program> Error when checking composite operator: Output from subprocess: D:\IBM\InformationServer\Server\PXEngine\include\apt_util/keylookup.h(1148) : warning C4251: 'APT_KeyLookupRange::rangeOptions_' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'APT_KeyLookupRange'
with
[
_Ty=APT_KeyLookupRange::rangeOption
]
D:\IBM\InformationServer\Server\Projects\Training\RT_BP154.O\V0S2_TestInt_Transformer_2.C(182) : warning C4101: 'output' : unreferenced local variable
D:\IBM\InformationServer\Server\Projec
##W IIS-DSEE-TFEV-00025 07:47:21(005) <transform> Error when checking composite operator: Converting number to string. [transform\evalexp.C:5683]
##W IIS-DSEE-TFEV-00023 07:47:21(006) <transform> Error when checking composite operator: Implicit conversion from source type "Int32" to result type "String". [transform\evalexp.C:5687]
##I IIS-DSEE-TBLD-00000 07:47:21(007) <main_program> Error when checking composite operator: Output from subprocess: ts\Training\RT_BP154.O\V0S2_TestInt_Transformer_2.C(177) : warning C4101: 'input' : unreferenced local variable
D:\IBM\InformationServer\Server\Projects\Training\RT_BP154.O\V0S2_TestInt_Transformer_2.C(283) : warning C4244: '=' : conversion from 'double' to 'APT_Int32', possible loss of data
##W IIS-DSEE-TFEV-00025 07:47:21(008) <transform> Error when checking composite operator: Converting string to number. [transform\evalexp.C:5683]
##W IIS-DSEE-TFEV-00023 07:47:21(009) <transform> Error when checking composite operator: Implicit conversion from source type "String" to result type "Int32". [transform\evalexp.C:5687]
##I IIS-DSEE-TBLD-00079 07:47:21(010) <transform> Error when checking composite operator: cxx -LD:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O/ -LD:/IBM/InformationServer/Server/PXEngine/lib -LD:/IBM/InformationServer/Server/PXEngine/user_lib -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t- -lliborchnt -lliborchcorent -lliborchbuildopnt C:/DS_Adv_BC/Dev/IntTest.o D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O/V0S2_TestInt_Transformer_2.tmp.o -o D:/IBM/InformationServer/Server/Projects/Training/RT_BP154.O/V0S2_TestInt_Transformer_2.dll.
##I IIS-DSEE-TBLD-00000 07:47:21(011) <main_program> Error when checking composite operator: Output from subprocess: LINK : fatal error LNK1181: cannot open input file 'C:\DS_Adv_BC\Dev\IntTest.o'
##E IIS-DSEE-TCOS-00029 07:47:21(012) <main_program> Creation of a step finished with status = FAILED. [osh.C:1081] (TestInt.Transformer_2)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S2_TestInt_Transformer_2 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int32 trans(int32 i);
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: // Stage variable declaration and initialisation
0020: string StageVar0_StageVar;
0021: StageVar0_StageVar = "";
0022: }
0023:
0024: mainloop {
0025: // initialise our row rejected variable
0026: RowRejected0 = 1;
0027:
0028: // evaluate the stage variables first
0029: StageVar0_StageVar = trans(DSLink3.test);
0030:
0031: // evaluate columns (no constraints) for link: DSLink4
0032: DSLink4.test = StageVar0_StageVar;
0033: writerecord 0;
0034: RowRejected0 = 0;
0035: }
0036:
0037: finish {
0038: }
0039:
*** End of Internal Generated Transformer Code
I think it has something to do with:
Output from subprocess: LINK : fatal error LNK1181: cannot open input file 'C:\DS_Adv_BC\Dev\IntTest.o'
I appreciate your help, thanks in advance