# test\_filter.py value mismatch error

**URL:** <https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 23, 2017, 5:22pm UTC](https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316 "2017-09-23T17:22:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 23, 2017, 5:22pm UTC](https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316/1 "2017-09-23T17:22:49Z")

</div>

Hello,

I installed MNE 0.15-dev from git with CUDA 8.0 and Anaconda 4.4 (Python  
3.6), following this manual:  
[http://martinos.org/mne/dev/advanced\_setup.html?highlight=dev%20install](http://martinos.org/mne/dev/advanced_setup.html?highlight=dev%20install)

When I run:  
mne.utils.set\_config('MNE\_USE\_CUDA', 'true'); mne.cuda.init\_cuda()  
I get the correct result:  
Enabling CUDA with 761.0 MB available memory

When I run test\_filter.py, I get the following error:

AssertionError:  
Not equal to tolerance rtol=0.001, atol=0.001

(mismatch 0.9333333333333371%)  
x: array([[ -2.558717e-16, -1.525432e-01, -2.835838e-01, ...,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.634404e-01, 2.543413e-01, -6.938894e-17],  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ -2.532696e-16, 1.745948e-01, 3.111300e-01, ...,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6.255135e-01, 3.478937e-01, -2.775558e-17]])  
y: array([[ 8.933826e-17, -1.527561e-01, -2.836241e-01, ...,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.634049e-01, 2.543312e-01, -2.428613e-16],  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 1.565588e-16, 1.746173e-01, 3.108850e-01, ...,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6.256731e-01, 3.481433e-01, -3.053113e-16]])

It was caused by line 332 of test\_filter.py:  
assert\_allclose(hp, bp, rtol=1e-3, atol=1e-3)

I tried increasing the tolerence to 1e-2, and now it throws another error  
caused by line 336 (FFT calculation):  
AssertionError:  
Not equal to tolerance rtol=1e-07, atol=0.02

(mismatch 100.0%)  
x: array(1.0259702184926076)  
y: array(1.0)

Seems like there's a serious numerical problem with the computation. What  
should I do in this case?  
Weird thing is, even if I set MNE\_USE\_CUDA to 'false', it still gives me  
exactly the same error, which might suggest it's independent of CUDA  
setting?

Best wishes,  
Kyuhwa  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170923/156f32d0/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170923/156f32d0/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 24, 2017, 11:38am UTC](https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316/2 "2017-09-24T11:38:15Z")

</div>

hi Kyuhwa,

can you tell me what this gives for you

import mne  
mne.sys\_info()

Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 27, 2017, 5:30pm UTC](https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316/3 "2017-09-27T17:30:19Z")

</div>

Hi Alex, here's the result:

Platform: Windows-10-10.0.15063-SP0  
Python: 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017,  
13:25:24) [MSC v.1900 64 bit (AMD64)]  
Executable: C:\Anaconda3\python.exe  
CPU: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel: 4 cores  
Memory: 7.9 GB

mne: 0.15.dev0  
numpy: 1.13.1 {blas=mkl\_core\_dll, lapack=mkl\_core\_dll}  
scipy: 0.19.1  
matplotlib: 2.0.2

sklearn: 0.19.0  
nibabel: Not found  
mayavi: Not found  
pycuda: 2017.1.1  
skcuda: 0.5.1  
pandas: 0.20.3

Best,  
Kyuhwa

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 28, 2017, 7:13pm UTC](https://mne.discourse.group/t/test-filter-py-value-mismatch-error/1316/4 "2017-09-28T19:13:04Z")

</div>

Dear Kyuhwa,

this is really strange. All continuous integration systems we use  
don't report this issue.

DId you try with latest master ?

Alex
