Begin forwarded message:
> 
> From: LongGang <[email protected]>
> Subject: Re: PyOpenCL error in python2.7*
> Date: October 13, 2015 at 10:45:33 AM GMT+2
> To: Andreas Kloeckner <[email protected]>
> 
> Dear Andreas,
> 
> Should I send you the kernel code or the host side code? I guess the error 
> happens on the host side because 
> the program work with python3.3.6.
> 
> The whole code is long and has many dependent files, I believe the error 
> happens when it try to compile
> the kernel program with compile options, it fails under python 2.7.6/8 but 
> works with python 2.7.10. There must
be some difference between these different versions of python.
> 
> Best regards,
> LongGang
> 
> 104     def __loadAndBuildCLPrg(self):
> 105         print(self.gpu_defines)
> 106         #load and build *.cl programs with compile self.gpu_defines
> 107         with open(os.path.join(self.cwd, 'kernel', 'kernel_ideal.cl'), 
> 'r') as f:
> 108             prg_src = f.read()
> 109             self.kernel_ideal = cl.Program(self.ctx, prg_src).build(
> 110                                              options=self.gpu_defines)
> 111 
> 112         with open(os.path.join(self.cwd, 'kernel', 
> 'kernel_reduction.cl'), 'r') as f:
> 113             src_maxEd = f.read()
> 114             self.kernel_reduction = cl.Program(self.ctx, src_maxEd).build(
> 115                                                  options=self.gpu_defines)
> 116 
> 117         hypersf_defines = list(self.gpu_defines)
> 118         hypersf_defines.append('-D {key}={value}'.format(key='nxskip', 
> value=self.cfg.nxskip))
> 119         hypersf_defines.append('-D {key}={value}'.format(key='nyskip', 
> value=self.cfg.nyskip))
> 120         hypersf_defines.append('-D {key}={value}'.format(key='nzskip', 
> value=self.cfg.nzskip))
> 121         hypersf_defines.append('-D {key}={value}f'.format(key='EFRZ', 
> value=self.efrz))
> 122         print(hypersf_defines)
> 123         with open(os.path.join(self.cwd, 'kernel', 'kernel_hypersf.cl'), 
> 'r') as f:
> 124             src_hypersf = f.read()
> 125             self.kernel_hypersf = cl.Program(self.ctx, src_hypersf).build(
> 126                                                  options=hypersf_defines)
> 127 
> 
>> On Oct 12, 2015, at 7:23 PM, Andreas Kloeckner <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Longgang Pang <[email protected] 
>> <mailto:[email protected]>> writes:
>>> I have problem when run the most recent PyOpenCL2015 with python2.7.6
>>> and 2.7.8
>>> The full output is as following, looks like 'ArgumentError' has no
>>> attribute 'what' for python version 2.7.6 and 2.7.8?
>>> There is no problem when I run pyopencl with python/3.3.6 or python/2.7.10.
>>> 
>>> Do you know how to fix it in the code without modifying pyopencl?
>> 
>> Can you submit some code that reproduces this? ArgumentError should not
>> be caught by this handler.
>> 
>> Andreas
> 

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to