Topic
  • 4 replies
  • Latest Post - ‏2012-09-13T01:02:04Z by BE33_Xiaofeng_Xu
BE33_Xiaofeng_Xu
BE33_Xiaofeng_Xu
4 Posts

Pinned topic db2 gpu integration

‏2012-08-27T14:06:29Z |
Hi all,

I'm doing some staff about integrating db2 and gpu using user defined function. But I cannot get the gpu based udf work.The error info is like below,

SQL0444N Routine "COUNTV" (specific name "SQL120812142353300") is implemented
with code in library or path ".../sqllib/function/countv_gpu", function
"countv" which cannot be accessed. Reason code: "5". SQLSTATE=42724

I have no idea what's going wrong. I use the following command to compile my example.cu file.

CC=nvcc
CC2=gcc
DB2PATH=/home/db2inst2/sqllib
LIB="lib"
$CC -Xcompiler -fPIC -I$DB2PATH/include -c example.cu -D_REENTRANT
$CC2 -shared -o example example.o -L$DB2PATH/$LIB -ldb2 -lpthread

Can anybody help?

Thank you very much.

best,
Xiaofeng Xu
Updated on 2012-09-13T01:02:04Z at 2012-09-13T01:02:04Z by BE33_Xiaofeng_Xu
  • BE33_Xiaofeng_Xu
    BE33_Xiaofeng_Xu
    4 Posts

    Re: db2 gpu integration

    ‏2012-09-01T22:33:25Z  
    Hi all,

    Actually, I'm trying the create a UDF with cuda code. If you have any relative experience, I'm very glad to talk with you.
    Thank you very much.

    Xiaofeng Xu
  • DavidWAdler
    DavidWAdler
    2 Posts

    Re: db2 gpu integration

    ‏2012-09-07T19:54:48Z  
    Please provide some more details about how you are doing this.

    What is the SQL statement that you are executing which results in the error?

    How did you define the function (CREATE FUNCTION COUNTV ...,)?

    Where did you put the shared library containing your function?

    Could there be any functions your function is referencing that weren't included in the shared library?

    This is the explanation for SQL0444 reason code 5:

    5

    There is insufficient memory to load the library containing the
    function or one or more symbols could not be resolved. This
    reason code indicates one of the following situations:
    1. One or more symbols might not have been resolved. The
    routine library might be dependent on a shared library that
    cannot be located (using the concatenation of directories
    specified in the LIBPATH environment variable in UNIX-based
    systems, the PATH environment variable in INTEL systems).
    2. The routine has a 64-bit library which is not supported
    within a 32-bit DB2 instance, or, the routine has a 32-bit
    library or DLL within a 64-bit DB2 instance that is
    incompatible with the routine definition.
    3. There was insufficient memory to load the library containing
    the function.
  • DavidWAdler
    DavidWAdler
    2 Posts

    Re: db2 gpu integration

    ‏2012-09-07T19:57:39Z  
    Hi all,

    Actually, I'm trying the create a UDF with cuda code. If you have any relative experience, I'm very glad to talk with you.
    Thank you very much.

    Xiaofeng Xu
    I didn't see your other post when I replied.

    Is 'cuda' code that runs in the GPU or code that runs on your Linux (?) box?

    DB2 UDFs need to be written in one of the languages that is supported, C, C++, Java, SQL/PL.
  • BE33_Xiaofeng_Xu
    BE33_Xiaofeng_Xu
    4 Posts

    Re: db2 gpu integration

    ‏2012-09-13T01:02:04Z  
    I didn't see your other post when I replied.

    Is 'cuda' code that runs in the GPU or code that runs on your Linux (?) box?

    DB2 UDFs need to be written in one of the languages that is supported, C, C++, Java, SQL/PL.
    Hi David,

    Thanks very much for your help. It seems I haven't solved the problem. And I have post another thread on main DB2 forum.

    Xiaofeng