PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Error in API Hook on PGCL by the way of wrapper DLL.
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Seb



Joined: 05 Jan 2005
Posts: 2

PostPosted: Wed Dec 12, 2012 3:58 am    Post subject: Reply with quote

Hi ckit,

I've got a quick look at your sources, I still need more information. Is your Java Application using JavaLibOpenCL ? If yes did you try to add System.loadLibrary("OpenCLo"); in JavaLibOpenCL ?
JavaLibOpenCL is designed to garanty that an activity that extends OpenCLActivity get libOpenCL loaded at the correct time. Android activities have less right that adb shell, thus we should explicitly set up from Java driver directory and access to a temporary path where is is allowed to write data. If those are not set correctly then clCreateProgramWithBinary or clCreateProgramWithSources will fail.
In conclusion, make sure your Activity uses JavaLibOpenCL and extends OpenCLActivity. If you can not do it that way, then try to explicitly call routine setTmpDirPath from your C++ code. Prototype is
Java_com_pgroup_lib_OpenCLActivity_setTmpDirPath(JNIEnv *env, jobject openclActivity, jstring path).
I can not garanty it will work that way, sorry.
Back to top
View user's profile
ckit



Joined: 16 Jul 2012
Posts: 7

PostPosted: Fri Dec 14, 2012 4:20 am    Post subject: Reply with quote

sorry,
Since I said in a previous post, I did'nt explain..

Application use JavaLibOpenCL, and I add System.loadLibrary ("OpenCLo"); in OpenCLActivity.


I mail jni directory.
Please put libOpenCLo.so was renamed from libOpenCL.so in this directory.

I created libOpenCL.so from these files by ndk-build, and place the libOpenCL.so JavaLibOpenCL project.
I add System.loadLibrary ("OpenCLo"); in OpenCLActivity.
The other has not been edited in OpenCLActivity.

I'm running NDKOclImageInverse.
If NDKOclImageInverse don't use the libOpenCLo.so, it can successfully run.
However,
> when I run the PGCL sample's NDKOclImageInverse, the program return an error (CL_INVALID_BINARY) in clCreateWithBinary ().
>I can hook other functions such as clCreateContext() and clCreateCommandQueue() and so on.

ckit
Back to top
View user's profile
Seb



Joined: 05 Jan 2005
Posts: 2

PostPosted: Tue Dec 18, 2012 1:45 am    Post subject: Reply with quote

Hi ckit,

Please provide me your full project. I don't need your new lib sources, just need .so.
I'll see what I can do but I'm not optimistic.

Sebastien
Back to top
View user's profile
ckit



Joined: 16 Jul 2012
Posts: 7

PostPosted: Fri Dec 21, 2012 12:57 am    Post subject: Reply with quote

Hi,

I fail to send to your e-mail address that I was able to send before.

How do you send full project files to you?

ckit
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group