- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Cyclone V Development Kit. I have compiled my host code to a shared library (.so) and I am using this to make opencl calls from python using ctypes.cdll.
Let's say I am running my program from `/home/root` on the board, as soon as I enter the `findPlatform()` call, my program switches directories to `/usr/bin` which is causing quite the headache. I've gone into the function in `opencl.cpp` and the directory is already `/usr/bin` as soon as I am in the function, so it looks like something to do with `findPlatform()` call from my host code. Any ideas? I have no idea what is going on.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure if this is your issue, but if you're looking at the Altera OpenCL examples in their host code. Within the init_opencl() there is
if(!setCwdToExeDir()) { return false; } statement which changes your working directory during runtime. I'm not entirely sure of its purpose but if you comment that out, it should work fine I'd imagine.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That does seem to work, not sure how I missed that one! Thank you.
I don't quite understand the purpose of this either, hopefully there are no repercussions.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep, no problem. I've ran into that issue too and so far I haven't had any issues come up after removing it.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page