Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libocl segfault with simple c++ client when configured for RPC #15

Closed
stevechk opened this issue Apr 25, 2014 · 8 comments
Closed

libocl segfault with simple c++ client when configured for RPC #15

stevechk opened this issue Apr 25, 2014 · 8 comments

Comments

@stevechk
Copy link

Running a simple OpenCL C++ example - works fine when libocl is configured to use ICD, but when configured to use RPC it segfaults in clGetPlatformInfo.

Any ideas?

Program received signal SIGSEGV, Segmentation fault.
clGetPlatformInfo (a0=0x7fed582ae10, a1=2305, a2=0, a3=0x0, a4=0x7fffffffdba0) at oclcall.c:192
192     void* oclent 
(gdb) bt
#0  clGetPlatformInfo (a0=0x7fed582ae10, a1=2305, a2=0, a3=0x0, a4=0x7fffffffdba0) at oclcall.c:192
#1  0x0000000000401847 in cl::detail::getPlatformVersion (platform=0x7fed582ae10)
    at /usr/include/CL/cl.hpp:1693
#2  0x00000000004018ef in cl::detail::getDevicePlatformVersion (device=0x60bfe0)
    at /usr/include/CL/cl.hpp:1703
#3  0x0000000000402200 in cl::detail::Wrapper<_cl_device_id*>::isReferenceCountable (device=0x60bfe0)
    at /usr/include/CL/cl.hpp:1794
...

Example program:

#include <CL/cl.hpp>
#include <cstdio>
#include <cstdlib>
#include <iostream>

 int
 main(void)
 {
    cl_int err = CL_SUCCESS;
    try {

      //get platform list 
      std::vector<cl::Platform> platforms;
      cl::Platform::get(&platforms);
      std::cout << "Platform size " << platforms.size() << std::endl;
      if (platforms.size() == 0) {
          return -1;
      }

      std::string platformVendor;
      platforms[0].getInfo((cl_platform_info)CL_PLATFORM_VENDOR, &platformVendor);
      std::cout << "Platform 0 is by: " << platformVendor << "\n";

      //get context for the first platform
      std::cout << "Platform 0: # " << platforms[0]() << std::endl;
      cl_context_properties properties[] = 
          { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0};
      cl::Context context(CL_DEVICE_TYPE_ALL, properties); 

      //this line causes a seg fault at clGetPlatformInfo with RPC
      std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();


      std::cout << "Done" << std::endl;
    }
    catch (cl::Error err) {
       std::cerr 
          << "ERROR: "
          << err.what()
          << "("
          << err.err()
          << ")"
          << std::endl;
    }

   return EXIT_SUCCESS;
 }
@browndeer
Copy link
Owner

I tested the code below and it worked with various configurations running a CLRPC server on machine using both AMD and
COPRTHR platforms.

Can you run both the server and the client using cldebug -- and send the output. This will help identify what might be
going on. If the files are too large to post, feel free to send to support at browndeertechnology dot com instead.

stevechk wrote:

Running a simple OpenCL C++ example - works fine when libocl is
configured to use ICD, but when configured to use RPC it segfaults in
clGetPlatformInfo.

Any ideas?

|Program received signal SIGSEGV, Segmentation fault.
clGetPlatformInfo (a0=0x7fed582ae10, a1=2305, a2=0, a3=0x0, a4=0x7fffffffdba0) at oclcall.c:192
192 void* oclent
(gdb) bt
#0 clGetPlatformInfo (a0=0x7fed582ae10, a1=2305, a2=0, a3=0x0, a4=0x7fffffffdba0) at oclcall.c:192
#1 0x0000000000401847 in cl::detail::getPlatformVersion (platform=0x7fed582ae10)
at /usr/include/CL/cl.hpp:1693
#2 0x00000000004018ef in cl::detail::getDevicePlatformVersion (device=0x60bfe0)
at /usr/include/CL/cl.hpp:1703
#3 0x0000000000402200 in cl::detail::Wrapper<_cl_device_id*>::isReferenceCountable (device=0x60bfe0)
at /usr/include/CL/cl.hpp:1794
...
|

/Example program:/

#include <CL/cl.hpp>
#include
#include
#include

int
main(void)
{
cl_int err = CL_SUCCESS;
try {

  //get platform list 
  std::vector<cl::Platform> platforms;
  cl::Platform::get(&platforms);
  std::cout << "Platform size " << platforms.size() << std::endl;
  if (platforms.size() == 0) {
      return -1;
  }

  std::string platformVendor;
  platforms[0].getInfo((cl_platform_info)CL_PLATFORM_VENDOR, &platformVendor);
  std::cout << "Platform 0 is by: " << platformVendor << "\n";

  //get context for the first platform
  std::cout << "Platform 0: # " << platforms[0]() << std::endl;
  cl_context_properties properties[] = 
      { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0};
  cl::Context context(CL_DEVICE_TYPE_ALL, properties); 

  //this line causes a seg fault at clGetPlatformInfo with RPC
  std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();


  std::cout << "Done" << std::endl;
}
catch (cl::Error err) {
   std::cerr 
      << "ERROR: "
      << err.what()
      << "("
      << err.err()
      << ")"
      << std::endl;
}

return EXIT_SUCCESS;
}


Reply to this email directly or view it on GitHub
#15.

David Richie, Ph.D.
Brown Deer Technology
1641 Denwright Court
Forest Hill, MD 21050
410-459-3848
[email protected]
www.browndeertechnology.com

@stevechk
Copy link
Author

Machine is ubuntu 12.04 64-bit with an Nvidia GT610 card. I've softlinked the default libOpenCL.so to point to libocl.so.

C++ program debug:

[25016] clmesg debug: libocl.c(858): _libocl_init called
[25016] clmesg debug: libocl.c(892): fd 3
[25016] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fbffe4d3a2d
[25016] clmesg debug: libocl.c(150): searching for platforms
[25016] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[25016] clmesg debug: libocl.c(790): there is a clrpc section
[25016] clmesg debug: libocl.c(799): enble string yes
[25016] clmesg debug: libocl.c(807): there are 1 RPC servers
[25016] clmesg debug: libocl.c(821): add server '192.168.147.81:2112'
[25016] clmesg debug: libocl.c(173): conf returns nplatforms = 0
[25016] clmesg debug: libocl.c(175): 0 icd dirs specified
[25016] clmesg debug: libocl.c(255): 0 local platforms found
[25016] clmesg debug: libocl.c(284): added '192.168.147.81' 2112
[25016] clmesg debug: libocl.c(306): libclrpc: 0x11bb5c0 0x7fbffd2a44b0 0x7fbffd2a4710 0x7fbffd2a4c00
[25016] clmesg debug: libocl.c(309): nservers=1
[25016] clmesg debug: libclrpc.c(360): evthread_use_pthreads returned 0
[25016] clmesg debug: libclrpc.c(411): clrpc_nservers 1
[25016] clmesg info: libclrpc.c(414): CLRPC timeout set to 300 sec
[25016] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x11bd460
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(500): total 0
[25016] clmesg debug: libclrpc.c(509): getting array 0 (nil) 0
[25016] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x11bd460] *nplatforms_ret = 3

[25016] clmesg debug: libocl.c(324): 3 platforms available via RPC servers
[25016] clmesg debug: libocl.c(468): 3 0x11bdc40
[25016] clmesg debug: libclrpc.c(466): dptr local [0] = 0x11bdc20
[25016] clmesg debug: libclrpc.c(466): dptr local [1] = 0x11bdb40
[25016] clmesg debug: libclrpc.c(466): dptr local [2] = 0x11bdbd0
[25016] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x11bd460
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(500): total 0
[25016] clmesg debug: libclrpc.c(509): getting array 3 0x11bdc40 3
[25016] clmesg debug: libclrpc.c(517): at creation platform[0] is 0x11bdad0
[25016] clmesg debug: libclrpc.c(517): at creation platform[1] is 0x11bdaa0
[25016] clmesg debug: libclrpc.c(517): at creation platform[2] is 0x11bda70
[25016] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x11bd460] *nplatforms_ret = 3

[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz12
12:NVIDIA CUDA
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'NVIDIA CUDA'
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz16
16:Intel(R) OpenCL
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'Intel(R) OpenCL'
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz8
8:coprthr
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'coprthr'
[25016] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25016] clmesg debug: libocl.c(503):  returning 
[25016] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fbffe4d3a2d
[25016] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25016] clmesg debug: libocl.c(497): platform 0 is 0x11bdad0
[25016] clmesg debug: libocl.c(497): platform 1 is 0x11bdaa0
[25016] clmesg debug: libocl.c(497): platform 2 is 0x11bda70
[25016] clmesg debug: libocl.c(503):  returning 
Platform size 3
[25016] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(195): 0x7fbffd4eb308
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz19
0:(null)
[25016] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(195): 0x7fbffd4eb308
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz19
19:NVIDIA Corporation
Platform 0 is by: NVIDIA Corporation
Platform 0: # 0x11bdad0
[25016] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(782): nprop 1
[25016] clmesg debug: libclrpc.c(787): checking prop 4228
[25016] clmesg debug: libclrpc.c(794): set xprop value 0x11bdad0 0x112afc0
[25016] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(753): _clrpc_clCreateContextFromType_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(822): context local remote 0x11be230 0x1136bc0
[25016] clmesg debug: libclrpc.c(827): clrpc_clCreateContextFromType: *err_ret = 0

[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 4
[25016] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[25016] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[25016] clmesg debug: libclrpc.c(881): dptr local [0] = 0x11bdfa0
[25016] clmesg debug: libclrpc.c(890): (0) local 0x11bdfa0 remote 0x112b080
[25016] clmesg debug: libclrpc.c(898): (0) local 0x11be520 remote 0x112b080
[25016] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(221): 0x7fbffd4eb318
[25016] clmesg debug: libclrpc.c(661): object local 0x11be520 remote 0x112b080
[25016] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(661): _clrpc_clGetDeviceInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(661): clrpc_clGetDeviceInfo: *param_sz_ret 8
./build2.sh: line 6: 25016 Segmentation fault      (core dumped) ./clcpp

RPCD (same box)

[25007] clmesg debug: libocl.c(858): _libocl_init called
[25007] clmesg debug: libocl.c(892): fd 3
[25007] clmesg info: clrpcd.c(160): http_setup: address=192.168.147.81 port=2112
[25007] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[25007] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x1115f70
[25007] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f7cf326ba2d
[25007] clmesg debug: libocl.c(150): searching for platforms
[25007] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[25007] clmesg debug: libocl.c(722): there are 1 platforms
[25007] clmesg debug: libocl.c(767): there are 1 icd_dirs
[25007] clmesg debug: libocl.c(173): conf returns nplatforms = 1
[25007] clmesg debug: libocl.c(175): 1 icd dirs specified
[25007] clmesg debug: libocl.c(179): scanning ICD dir '/etc/OpenCL/vendors/'
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//nvidia.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//nvidia.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 22
[25007] clmesg debug: libocl.c(230): adding platform 'nvidia.icd' (libnvidia-opencl.so.1)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//intel64.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//intel64.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 54
[25007] clmesg debug: libocl.c(230): adding platform 'intel64.icd' (/opt/intel/opencl-1.2-3.2.1.16712/lib64/libintelocl.so)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//coprthr.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//coprthr.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 46
[25007] clmesg debug: libocl.c(230): adding platform 'coprthr.icd' (/usr/local/browndeer/lib/libcoprthr_opencl.so)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//.|
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//..|
[25007] clmesg debug: libocl.c(255): 4 local platforms found
[25007] clmesg debug: libocl.c(306): libclrpc: 0x1116cb0 0x7f7cf24294b0 0x7f7cf2429710 0x7f7cf2429c00
[25007] clmesg debug: libocl.c(309): nservers=0
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'nvidia' use lib 'libcuda.so'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x1117360
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) (nil) (nil)
[25007] clmesg debug: libocl.c(394): pf (nil) (nil) (nil)
[25007] clmesg WARNING: libocl.c(399): missing ICD required call, skipping
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'nvidia.icd' use lib 'libnvidia-opencl.so.1'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x11185a0
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) 0x7f7cf0a0a8e0 0x7f7cf0a1d120
[25007] clmesg debug: libocl.c(394): pf 0x7f7cf0a0a8f0 0x7f7cf0a0a8e0 0x7f7cf0a1d120
[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x112afc0
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 1
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'intel64.icd' use lib '/opt/intel/opencl-1.2-3.2.1.16712/lib64/libintelocl.so'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x112b130
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) 0x7f7cf0569940 0x7f7cf056eab0
[25007] clmesg debug: libocl.c(394): pf 0x7f7cf0569c60 0x7f7cf0569940 0x7f7cf056eab0
[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x1131b30
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 2
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'coprthr.icd' use lib '/usr/local/browndeer/lib/libcoprthr_opencl.so'
coprthr-1.6.0 (Freewill)
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x1134550
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf 0x7f7cef1f5670 0x7f7cef1ea760 0x7f7cef1f5770
[25007] clmesg debug: libocl.c(394): pf 0x7f7cef1f5670 0x7f7cef1ea760 0x7f7cef1f5770
[25007] clmesg debug: ocl_device.c(528): __do_discover_devices (nil)
[25007] clmesg debug: device.c(99): __do_discover_devices_1 (nil)
[25007] clmesg debug: device.c(117): h=0x11350c0 init_device=0x7f7ceedd1980
[25007] clmesg debug: device_x86_64.c(90): init_device_x86_64
[25007] clmesg debug: device.c(138): codevtab[0]=0x1135700
[25007] clmesg debug: device.c(139): codevtab[1]=0x7f7cf32607f8
[25007] clmesg debug: device.c(149): 1 1
[25007] clmesg debug: device.c(152): navail nall 1 1
[25007] clmesg debug: device.c(161): ndevices 1
[25007] clmesg debug: device.c(168): devtab add 0x1135700
[25007] clmesg debug: device.c(191): __do_discover_devices_1 ndevices 1
[25007] clmesg debug: ocl_device.c(555): DEVICE 0 is arch x86_64
[25007] clmesg debug: ocl_device.c(571): __do_discover_devices ndevices 1
[25007] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x1136b70
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 3
[25007] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25007] clmesg debug: libocl.c(503):  returning 
[25007] clmesg debug: clrpcd.c(331): *nplatforms_ret = 3
[25007] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 0 0 3
[25007] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[25007] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x1115f70
[25007] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f7cf326ba2d
[25007] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25007] clmesg debug: libocl.c(497): platform 0 is 0x112afc0
[25007] clmesg debug: libocl.c(497): platform 1 is 0x1131b30
[25007] clmesg debug: libocl.c(497): platform 2 is 0x1136b70
[25007] clmesg debug: libocl.c(503):  returning 
[25007] clmesg debug: clrpcd.c(331): *nplatforms_ret = 3
[25007] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 3 3 3
[25007] clmesg debug: clrpcd.c(342): real platforms[0] = 0x112afc0
[25007] clmesg debug: clrpcd.c(342): real platforms[1] = 0x1131b30
[25007] clmesg debug: clrpcd.c(342): real platforms[2] = 0x1136b70
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2306, 256, 0x1136bc0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 12:NVIDIA CUDA
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x1131b30, 2306, 256, 0x1136bc0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f7cf0859fc0
[25007] clmesg debug: oclcall.c(195): 0x7f7cf0859fc8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 16:Intel(R) OpenCL
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x1136b70, 2306, 256, 0x11375e0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f7cef3fa320
[25007] clmesg debug: oclcall.c(195): 0x7f7cef3fa328
[25007] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 8:coprthr
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 0
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2307, 0, (nil), ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 19
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2307, 19, 0x11376e0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 19:NVIDIA Corporation
[25007] clmesg debug: clrpcd.c(497): _clrpc_clCreateContextFromType_svrcb
[25007] clmesg debug: clrpcd.c(525): prop[] 4228 0x112afc0
[25007] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(549): remote context = 0x1136bc0
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 4
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4227, 4, 0x1181200, ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): 4:�
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 0
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4225, 0, (nil), ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 8
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4225, 8, 0x118bd10, ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): 8:����
[25007] clmesg debug: clrpcd.c(415): _clrpc_clGetDeviceInfo_svrcb
[25007] clmesg debug: clrpcd.c(415): param_sz = 8
[25007] clmesg debug: clrpcd.c(415): calling 'clGetDeviceInfo' ( 0x112b080, 4145, 8, 0x1182be0, ...)
[25007] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(221): 0x112a7c8
[25007] clmesg debug: clrpcd.c(415): retval 0
[25007] clmesg debug: clrpcd.c(415): 8:����
[25007] clmesg debug: clrpcd.c(281): _clrpc_conn_close_cb

I get the same error even when running rpcd on a different host with an AMD 270x.

@browndeer
Copy link
Owner

I compared the output to successful run on the machine here.

Can you tell me what versions of the Nvidia and Intel SDKs you have installed?

Also, when you compile your test program it will select a cl.h file from somewhere. Can you send that cl.h file?

The seg fault appears to be caused by a very bad string being passed back. What I noticed are some differences in the
integer values of the constants used in the info query calls. I do not know for sure, but my first thought is that the
cl.h headers are out of sync.

stevechk wrote:

Machine is ubuntu 12.04 64-bit with an Nvidia GT610 card. I've
softlinked the default libOpenCL.so to point to libocl.so.

C++ program debug:

|[25016] clmesg debug: libocl.c(858): _libocl_init called
[25016] clmesg debug: libocl.c(892): fd 3
[25016] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fbffe4d3a2d
[25016] clmesg debug: libocl.c(150): searching for platforms
[25016] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[25016] clmesg debug: libocl.c(790): there is a clrpc section
[25016] clmesg debug: libocl.c(799): enble string yes
[25016] clmesg debug: libocl.c(807): there are 1 RPC servers
[25016] clmesg debug: libocl.c(821): add server '192.168.147.81:2112'
[25016] clmesg debug: libocl.c(173): conf returns nplatforms = 0
[25016] clmesg debug: libocl.c(175): 0 icd dirs specified
[25016] clmesg debug: libocl.c(255): 0 local platforms found
[25016] clmesg debug: libocl.c(284): added '192.168.147.81' 2112
[25016] clmesg debug: libocl.c(306): libclrpc: 0x11bb5c0 0x7fbffd2a44b0 0x7fbffd2a4710 0x7fbffd2a4c00
[25016] clmesg debug: libocl.c(309): nservers=1
[25016] clmesg debug: libclrpc.c(360): evthread_use_pthreads returned 0
[25016] clmesg debug: libclrpc.c(411): clrpc_nservers 1
[25016] clmesg info: libclrpc.c(414): CLRPC timeout set to 300 sec
[25016] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x11bd460
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(500): total 0
[25016] clmesg debug: libclrpc.c(509): getting array 0 (nil) 0
[25016] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x11bd460] *nplatforms_ret = 3

[25016] clmesg debug: libocl.c(324): 3 platforms available via RPC servers
[25016] clmesg debug: libocl.c(468): 3 0x11bdc40
[25016] clmesg debug: libclrpc.c(466): dptr local [0] = 0x11bdc20
[25016] clmesg debug: libclrpc.c(466): dptr local [1] = 0x11bdb40
[25016] clmesg debug: libclrpc.c(466): dptr local [2] = 0x11bdbd0
[25016] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x11bd460
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(500): total 0
[25016] clmesg debug: libclrpc.c(509): getting array 3 0x11bdc40 3
[25016] clmesg debug: libclrpc.c(517): at creation platform[0] is 0x11bdad0
[25016] clmesg debug: libclrpc.c(517): at creation platform[1] is 0x11bdaa0
[25016] clmesg debug: libclrpc.c(517): at creation platform[2] is 0x11bda70
[25016] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x11bd460] *nplatforms_ret = 3

[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz12
12:NVIDIA CUDA
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'NVIDIA CUDA'
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz16
16:Intel(R) OpenCL
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'Intel(R) OpenCL'
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz8
8:coprthr
[25016] clmesg debug: libocl.c(477): adding RPC platform name 'coprthr'
[25016] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25016] clmesg debug: libocl.c(503): returning
[25016] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fbffe4d3a2d
[25016] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25016] clmesg debug: libocl.c(497): platform 0 is 0x11bdad0
[25016] clmesg debug: libocl.c(497): platform 1 is 0x11bdaa0
[25016] clmesg debug: libocl.c(497): platform 2 is 0x11bda70
[25016] clmesg debug: libocl.c(503): returning
Platform size 3
[25016] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(195): 0x7fbffd4eb308
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz19
0:(null)
[25016] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(195): 0x7fbffd4eb308
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz19
19:NVIDIA Corporation
Platform 0 is by: NVIDIA Corporation
Platform 0: # 0x11bdad0
[25016] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(782): nprop 1
[25016] clmesg debug: libclrpc.c(787): checking prop 4228
[25016] clmesg debug: libclrpc.c(794): set xprop value 0x11bdad0 0x112afc0
[25016] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(753): _clrpc_clCreateContextFromType_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(822): context local remote 0x11be230 0x1136bc0
[25016] clmesg debug: libclrpc.c(827): clrpc_clCreateContextFromType: *err_ret = 0

[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 4
[25016] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[25016] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[25016] clmesg debug: libclrpc.c(881): dptr local [0] = 0x11bdfa0
[25016] clmesg debug: libclrpc.c(890): (0) local 0x11bdfa0 remote 0x112b080
[25016] clmesg debug: libclrpc.c(898): (0) local 0x11be520 remote 0x112b080
[25016] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7fbffd4eb300
[25016] clmesg debug: oclcall.c(221): 0x7fbffd4eb318
[25016] clmesg debug: libclrpc.c(661): object local 0x11be520 remote 0x112b080
[25016] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: waiting ...
[25016] clmesg debug: libclrpc.c(661): _clrpc_clGetDeviceInfo_clicb: status=0(0)
[25016] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: ... done waiting
[25016] clmesg debug: libclrpc.c(661): clrpc_clGetDeviceInfo: *param_sz_ret 8
./build2.sh: line 6: 25016 Segmentation fault (core dumped) ./clcpp
|

RPCD (same box)

|[25007] clmesg debug: libocl.c(858): _libocl_init called
[25007] clmesg debug: libocl.c(892): fd 3
[25007] clmesg info: clrpcd.c(160): http_setup: address=192.168.147.81 port=2112
[25007] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[25007] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x1115f70
[25007] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f7cf326ba2d
[25007] clmesg debug: libocl.c(150): searching for platforms
[25007] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[25007] clmesg debug: libocl.c(722): there are 1 platforms
[25007] clmesg debug: libocl.c(767): there are 1 icd_dirs
[25007] clmesg debug: libocl.c(173): conf returns nplatforms = 1
[25007] clmesg debug: libocl.c(175): 1 icd dirs specified
[25007] clmesg debug: libocl.c(179): scanning ICD dir '/etc/OpenCL/vendors/'
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//nvidia.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//nvidia.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 22
[25007] clmesg debug: libocl.c(230): adding platform 'nvidia.icd' (libnvidia-opencl.so.1)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//intel64.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//intel64.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 54
[25007] clmesg debug: libocl.c(230): adding platform 'intel64.icd' (/opt/intel/opencl-1.2-3.2.1.16712/lib64/libintelocl.so)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//coprthr.icd|
[25007] clmesg debug: libocl.c(196): found icd file |/etc/OpenCL/vendors//coprthr.icd|
[25007] clmesg debug: libocl.c(200): size of icd file is 46
[25007] clmesg debug: libocl.c(230): adding platform 'coprthr.icd' (/usr/local/browndeer/lib/libcoprthr_opencl.so)
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//.|
[25007] clmesg debug: libocl.c(190): is this an icd file? |/etc/OpenCL/vendors//..|
[25007] clmesg debug: libocl.c(255): 4 local platforms found
[25007] clmesg debug: libocl.c(306): libclrpc: 0x1116cb0 0x7f7cf24294b0 0x7f7cf2429710 0x7f7cf2429c00
[25007] clmesg debug: libocl.c(309): nservers=0
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'nvidia' use lib 'libcuda.so'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x1117360
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) (nil) (nil)
[25007] clmesg debug: libocl.c(394): pf (nil) (nil) (nil)
[25007] clmesg WARNING: libocl.c(399): missing ICD required call, skipping
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'nvidia.icd' use lib 'libnvidia-opencl.so.1'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x11185a0
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) 0x7f7cf0a0a8e0 0x7f7cf0a1d120
[25007] clmesg debug: libocl.c(394): pf 0x7f7cf0a0a8f0 0x7f7cf0a0a8e0 0x7f7cf0a1d120
[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x112afc0
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 1
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'intel64.icd' use lib '/opt/intel/opencl-1.2-3.2.1.16712/lib64/libintelocl.so'
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x112b130
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf (nil) 0x7f7cf0569940 0x7f7cf056eab0
[25007] clmesg debug: libocl.c(394): pf 0x7f7cf0569c60 0x7f7cf0569940 0x7f7cf056eab0
[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x1131b30
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 2
[25007] clmesg debug: libocl.c(348): ocl.conf: platform 'coprthr.icd' use lib '/usr/local/browndeer/lib/libcoprthr_opencl.so'
coprthr-1.6.0 (Freewill)
[25007] clmesg debug: libocl.c(359): dlopen dlh=0x1134550
[25007] clmesg debug: libocl.c(363): dlopen successful
[25007] clmesg debug: libocl.c(380): pf 0x7f7cef1f5670 0x7f7cef1ea760 0x7f7cef1f5770
[25007] clmesg debug: libocl.c(394): pf 0x7f7cef1f5670 0x7f7cef1ea760 0x7f7cef1f5770
[25007] clmesg debug: ocl_device.c(528): __do_discover_devices (nil)
[25007] clmesg debug: device.c(99): __do_discover_devices_1 (nil)
[25007] clmesg debug: device.c(117): h=0x11350c0 init_device=0x7f7ceedd1980
[25007] clmesg debug: device_x86_64.c(90): init_device_x86_64
[25007] clmesg debug: device.c(138): codevtab[0]=0x1135700
[25007] clmesg debug: device.c(139): codevtab[1]=0x7f7cf32607f8
[25007] clmesg debug: device.c(149): 1 1
[25007] clmesg debug: device.c(152): navail nall 1 1
[25007] clmesg debug: device.c(161): ndevices 1
[25007] clmesg debug: device.c(168): devtab add 0x1135700
[25007] clmesg debug: device.c(191): __do_discover_devices_1 ndevices 1
[25007] clmesg debug: ocl_device.c(555): DEVICE 0 is arch x86_64
[25007] clmesg debug: ocl_device.c(571): __do_discover_devices ndevices 1
[25007] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[25007] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[25007] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[25007] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x1136b70
[25007] clmesg debug: libocl.c(457): inc _nplatforms to 3
[25007] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25007] clmesg debug: libocl.c(503): returning
[25007] clmesg debug: clrpcd.c(331): *nplatforms_ret = 3
[25007] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 0 0 3
[25007] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[25007] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x1115f70
[25007] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f7cf326ba2d
[25007] clmesg debug: libocl.c(490): libocl: found 3 platforms
[25007] clmesg debug: libocl.c(497): platform 0 is 0x112afc0
[25007] clmesg debug: libocl.c(497): platform 1 is 0x1131b30
[25007] clmesg debug: libocl.c(497): platform 2 is 0x1136b70
[25007] clmesg debug: libocl.c(503): returning
[25007] clmesg debug: clrpcd.c(331): *nplatforms_ret = 3
[25007] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 3 3 3
[25007] clmesg debug: clrpcd.c(342): real platforms[0] = 0x112afc0
[25007] clmesg debug: clrpcd.c(342): real platforms[1] = 0x1131b30
[25007] clmesg debug: clrpcd.c(342): real platforms[2] = 0x1136b70
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2306, 256, 0x1136bc0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 12:NVIDIA CUDA
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x1131b30, 2306, 256, 0x1136bc0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f7cf0859fc0
[25007] clmesg debug: oclcall.c(195): 0x7f7cf0859fc8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 16:Intel(R) OpenCL
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 256
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x1136b70, 2306, 256, 0x11375e0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f7cef3fa320
[25007] clmesg debug: oclcall.c(195): 0x7f7cef3fa328
[25007] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 8:coprthr
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 0
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2307, 0, (nil), ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[25007] clmesg debug: clrpcd.c(356): param_sz = 19
[25007] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x112afc0, 2307, 19, 0x11376e0, ...)
[25007] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(195): 0x112a7b8
[25007] clmesg debug: clrpcd.c(356): retval 0
[25007] clmesg debug: clrpcd.c(356): 19:NVIDIA Corporation
[25007] clmesg debug: clrpcd.c(497): _clrpc_clCreateContextFromType_svrcb
[25007] clmesg debug: clrpcd.c(525): prop[] 4228 0x112afc0
[25007] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(549): remote context = 0x1136bc0
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 4
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4227, 4, 0x1181200, ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): 4:
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 0
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4225, 0, (nil), ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[25007] clmesg debug: clrpcd.c(569): param_sz = 8
[25007] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x1136bc0, 4225, 8, 0x118bd10, ...)
[25007] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x112a7b0
[25007] clmesg debug: clrpcd.c(569): retval 0
[25007] clmesg debug: clrpcd.c(569): 8:��
[25007] clmesg debug: clrpcd.c(415): _clrpc_clGetDeviceInfo_svrcb
[25007] clmesg debug: clrpcd.c(415): param_sz = 8
[25007] clmesg debug: clrpcd.c(415): calling 'clGetDeviceInfo' ( 0x112b080, 4145, 8, 0x1182be0, ...)
[25007] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x112a7b0
[25007] clmesg debug: oclcall.c(221): 0x112a7c8
[25007] clmesg debug: clrpcd.c(415): retval 0
[25007] clmesg debug: clrpcd.c(415): 8:��
[25007] clmesg debug: clrpcd.c(281): _clrpc_conn_close_cb

|
|

I get the same error even when running rpcd on a different host with an
AMD 270x.


Reply to this email directly or view it on GitHub
#15 (comment).

David Richie, Ph.D.
Brown Deer Technology
1641 Denwright Court
Forest Hill, MD 21050
410-459-3848
[email protected]
www.browndeertechnology.com

@stevechk
Copy link
Author

I grabbed the standard OpenCL1.2 includes for the build.

I tried copying these over to the coprthr/include directory, and overwriting the ones that were there and rebuilding both coprthr and the code, but still got the same error.

Btw the ocl.conf files are:

(cl.cpp)

platforms = (
 { platform="coprthr"; lib="libcoprthr.so"; }
);

/*icd_dirs = ( "/etc/OpenCL/vendors/" );*/

clrpc = {
 enable = "yes";
 servers = (
  { url="192.168.147.81:2112" }
 )
};

(rpcd)


/* reference design for OCL cfg file */

platforms = (
    { platform="nvidia"; lib="libcuda.so"; }
);

icd_dirs = ( "/etc/OpenCL/vendors/" );
/*
clrpc = { 
    enable = "yes"; 
    servers = ( 
        { url="192.168.1.73:8091" },
        { url="192.168.1.73:8092" }
    )
};
*/

@browndeer
Copy link
Owner

try this.

ocl.conf for the client (cl.cpp):

platforms = (

{ platform="coprthr"; lib="libcoprthr.so"; }

);

/icd_dirs = ( "/etc/OpenCL/vendors/" );/

clrpc = {
enable = "yes";
servers = (
{ url="192.168.147.81:2112" }
)
};

and ocl.conf for the server (clrpcd):

platforms = (
{ platform="coprthr"; lib="libcoprthr_opencl.so"; }
);

/* icd_dirs = ( "/etc/OpenCL/vendors/" ); *.

/*
clrpc = {
enable = "yes";
servers = (
{ url="192.168.1.73:8091" },
{ url="192.168.1.73:8092" }
)
};
*/

tell me what happens or send cldebug output.

i libocl was encountering both libcuda.so and libnvidia_opencl.so and also encountering libcoprthr.so.

two of these are not uptodate, but i am not sure if that is having any effect, they appear to be skipped during the
checks performed by the loader.

stevechk wrote:

I grabbed the standard OpenCL1.2 includes for the build.

I tried copying these over to the coprthr/include directory, and
overwriting the ones that were there and rebuilding both coprthr and the
code, but still got the same error.

Btw the ocl.conf files are:

(cl.cpp)

|platforms = (
{ platform="coprthr"; lib="libcoprthr.so"; }
);

/icd_dirs = ( "/etc/OpenCL/vendors/" );/

clrpc = {
enable = "yes";
servers = (
{ url="192.168.147.81:2112" }
)
};
|

(rpcd)

|
|

platforms = (
{ platform="nvidia"; lib="libcuda.so"; }
);

icd_dirs = ( "/etc/OpenCL/vendors/" );
/*
clrpc = {
enable = "yes";
servers = (
{ url="192.168.1.73:8091" },
{ url="192.168.1.73:8092" }
)
};
*/
|


Reply to this email directly or view it on GitHub
#15 (comment).

David Richie, Ph.D.
Brown Deer Technology
1641 Denwright Court
Forest Hill, MD 21050
410-459-3848
[email protected]
www.browndeertechnology.com

@stevechk
Copy link
Author

Same issue - here are the updated logs.

One question I had was around the local vs. remote mapping. The client crashes on the following line:

void* oclent  = *(void**)a0; //a0=0x2029950

but the line further up suggests that this is the remote value:

[26756] clmesg debug: libclrpc.c(794): set xprop value 0x172de90 0x2029950

so when should calls be using the local context, and when should they be using the remote one? what is the difference between the local and remote values?

Updated logs...

Client

[26756] clmesg debug: libocl.c(858): _libocl_init called
[26756] clmesg debug: libocl.c(892): fd 3
[26756] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fc862151a2d
[26756] clmesg debug: libocl.c(150): searching for platforms
[26756] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[26756] clmesg debug: libocl.c(722): there are 0 platforms
[26756] clmesg debug: libocl.c(790): there is a clrpc section
[26756] clmesg debug: libocl.c(799): enble string yes
[26756] clmesg debug: libocl.c(807): there are 1 RPC servers
[26756] clmesg debug: libocl.c(821): add server '192.168.147.81:2112'
[26756] clmesg debug: libocl.c(173): conf returns nplatforms = 0
[26756] clmesg debug: libocl.c(175): 0 icd dirs specified
[26756] clmesg debug: libocl.c(255): 0 local platforms found
[26756] clmesg debug: libocl.c(284): added '192.168.147.81' 2112
[26756] clmesg debug: libocl.c(306): libclrpc: 0x172b5c0 0x7fc860f224b0 0x7fc860f22710 0x7fc860f22c00
[26756] clmesg debug: libocl.c(309): nservers=1
[26756] clmesg debug: libclrpc.c(360): evthread_use_pthreads returned 0
[26756] clmesg debug: libclrpc.c(411): clrpc_nservers 1
[26756] clmesg info: libclrpc.c(414): CLRPC timeout set to 300 sec
[26756] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x172d490
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(500): total 0
[26756] clmesg debug: libclrpc.c(509): getting array 0 (nil) 0
[26756] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x172d490] *nplatforms_ret = 1

[26756] clmesg debug: libocl.c(324): 1 platforms available via RPC servers
[26756] clmesg debug: libocl.c(468): 1 0x172dc70
[26756] clmesg debug: libclrpc.c(466): dptr local [0] = 0x172dc50
[26756] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x172d490
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(500): total 0
[26756] clmesg debug: libclrpc.c(509): getting array 1 0x172dc70 1
[26756] clmesg debug: libclrpc.c(517): at creation platform[0] is 0x172de90
[26756] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x172d490] *nplatforms_ret = 1

[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz8
8:coprthr
[26756] clmesg debug: libocl.c(477): adding RPC platform name 'coprthr'
[26756] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26756] clmesg debug: libocl.c(503):  returning 
[26756] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fc862151a2d
[26756] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26756] clmesg debug: libocl.c(497): platform 0 is 0x172de90
[26756] clmesg debug: libocl.c(503):  returning 
Platform size 1
[26756] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(195): 0x7fc861169308
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz28
0:(null)
[26756] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(195): 0x7fc861169308
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz28
28:Brown Deer Technology, LLC.
Platform 0 is by: Brown Deer Technology, LLC.
Platform 0: # 0x172de90
[26756] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(782): nprop 1
[26756] clmesg debug: libclrpc.c(787): checking prop 4228
[26756] clmesg debug: libclrpc.c(794): set xprop value 0x172de90 0x2029950
[26756] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(753): _clrpc_clCreateContextFromType_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(822): context local remote 0x172de60 0x2026610
[26756] clmesg debug: libclrpc.c(827): clrpc_clCreateContextFromType: *err_ret = 0

[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 4
[26756] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[26756] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[26756] clmesg debug: libclrpc.c(881): dptr local [0] = 0x172de10
[26756] clmesg debug: libclrpc.c(890): (0) local 0x172de10 remote 0x20297f0
[26756] clmesg debug: libclrpc.c(898): (0) local 0x172e410 remote 0x20297f0
[26756] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(221): 0x7fc861169318
[26756] clmesg debug: libclrpc.c(661): object local 0x172e410 remote 0x20297f0
[26756] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(661): _clrpc_clGetDeviceInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(661): clrpc_clGetDeviceInfo: *param_sz_ret 8
./build2.sh: line 7: 26756 Segmentation fault      (core dumped) ./clcpp
...
(gdb) bt
#0  clGetPlatformInfo (a0=0x2029950, a1=2305, a2=0, a3=0x0, a4=0x7fffc461c320) at oclcall.c:192
#1  0x0000000000401847 in cl::detail::getPlatformVersion (platform=0x2029950)
    at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1693
#2  0x00000000004018ef in cl::detail::getDevicePlatformVersion (device=0x172e410)
    at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1703
#3  0x0000000000402200 in cl::detail::Wrapper<_cl_device_id*>::isReferenceCountable (
    device=0x172e410) at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1794
#4  0x000000000040224b in cl::detail::Wrapper<_cl_device_id*>::Wrapper (this=0x172e050, 
    obj=@0x7fffc461c600: 0x172e410) at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1809
#5  0x0000000000402371 in cl::Device::Device (this=0x172e050, device=@0x7fffc461c600: 0x172e410)
    at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1927
#6  0x00000000004052bc in std::_Construct<cl::Device, _cl_device_id*> (__p=0x172e050, 
    __value=@0x7fffc461c600: 0x172e410) at /usr/include/c++/4.6/bits/stl_construct.h:84
#7  0x0000000000405028 in std::__uninitialized_copy<false>::__uninit_copy<_cl_device_id**, cl::Device*> (__first=0x7fffc461c600, __last=0x7fffc461c608, __result=0x172e050)
    at /usr/include/c++/4.6/bits/stl_uninitialized.h:77
...

RPCD

./rpcd.sh 
[26745] clmesg debug: libocl.c(858): _libocl_init called
[26745] clmesg debug: libocl.c(892): fd 3
[26745] clmesg info: clrpcd.c(160): http_setup: address=192.168.147.81 port=2112
[26745] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[26745] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x2025f70
[26745] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f47ddc5ca2d
[26745] clmesg debug: libocl.c(150): searching for platforms
[26745] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[26745] clmesg debug: libocl.c(722): there are 1 platforms
[26745] clmesg debug: libocl.c(173): conf returns nplatforms = 1
[26745] clmesg debug: libocl.c(175): 0 icd dirs specified
[26745] clmesg debug: libocl.c(255): 1 local platforms found
[26745] clmesg debug: libocl.c(306): libclrpc: 0x2026c90 0x7f47dce1a4b0 0x7f47dce1a710 0x7f47dce1ac00
[26745] clmesg debug: libocl.c(309): nservers=0
[26745] clmesg debug: libocl.c(348): ocl.conf: platform 'coprthr' use lib 'libcoprthr_opencl.so'
coprthr-1.6.0 (Freewill)
[26745] clmesg debug: libocl.c(359): dlopen dlh=0x2027130
[26745] clmesg debug: libocl.c(363): dlopen successful
[26745] clmesg debug: libocl.c(380): pf 0x7f47dcbec670 0x7f47dcbe1760 0x7f47dcbec770
[26745] clmesg debug: libocl.c(394): pf 0x7f47dcbec670 0x7f47dcbe1760 0x7f47dcbec770
[26745] clmesg debug: ocl_device.c(528): __do_discover_devices (nil)
[26745] clmesg debug: device.c(99): __do_discover_devices_1 (nil)
[26745] clmesg debug: device.c(117): h=0x2027e40 init_device=0x7f47dc7c8980
[26745] clmesg debug: device_x86_64.c(90): init_device_x86_64
[26745] clmesg debug: device.c(138): codevtab[0]=0x2028480
[26745] clmesg debug: device.c(139): codevtab[1]=0x7f47ddc51778
[26745] clmesg debug: device.c(149): 1 1
[26745] clmesg debug: device.c(152): navail nall 1 1
[26745] clmesg debug: device.c(161): ndevices 1
[26745] clmesg debug: device.c(168): devtab add 0x2028480
[26745] clmesg debug: device.c(191): __do_discover_devices_1 ndevices 1
[26745] clmesg debug: ocl_device.c(555): DEVICE 0 is arch x86_64
[26745] clmesg debug: ocl_device.c(571): __do_discover_devices ndevices 1
[26745] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[26745] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[26745] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[26745] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x2029950
[26745] clmesg debug: libocl.c(457): inc _nplatforms to 1
[26745] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26745] clmesg debug: libocl.c(503):  returning 
[26745] clmesg debug: clrpcd.c(331): *nplatforms_ret = 1
[26745] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 0 0 1
[26745] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[26745] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x2025f70
[26745] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f47ddc5ca2d
[26745] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26745] clmesg debug: libocl.c(497): platform 0 is 0x2029950
[26745] clmesg debug: libocl.c(503):  returning 
[26745] clmesg debug: clrpcd.c(331): *nplatforms_ret = 1
[26745] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 1 1 1
[26745] clmesg debug: clrpcd.c(342): real platforms[0] = 0x2029950
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 256
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2306, 256, 0x202a7c0, ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): 8:coprthr
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 0
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2307, 0, (nil), ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 28
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2307, 28, 0x202a460, ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): 28:Brown Deer Technology, LLC.
[26745] clmesg debug: clrpcd.c(497): _clrpc_clCreateContextFromType_svrcb
[26745] clmesg debug: clrpcd.c(525): prop[] 4228 0x2029950
[26745] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7f47dcdf1320
[26745] clmesg debug: ocl_context.c(117): clCreateContextFromType
[26745] clmesg debug: ocl_context.c(304): __find_context_property: (1084) p=1084
[26745] clmesg debug: ocl_context.c(310): __find_context_property: v=2029950
[26745] clmesg debug: ocl_context.c(314): __find_context_property: match
[26745] clmesg debug: ocl_device.c(643): ndevices = 1
[26745] clmesg debug: ocl_device.c(650): match devtype 2 -1
[26745] clmesg debug: ocl_device.c(654): n = 1
[26745] clmesg debug: ocl_context.c(150): clCreateContextFromType: platform ndev=1
[26745] clmesg debug: ocl_context.c(164): clCreateContextFromType: compare 2 ffffffff
[26745] clmesg debug: ocl_context.c(171): clCreateContextFromType: matching ndev=1
[26745] clmesg debug: clrpcd.c(549): remote context = 0x2026610
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 4
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4227, 4, 0x202a260, ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): 4:�
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 0
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4225, 0, (nil), ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 8
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4225, 8, 0x2026b10, ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): 8:����
[26745] clmesg debug: clrpcd.c(415): _clrpc_clGetDeviceInfo_svrcb
[26745] clmesg debug: clrpcd.c(415): param_sz = 8
[26745] clmesg debug: clrpcd.c(415): calling 'clGetDeviceInfo' ( 0x20297f0, 4145, 8, 0x2028ca0, ...)
[26745] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(221): 0x7f47dcdf1338
[26745] clmesg debug: clrpcd.c(415): retval 0
[26745] clmesg debug: clrpcd.c(415): 8:P���
[26745] clmesg debug: clrpcd.c(281): _clrpc_conn_close_cb

@browndeer
Copy link
Owner

Ok. I think I figured this out. A few things going on. First, the cl.hpp I have cannot be the same as what you have
because its making a different sequence of queries. The root cause of the seg fault is the attempt to request the
platform ID from the device ID, clGetDeviceInfo( ..., CL_DEVICE_PLATFORM, ...) since this type of query, where a ptr is
returned from an info query, must be treated in a special way, but this is not implemented in CLRPC yet. Its trivial,
but special code must be added for that particular case, similar to what is done elsewhere when an info query requests
what is essentially a pointer. This was never caught because its an odd query - the only way you can have a device ID
is if you originally selected a platform ID, so what happened in the code, it forgot? This is what I cannot stand about
OpenCL. The completely random multiplicity in the semantics. A design is always nice when constructing an API.

However, it is there so it should be treated. We will try to get this added since apparently you cannot use some
version of cl.hpp without it. Version I have never makes this odd query and so its not an issue.

To your question regarding local vs. remote pointers. the only people who must worry about this are CLRPC developers,
its completely hidden and transparent. Your client code should follow the normal rules and not be altered. What you
see referred to as local vs remote has to do with how pointers are managed indirectly. All pointers in CLRPC (hidden
behind the OpenCL "opaque" types) are implemented as dual-pointers. They have a local and a remote value.

stevechk wrote:

Same issue - here are the updated logs.

One question I had was around the local vs. remote mapping. The client
crashes on the following line:

|void* oclent = (void*)a0; //a0=0x2029950
|

but the line further up suggests that this is the remote value:

|[26756] clmesg debug: libclrpc.c(794): set xprop value 0x172de90 0x2029950
|

so when should calls be using the local context, and when should they be
using the remote one? what is the difference between the local and
remote values?

Updated logs...

Client

|[26756] clmesg debug: libocl.c(858): _libocl_init called
[26756] clmesg debug: libocl.c(892): fd 3
[26756] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fc862151a2d
[26756] clmesg debug: libocl.c(150): searching for platforms
[26756] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[26756] clmesg debug: libocl.c(722): there are 0 platforms
[26756] clmesg debug: libocl.c(790): there is a clrpc section
[26756] clmesg debug: libocl.c(799): enble string yes
[26756] clmesg debug: libocl.c(807): there are 1 RPC servers
[26756] clmesg debug: libocl.c(821): add server '192.168.147.81:2112'
[26756] clmesg debug: libocl.c(173): conf returns nplatforms = 0
[26756] clmesg debug: libocl.c(175): 0 icd dirs specified
[26756] clmesg debug: libocl.c(255): 0 local platforms found
[26756] clmesg debug: libocl.c(284): added '192.168.147.81' 2112
[26756] clmesg debug: libocl.c(306): libclrpc: 0x172b5c0 0x7fc860f224b0 0x7fc860f22710 0x7fc860f22c00
[26756] clmesg debug: libocl.c(309): nservers=1
[26756] clmesg debug: libclrpc.c(360): evthread_use_pthreads returned 0
[26756] clmesg debug: libclrpc.c(411): clrpc_nservers 1
[26756] clmesg info: libclrpc.c(414): CLRPC timeout set to 300 sec
[26756] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x172d490
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(500): total 0
[26756] clmesg debug: libclrpc.c(509): getting array 0 (nil) 0
[26756] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x172d490] *nplatforms_ret = 1

[26756] clmesg debug: libocl.c(324): 1 platforms available via RPC servers
[26756] clmesg debug: libocl.c(468): 1 0x172dc70
[26756] clmesg debug: libclrpc.c(466): dptr local [0] = 0x172dc50
[26756] clmesg debug: libclrpc.c(473): rpc_pools[0] 0x172d490
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(453): _clrpc_clGetPlatformIDs_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(489): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(500): total 0
[26756] clmesg debug: libclrpc.c(509): getting array 1 0x172dc70 1
[26756] clmesg debug: libclrpc.c(517): at creation platform[0] is 0x172de90
[26756] clmesg debug: libclrpc.c(531): clrpc_clGetPlatformIDs: [0x172d490] *nplatforms_ret = 1

[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz8
8:coprthr
[26756] clmesg debug: libocl.c(477): adding RPC platform name 'coprthr'
[26756] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26756] clmesg debug: libocl.c(503): returning
[26756] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7fc862151a2d
[26756] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26756] clmesg debug: libocl.c(497): platform 0 is 0x172de90
[26756] clmesg debug: libocl.c(503): returning
Platform size 1
[26756] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(195): 0x7fc861169308
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz28
0:(null)
[26756] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(195): 0x7fc861169308
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(550): _clrpc_clGetPlatformInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(568): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(573): clrpc_clGetPlatformInfo: required param_sz28
28:Brown Deer Technology, LLC.
Platform 0 is by: Brown Deer Technology, LLC.
Platform 0: # 0x172de90
[26756] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(782): nprop 1
[26756] clmesg debug: libclrpc.c(787): checking prop 4228
[26756] clmesg debug: libclrpc.c(794): set xprop value 0x172de90 0x2029950
[26756] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(753): _clrpc_clCreateContextFromType_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(818): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(822): context local remote 0x172de60 0x2026610
[26756] clmesg debug: libclrpc.c(827): clrpc_clCreateContextFromType: *err_ret = 0

[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: _param_sz_ret 4
[26756] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): _clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[26756] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7fc861169300
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(843): clrpc_clGetContextInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(859): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(862): clrpc_clGetContextInfo: *param_sz_ret 8
[26756] clmesg debug: libclrpc.c(881): dptr local [0] = 0x172de10
[26756] clmesg debug: libclrpc.c(890): (0) local 0x172de10 remote 0x20297f0
[26756] clmesg debug: libclrpc.c(898): (0) local 0x172e410 remote 0x20297f0
[26756] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7fc861169300
[26756] clmesg debug: oclcall.c(221): 0x7fc861169318
[26756] clmesg debug: libclrpc.c(661): object local 0x172e410 remote 0x20297f0
[26756] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: waiting ...
[26756] clmesg debug: libclrpc.c(661): clrpc_clGetDeviceInfo_clicb: status=0(0)
[26756] clmesg debug: libclrpc.c(661): CLRPC_MAKE_REQUEST: ... done waiting
[26756] clmesg debug: libclrpc.c(661): clrpc_clGetDeviceInfo: param_sz_ret 8
./build2.sh: line 7: 26756 Segmentation fault (core dumped) ./clcpp
...
(gdb) bt
#0 clGetPlatformInfo (a0=0x2029950, a1=2305, a2=0, a3=0x0, a4=0x7fffc461c320) at oclcall.c:192
#1 0x0000000000401847 in cl::detail::getPlatformVersion (platform=0x2029950)
at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1693
#2 0x00000000004018ef in cl::detail::getDevicePlatformVersion (device=0x172e410)
at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1703
#3 0x0000000000402200 in cl::detail::Wrapper<cl_device_id>::isReferenceCountable (
device=0x172e410) at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1794
#4 0x000000000040224b in cl::detail::Wrapper<cl_device_id>::Wrapper (this=0x172e050,
obj=@0x7fffc461c600: 0x172e410) at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1809
#5 0x0000000000402371 in cl::Device::Device (this=0x172e050, device=@0x7fffc461c600: 0x172e410)
at /home/steve/coprthr/coprthr/include/CL/cl.hpp:1927
#6 0x00000000004052bc in std::_Construct<cl::Device, cl_device_id> (__p=0x172e050,
__value=@0x7fffc461c600: 0x172e410) at /usr/include/c++/4.6/bits/stl_construct.h:84
#7 0x0000000000405028 in std::__uninitialized_copy::__uninit_copy<_cl_device_id
, cl::Device
> (__first=0x7fffc461c600, __last=0x7fffc461c608, __result=0x172e050)
at /usr/include/c++/4.6/bits/stl_uninitialized.h:77
...
|

RPCD

|./rpcd.sh
[26745] clmesg debug: libocl.c(858): _libocl_init called
[26745] clmesg debug: libocl.c(892): fd 3
[26745] clmesg info: clrpcd.c(160): http_setup: address=192.168.147.81 port=2112
[26745] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[26745] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x2025f70
[26745] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f47ddc5ca2d
[26745] clmesg debug: libocl.c(150): searching for platforms
[26745] clmesg debug: libocl.c(706): selected path is './ocl.conf'
[26745] clmesg debug: libocl.c(722): there are 1 platforms
[26745] clmesg debug: libocl.c(173): conf returns nplatforms = 1
[26745] clmesg debug: libocl.c(175): 0 icd dirs specified
[26745] clmesg debug: libocl.c(255): 1 local platforms found
[26745] clmesg debug: libocl.c(306): libclrpc: 0x2026c90 0x7f47dce1a4b0 0x7f47dce1a710 0x7f47dce1ac00
[26745] clmesg debug: libocl.c(309): nservers=0
[26745] clmesg debug: libocl.c(348): ocl.conf: platform 'coprthr' use lib 'libcoprthr_opencl.so'
coprthr-1.6.0 (Freewill)
[26745] clmesg debug: libocl.c(359): dlopen dlh=0x2027130
[26745] clmesg debug: libocl.c(363): dlopen successful
[26745] clmesg debug: libocl.c(380): pf 0x7f47dcbec670 0x7f47dcbe1760 0x7f47dcbec770
[26745] clmesg debug: libocl.c(394): pf 0x7f47dcbec670 0x7f47dcbe1760 0x7f47dcbec770
[26745] clmesg debug: ocl_device.c(528): __do_discover_devices (nil)
[26745] clmesg debug: device.c(99): __do_discover_devices_1 (nil)
[26745] clmesg debug: device.c(117): h=0x2027e40 init_device=0x7f47dc7c8980
[26745] clmesg debug: device_x86_64.c(90): init_device_x86_64
[26745] clmesg debug: device.c(138): codevtab[0]=0x2028480
[26745] clmesg debug: device.c(139): codevtab[1]=0x7f47ddc51778
[26745] clmesg debug: device.c(149): 1 1
[26745] clmesg debug: device.c(152): navail nall 1 1
[26745] clmesg debug: device.c(161): ndevices 1
[26745] clmesg debug: device.c(168): devtab add 0x2028480
[26745] clmesg debug: device.c(191): __do_discover_devices_1 ndevices 1
[26745] clmesg debug: ocl_device.c(555): DEVICE 0 is arch x86_64
[26745] clmesg debug: ocl_device.c(571): __do_discover_devices ndevices 1
[26745] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[26745] clmesg debug: libocl.c(410): clIcdGetPlatformIDsKHR shows 1 platforms available
[26745] clmesg debug: xcl_icd.c(54): nplatforms_avail 1

[26745] clmesg debug: libocl.c(421): clIcdGetPlatformIDsKHR returns platform 0x2029950
[26745] clmesg debug: libocl.c(457): inc _nplatforms to 1
[26745] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26745] clmesg debug: libocl.c(503): returning
[26745] clmesg debug: clrpcd.c(331): *nplatforms_ret = 1
[26745] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 0 0 1
[26745] clmesg debug: clrpcd.c(303): _clrpc_clGetPlatformIDs_svrcb
[26745] clmesg debug: clrpcd.c(318): _clrpc_clGetPlatformIDs_svrcb 0x2025f70
[26745] clmesg debug: libocl.c(139): clGetPlatformIDs (loader) @ 0x7f47ddc5ca2d
[26745] clmesg debug: libocl.c(490): libocl: found 1 platforms
[26745] clmesg debug: libocl.c(497): platform 0 is 0x2029950
[26745] clmesg debug: libocl.c(503): returning
[26745] clmesg debug: clrpcd.c(331): *nplatforms_ret = 1
[26745] clmesg debug: clrpcd.c(339): n nplatforms nplatforms_ret 1 1 1
[26745] clmesg debug: clrpcd.c(342): real platforms[0] = 0x2029950
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 256
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2306, 256, 0x202a7c0, ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): 8:coprthr
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 0
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2307, 0, (nil), ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): _clrpc_clGetPlatformInfo_svrcb
[26745] clmesg debug: clrpcd.c(356): param_sz = 28
[26745] clmesg debug: clrpcd.c(356): calling 'clGetPlatformInfo' ( 0x2029950, 2307, 28, 0x202a460, ...)
[26745] clmesg debug: oclcall.c(194): clGetPlatformInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(195): 0x7f47dcdf1328
[26745] clmesg debug: ocl_platform.c(97): clGetPlatformInfo
[26745] clmesg debug: clrpcd.c(356): retval 0
[26745] clmesg debug: clrpcd.c(356): 28:Brown Deer Technology, LLC.
[26745] clmesg debug: clrpcd.c(497): _clrpc_clCreateContextFromType_svrcb
[26745] clmesg debug: clrpcd.c(525): prop[] 4228 0x2029950
[26745] clmesg debug: libocl.c(565): clCreateContextFromType (loader) 0x7f47dcdf1320
[26745] clmesg debug: ocl_context.c(117): clCreateContextFromType
[26745] clmesg debug: ocl_context.c(304): __find_context_property: (1084) p=1084
[26745] clmesg debug: ocl_context.c(310): __find_context_property: v=2029950
[26745] clmesg debug: ocl_context.c(314): __find_context_property: match
[26745] clmesg debug: ocl_device.c(643): ndevices = 1
[26745] clmesg debug: ocl_device.c(650): match devtype 2 -1
[26745] clmesg debug: ocl_device.c(654): n = 1
[26745] clmesg debug: ocl_context.c(150): clCreateContextFromType: platform ndev=1
[26745] clmesg debug: ocl_context.c(164): clCreateContextFromType: compare 2 ffffffff
[26745] clmesg debug: ocl_context.c(171): clCreateContextFromType: matching ndev=1
[26745] clmesg debug: clrpcd.c(549): remote context = 0x2026610
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 4
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4227, 4, 0x202a260, ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): 4:
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 0
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4225, 0, (nil), ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): _clrpc_clGetContextInfo_svrcb
[26745] clmesg debug: clrpcd.c(569): param_sz = 8
[26745] clmesg debug: clrpcd.c(569): calling 'clGetContextInfo' ( 0x2026610, 4225, 8, 0x2026b10, ...)
[26745] clmesg debug: libocl.c(582): clGetContextInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: clrpcd.c(569): retval 0
[26745] clmesg debug: clrpcd.c(569): 8:��
[26745] clmesg debug: clrpcd.c(415): _clrpc_clGetDeviceInfo_svrcb
[26745] clmesg debug: clrpcd.c(415): param_sz = 8
[26745] clmesg debug: clrpcd.c(415): calling 'clGetDeviceInfo' ( 0x20297f0, 4145, 8, 0x2028ca0, ...)
[26745] clmesg debug: oclcall.c(220): clGetDeviceInfo (loader) 0x7f47dcdf1320
[26745] clmesg debug: oclcall.c(221): 0x7f47dcdf1338
[26745] clmesg debug: clrpcd.c(415): retval 0
[26745] clmesg debug: clrpcd.c(415): 8:P�
[26745] clmesg debug: clrpcd.c(281): _clrpc_conn_close_cb
|


Reply to this email directly or view it on GitHub
#15 (comment).

David Richie, Ph.D.
Brown Deer Technology
1641 Denwright Court
Forest Hill, MD 21050
410-459-3848
[email protected]
www.browndeertechnology.com

@browndeer
Copy link
Owner

The specific cause of the seg fault has been fixed on stable-1.6 branch.

See commit 1cef371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants