Comments (7)
I tried the same script on a different device. It works intermittently. Sometimes it works, sometimes I get this in stdout/err:
OPENCL_V< CLFFT_INVALID_PLAN > (3083): fftRepo.getPlan failed
and sometimes I get the following exception:
Exception gpyfft.gpyfftlib.GpyFFT_Error: GpyFFT_Error() in 'gpyfft.gpyfftlib.Plan.get_dim' ignored
---------------------------------------------------------------------------
GpyFFT_Error Traceback (most recent call last)
<ipython-input-2-38dd57c8a3ed> in <module>()
30
31
---> 32 print 'plan.strides_in', plan.strides_in
33 print 'plan.strides_out', plan.strides_out
34 print 'plan.distances', plan.distances
/Users/alex/.python-eggs/Gpyfft-0.2-py2.7-macosx-10.9-x86_64.egg-tmp/gpyfft/gpyfftlib.so in gpyfft.gpyfftlib.Plan.strides_in.__get__ (gpyfft/gpyfftlib.c:3447)()
/Users/alex/.python-eggs/Gpyfft-0.2-py2.7-macosx-10.9-x86_64.egg-tmp/gpyfft/gpyfftlib.so in gpyfft.gpyfftlib.errcheck (gpyfft/gpyfftlib.c:1534)()
GpyFFT_Error: 'Functionality is not implemented yet.'
and sometimes in stderr/out:
Python(26389,0x7fff766b7310) malloc: *** error for object 0x7fd95157fa48: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
In some of these cases python dies (I assume segfault).
from gpyfft.
It appears that running these line repeatedly causes Python to crash:
G = gpyfft.GpyFFT(debug=False)
plan = G.create_plan(context, cl_data.shape)
from gpyfft.
cannot reproduce this on OS X 10.9.3, Python 2.7.6, python 0.21dev, on Nvidia GT 330M.
from gpyfft.
Python does not die even running the two lines repeatedly together?
I noticed that the end of the script explicitly calls del on G and plan. Why is that?
from gpyfft.
Could once reproduce a segfault on OS X, happens in FFTPlan::ReleaseBuffers(), when plan is released.
Perhaps during garbage collection DestroyPlan is called after Teardown. This should not happen, each Plan keeps a reference to the GpyFFT object, to keep it alive. Quick testing indicates this is not the case. Repeatedly calling only plan = G.create_plan(context, cl_data.shape)
seems to be ok.
Perhaps clFFT does not like to be initialized and deallocated repeatedly. There must have been a good reason why I added the comment #TODO: need to initialize (and destroy) at module level
to GpyFFT.
So for the moment, create a GpyFFT instance only once.
The explicit del for plan and G is to trigger deallocation (clfftDestroyPlan(), clfftTeardown() ) for testing, not necessary.
from gpyfft.
I will change how the library get initialized, needs some work. Anyhow, please use the high level interface as defined in fft.py, the lower level interface as tested in test_simple.py is likely to change.
from gpyfft.
Reworked resource deallocation, so time to close this issue...
from gpyfft.
Related Issues (20)
- No examples in documentation HOT 9
- Windows 10 - errors in test_simple.py HOT 7
- gpyfft working on macOS 10.11.6, but not for CPU HOT 3
- simple_example.py broken HOT 16
- Cython errors in setup.py on Ubuntu HOT 7
- License file HOT 2
- [debian] test error during the build process HOT 7
- [doc] errors during the sphinx doc generation HOT 2
- could you integrate the benchmark in the gpyfft module HOT 1
- Installation when clFFT has been installed using conda ? HOT 14
- Batched FFT buggy
- Real->complex and complex->real HOT 3
- PyPI HOT 2
- Benchmark fails to run on ARM Mali platform HOT 1
- ImportError: DLL load failed HOT 15
- When rinning simple_example.py - OverflowError: can't convert negative value to size_t HOT 3
- Cannot open include file: 'clFFT.h' HOT 1
- How to install this package on Windows? HOT 1
- callback argument for the FFT class HOT 5
- Complains about _clfftBakePlan not found when importing HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpyfft.