Error error: no matching function for call to 'read_imagef'
Hi Compilation under UBUNTU 16.04 went fine. Getting this when trying example !!!
racminer@mine:~/OpenCL-Level-Set-Segmentation$ ./levelSetSeg example_data/mr_brain.mhd result.mhd 100 100 100 10 2000 125 40 0.05 125 255 Using platform vendor: Mesa Using device: AMD Radeon (TM) RX 480 Graphics (POLARIS10 / DRM 3.23.0 / 4.15.0-36-generic, LLVM 6.0.0) Build log: input.cl:27:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:27:69: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:28:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:28:69: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:29:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:29:69: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:32:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:32:49: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:33:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:33:49: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:34:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:34:49: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:37:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:37:63: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:38:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:38:63: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:39:13: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:39:63: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:57:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:57:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:58:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:58:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:62:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:62:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:63:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:63:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:66:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:66:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:68:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:68:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:71:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:71:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:73:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:73:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:76:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:76:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:77:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:77:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:81:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:81:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:82:19: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:82:71: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:101:50: error: no matching function for call to 'read_imagef' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:118:34: error: no matching function for call to 'read_imagef' input.cl:7:70: note: expanded from macro 'WRITE_RESULT' /usr/include/clc/image/image.h:26:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument /usr/include/clc/image/image.h:28:1: note: candidate function not viable: no known conversion from '__read_only image3d_t' to '__read_only image2d_t' for 1st argument input.cl:130:18: error: passing '__write_only image3d_t' to parameter of incompatible type '__read_only image2d_t' input.cl:7:56: note: expanded from macro 'WRITE_RESULT' /usr/include/clc/image/image.h:19:24: note: passing argument to parameter 'image' here input.cl:132:1: warning: null character ignored
terminate called after throwing an instance of 'cl::Error' what(): clBuildProgram Abandon (core dumped)
It seems that the OpenCL implementation you are using only supports 2D images, not 3D images. This is strange as reading from 3D images is part of the core of OpenCL, but it looks like you are using the Mesa implementation which might not be conformant to the standard? I would suggest you switch to AMDs OpenCL implementation