Hi,
When I perform the scripts:
from FPSim2 import FPSim2CudaEngine
fp_filename = 'chembl_27.h5'
fpce = FPSim2CudaEngine(fp_filename)
query = 'CC(=O)Oc1ccccc1C(=O)O'
results = fpce.similarity(query, 0.7)
I get the error in the follow:
NVRTCError Traceback (most recent call last)
/home/anaconda3/lib/python3.7/site-packages/cupy/cuda/compiler.py in compile(self, options)
445 try:
--> 446 nvrtc.compileProgram(self.ptr, options)
447 return nvrtc.getPTX(self.ptr)
cupy/cuda/nvrtc.pyx in cupy.cuda.nvrtc.compileProgram()
cupy/cuda/nvrtc.pyx in cupy.cuda.nvrtc.compileProgram()
cupy/cuda/nvrtc.pyx in cupy.cuda.nvrtc.check_status()
NVRTCError: NVRTC_ERROR_COMPILATION (6)
During handling of the above exception, another exception occurred:
CompileException Traceback (most recent call last)
in
1 query = 'CC(=O)Oc1ccccc1C(=O)O'
----> 2 results = fpce.similarity(query, 0.7)
/home/anaconda3/lib/python3.7/site-packages/FPSim2/FPSim2Cuda.py in similarity(self, query_string, threshold)
226 """
227 if self.kernel == "raw":
--> 228 ids, sims = self._raw_kernel_search(query_string, threshold)
229 elif self.kernel == "element_wise":
230 ids, sims = self._element_wise_search(query_string, threshold)
/home/anaconda3/lib/python3.7/site-packages/FPSim2/FPSim2Cuda.py in _raw_kernel_search(self, query_string, threshold)
176
177 # copy query and threshold to GPU
--> 178 cuda_threshold = cp.asarray(threshold, dtype="f4")
179 query = cp.asarray(np_query[1:-1])
180 popcount = cp.asarray(np_query[-1])
/home/anaconda3/lib/python3.7/site-packages/cupy/creation/from_data.py in asarray(a, dtype, order)
66
67 """
---> 68 return core.array(a, dtype, False, order)
69
70
cupy/core/core.pyx in cupy.core.core.array()
cupy/core/core.pyx in cupy.core.core.array()
cupy/core/core.pyx in cupy.core.core._send_object_to_gpu()
cupy/core/core.pyx in cupy.core.core.ndarray.fill()
cupy/core/_kernel.pyx in cupy.core._kernel.ElementwiseKernel.call()
cupy/core/_kernel.pyx in cupy.core._kernel.ElementwiseKernel._get_elementwise_kernel()
cupy/core/_kernel.pyx in cupy.core._kernel._get_elementwise_kernel()
cupy/core/_kernel.pyx in cupy.core._kernel._get_simple_elementwise_kernel()
cupy/core/_kernel.pyx in cupy.core._kernel._get_simple_elementwise_kernel()
cupy/core/carray.pxi in cupy.core.core.compile_with_cache()
/home/anaconda3/lib/python3.7/site-packages/cupy/cuda/compiler.py in compile_with_cache(source, options, arch, cache_dir, extra_source, backend)
293 else:
294 return _compile_with_cache_cuda(source, options, arch, cache_dir,
--> 295 extra_source, backend)
296
297
/home/anaconda3/lib/python3.7/site-packages/cupy/cuda/compiler.py in _compile_with_cache_cuda(source, options, arch, cache_dir, extra_source, backend)
345
346 if backend == 'nvrtc':
--> 347 ptx = compile_using_nvrtc(source, options, arch, name + '.cu')
348 ls = function.LinkState()
349 ls.add_ptr_data(ptx, 'cupy.ptx')
/home/anaconda3/lib/python3.7/site-packages/cupy/cuda/compiler.py in compile_using_nvrtc(source, options, arch, filename)
153 prog = _NVRTCProgram(source, cu_path)
154 try:
--> 155 ptx = prog.compile(options)
156 except CompileException as e:
157 dump = _get_bool_env_variable(
/home/anaconda3/lib/python3.7/site-packages/cupy/cuda/compiler.py in compile(self, options)
448 except nvrtc.NVRTCError:
449 log = nvrtc.getProgramLog(self.ptr)
--> 450 raise CompileException(log, self.src, self.name, options, 'nvrtc')
451
452
CompileException: /usr/local/cuda-9.0/include/cuda_fp16.h(133): error: cannot overload functions distinguished by return type alone
/usr/local/cuda-9.0/include/cuda_fp16.hpp(648): error: cannot overload functions distinguished by return type alone
2 errors detected in the compilation of "/tmp/tmpy9zye_jr/41cdaa87a74069ee5ed1584c4bbf0719_2.cubin.cu".
I have installed the Cupy 7.7 and Cuda 9.0, and set the cuda environment as
export CUDA_PATH=/usr/local/cuda-9.0
export LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH
Would need your help to solve the error in the above, many thanks.
Best regards
Jiyuan