* using log directory ‘/Volumes/Builds/packages/big-sur-x86_64/results/4.3/BIDistances.Rcheck’ * using R version 4.3.0 (2023-04-21) * using platform: x86_64-apple-darwin20 (64-bit) * R was compiled by Apple clang version 14.0.3 (clang-1403.0.22.14.1) GNU Fortran (GCC) 12.2.0 * running under: macOS Ventura 13.3.1 * using session charset: UTF-8 * checking for file ‘BIDistances/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘BIDistances’ version ‘0.0.2’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BIDistances’ can be installed ... [2s/2s] OK See 'https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/BIDistances-00install.html' for details. * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s/0s] OK * checking whether the package can be loaded with stated dependencies ... [0s/0s] OK * checking whether the package can be unloaded cleanly ... [0s/0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK * checking whether the namespace can be unloaded cleanly ... [0s/0s] OK * checking loading without being on the library search path ... [0s/0s] OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [2s/2s] OK * checking Rd files ... [0s/0s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... [0s/0s] OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [1s/1s] ERROR Running examples in ‘BIDistances-Ex.R’ failed The error most likely occurred in: > ### Name: EuclideanDistances_GPU > ### Title: EuclideanDistances_GPU > ### Aliases: EuclideanDistances_GPU > ### Keywords: Distance Distancematrix Euclidean OpenCL GPU HPC > > ### ** Examples > > if(isTRUE(require("OpenCL"))){ + if(Sys.info()[1] == "Windows"){ + tryCatch({ + dyn.load("C:/Windows/System32/OpenCL.dll", FALSE, TRUE) + }, error = function(e) { + warning("EuclideanDistances_GPU: OpenCL.dll could not be loaded with error:") + warning(e) + }) + } + library(OpenCL) + AllDevices = unlist(lapply(unlist(OpenCL::oclPlatforms()), OpenCL::oclDevices)) + Device = AllDevices[length(AllDevices)][[1]] + ctx = OpenCL::oclContext(device = Device, precision = "double") + Data = as.matrix(iris[,1:4]) + Weights = rep(1, 4) + oclDM = EuclideanDistances_GPU(Data = Data, Weights = Weights, ctx = ctx) + } Loading required package: OpenCL Warning in OpenCL::oclContext(device = Device, precision = "double") : OpenCL implementation does not support out-of-order execution, disabling it :3:479: error: call to '__cl_sqrt' is ambiguous __kernel void weighted_euclidean( __global numeric* output, const unsigned int count, __global numeric* input, __global numeric* weights, const int N, const int DIM){ size_t i = get_global_id(0); size_t j = get_global_id(1); if(i < N && i == j){ output[i*N+i] = 0; } if(i < N && j < i){ double tmpRes = 0; for(int k = 0; k < DIM; ++k){ tmpRes = tmpRes + weights[k] * (input[i+k*N] - input[j+k*N]) * (input[i+k*N] - input[j+k*N]); } tmpRes = sqrt(tmpRes); output[j*N+i] = tmpRes; output[i*N+j] = tmpRes; }} ^~~~~~~~~~~~ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4788:23: note: expanded from macro 'sqrt' #define sqrt(__x) __cl_sqrt(__x) ^~~~~~~~~ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function __CLFN_FD_1FD(__cl_sqrt); ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:367:48: note: expanded from macro '__CLFN_FD_1FD' #define __CLFN_FD_1FD(name) float __OVERLOAD__ name(float x); \ ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:368:21: note: expanded from macro '__CLFN_FD_1FD' float2 __OVERLOAD__ name(float2 x); \ ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:369:21: note: expanded from macro '__CLFN_FD_1FD' float3 __OVERLOAD__ name(float3 x); \ ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:370:21: note: expanded from macro '__CLFN_FD_1FD' float4 __OVERLOAD__ name(float4 x); \ ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:371:21: note: expanded from macro '__CLFN_FD_1FD' float8 __OVERLOAD__ name(float8 x); \ ^ /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:4785:15: note: candidate function /System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/lib/clang/3.5/include/cl_kernel.h:372:22: note: expanded from macro '__CLFN_FD_1FD' float16 __OVERLOAD__ name(float16 x); ^ :3:244: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'const int' __kernel void weighted_euclidean( __global numeric* output, const unsigned int count, __global numeric* input, __global numeric* weights, const int N, const int DIM){ size_t i = get_global_id(0); size_t j = get_global_id(1); if(i < N && i == j){ output[i*N+i] = 0; } if(i < N && j < i){ double tmpRes = 0; for(int k = 0; k < DIM; ++k){ tmpRes = tmpRes + weights[k] * (input[i+k*N] - input[j+k*N]) * (input[i+k*N] - input[j+k*N]); } tmpRes = sqrt(tmpRes); output[j*N+i] = tmpRes; output[i*N+j] = tmpRes; }} ~ ^ ~ :3:293: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'const int' __kernel void weighted_euclidean( __global numeric* output, const unsigned int count, __global numeric* input, __global numeric* weights, const int N, const int DIM){ size_t i = get_global_id(0); size_t j = get_global_id(1); if(i < N && i == j){ output[i*N+i] = 0; } if(i < N && j < i){ double tmpRes = 0; for(int k = 0; k < DIM; ++k){ tmpRes = tmpRes + weights[k] * (input[i+k*N] - input[j+k*N]) * (input[i+k*N] - input[j+k*N]); } tmpRes = sqrt(tmpRes); output[j*N+i] = tmpRes; output[i*N+j] = tmpRes; }} ~ ^ ~ Error in OpenCL::oclSimpleKernel(ctx, "weighted_euclidean", code) : clBuildProgram failed (with -11) Calls: EuclideanDistances_GPU -> withCallingHandlers -> Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... [0s/0s] NONE ‘BIDistances.Rmd’ using ‘UTF-8’... [0s/0s] OK * checking re-building of vignette outputs ... [10s/14s] OK * checking PDF version of manual ... [6s/8s] OK * DONE Status: 1 ERROR * using check arguments '--no-clean-on-error ' * elapsed time (check, wall clock): 0:49