Some tests failed

41 views
Skip to first unread message

Davide Proment

unread,
Jan 27, 2017, 4:20:56 PM1/27/17
to reikna
Hi all,

I have to say that I am new to pyopencl and reikna. My final goal will be to update my current scientific codes written long time ago in C to Python and run them on GPUs. Most of them require doing FFTs and simple reduce functions or similar. I have downloaded reikna and started discovering its potential - which I think be amazing. 

I have been stuck for a while on how to compute FFTs and after reading the "FFT Benchmarks" topic I have tried to run the script written by Ryan Abernathey to benchmarking my hardware and learn more about how to execute FFT transforms. Unfortunately I obtained many errors when running the script. I then tried to run the test provided in the reikna module as suggested by Bogdan, and got many failures. Briefly I got

======== 31 failed, 639 passed, 3 skipped, 1 xfailed in 566.06 seconds =========

(I am not copying all the test output because it is very long)

Is there an issue with my hardware? Or is it a problem of missing libraries/software? 

Many thanks!

Davide

Bogdan Opanchuk

unread,
Jan 29, 2017, 7:33:54 PM1/29/17
to reikna
Hi Davide,

Can you post the full test log somewhere (say, to gist.github.com)? Also, the script you run and its output? I doubt there is a problem with hardware, but the drivers might be at fault.

Davide Proment

unread,
Feb 6, 2017, 4:43:30 PM2/6/17
to reikna
Hi Bogdan,

apologies for replying so late but I have been on holidays. I have created a log file, here is the link

The script I run is
pi.test
so I guess it runs all test scripts in the test folder. Am I right?

Bogdan Opanchuk

unread,
Feb 6, 2017, 7:32:44 PM2/6/17
to reikna
Hi Davide,

There are three types of errors in the log:

1. "parse error". This is an Apple OpenCL implementation bug, where it basically refuses to compile a perfectly valid code. I've encountered a similar one before, filed it, and they claimed to have fixed it somewhere at the time of OSX 10.11. Which version of OSX are you using? I can only access 10.10 right now, so I can't verify it.

2. "no field of name f3". This is due to https://github.com/inducer/compyte/issues/26 . PyOpenCL converts the datatype of the array on .get() call, adding dummy fields in the structure type instead of offsets (which are supported by numpy), causing the tests to fail.

3. Differences between the numpy and reikna FFT results.

The first two errors will only affect you if you're using structure dtypes. The third one is not particularly dangerous; as you can see from the output, the values are almost withing the absolute/relative tolerance limits. Different GPU platforms have slightly different implementations of single precision arithmetic (even with fast math off), so, perhaps, I should relax the limits a little.

You also mentioned some script that was giving you errors. Could you post it too?


Davide Proment

unread,
Feb 9, 2017, 4:54:00 PM2/9/17
to reikna
Dear Bogdan,

thanks for your prompt and exhaustive response. Here the answers to your questions:

1) Which version of OSX are you using? 
10.12.2 macOS Sierra

2) You also mentioned some script that was giving you errors. Could you post it too?
I was trying the "test_reikna_fft.py" that is posted in the "FFT Benchmark" discussion opened by Ryan Abernathey on 20/08/2014 on this group. Here
you can find the log errors.

Regarding your comments on the data types. I would like to compute double precision FFTs in my codes. Can I set this on my hardware?

Many thanks!

Bogdan Opanchuk

unread,
Feb 9, 2017, 9:11:42 PM2/9/17
to reikna
> 10.12.2 macOS Sierra

Well, there's a possibility that there's a bug in the driver. I created this gist with the pure OpenCL program test.c and test.cl based on the first error from the log. Could you try compiling and running it with "gcc -framework OpenCL test.c"? If the bug persists, an issue can be filed at http://bugreport.apple.com/ (you can do that yourself, or I can do that for you). The process probably won't be very fast, but they'll fix it eventually.

From the FFT script log it seems that the problem is indeed the double precision, which is not supported on HD4000.

Davide Proment

unread,
Feb 12, 2017, 4:38:25 PM2/12/17
to reikna
Dear Bogdan,

I have tried to compile your test.c file and failed the compilation with gcc getting the following message:

 #include <OpenCL/opencl.h>
                           ^
compilation terminated.
 
I then tried to compile with clang and the compilation was successful. However when executing a.out I got the error message you expected:

Found 1 platforms
Platform: Apple
Found 2 devices
Device: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Build succeeded
Device: HD Graphics 4000
Build log:
Error: parse error.
Failed to build the program: CL_BUILD_PROGRAM_FAILURE


Can you please report the bug to apple please? I am not really familiar with this...


Regarding the error in compilation with gcc, any idea why this is happening?

 

Bogdan Opanchuk

unread,
Feb 12, 2017, 11:53:52 PM2/12/17
to reikna
Ok, I submitted the bug, but it may be a while until there's any response.

As for the compilation error, I am not sure I understand it fully myself, but it seems that the headers in the OpenCL framework use the block extension syntax (e.g. "typedef void (^dispatch_block_t)(void)", where the "^" denotes a closure type), and clang supports that while gcc does not. On my system `gcc` is mapped to `clang`, so I did not notice it.
Reply all
Reply to author
Forward
0 new messages