mpip / pfft

Parallel fast Fourier transforms
GNU General Public License v3.0
54 stars 23 forks source link

c2r new array gives wrong result. #4

Closed rainwoodman closed 10 years ago

rainwoodman commented 10 years ago

it is due to line 953 in api-basic.c

complex_conjugate(conj_in, conj_out, ths->rnk_n, ths->local_ni);

This line overwrites the input with the output. This wasn't caught by the test case due to pull request #3

rainwoodman commented 10 years ago

These are the broken tests; seems to be all r2c.

simple_check_ousam_r2c_4d.c
Error after one forward and backward trafo of size n=(13, 14, 15, 17):
maxerror = 1.25e+02;
simple_check_ousam_r2c_4d_newarray.c
Error after one forward and backward trafo of size n=(13, 14, 15, 17):
maxerror = 1.25e+02;
simple_check_ousam_r2c_4d_on_3d.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 9.90e+01;
simple_check_ousam_r2c_4d_on_3d_transposed.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 9.76e+01;
simple_check_ousam_r2c_4d_transposed.c
Error after one forward and backward trafo of size n=(13, 14, 15, 17):
maxerror = 1.25e+02;
simple_check_ousam_r2c_4d_transposed_newarray.c
Error after one forward and backward trafo of size n=(13, 14, 15, 17):
maxerror = 1.25e+02;
simple_check_ousam_r2c.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 2.45e+02;
simple_check_ousam_r2c_padded.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 2.76e+02;
simple_check_ousam_r2c_transposed.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 2.49e+02;
simple_check_r2c_3d_on_3d.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.46e+03;
simple_check_r2c_3d_on_3d_transposed.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.43e+03;
simple_check_r2c_4d.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 1.42e+03;
simple_check_r2c_4d_on_3d.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 1.42e+03;
simple_check_r2c_4d_on_3d_transposed.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 1.38e+03;
simple_check_r2c_4d_transposed.c
Error after one forward and backward trafo of size n=(13, 14, 19, 17):
maxerror = 1.39e+03;
simple_check_r2c.c
Error after one forward and backward trafo of size n=(29, 27, 32):
maxerror = 1.41e+03;
simple_check_r2c_newarray.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.45e+03;
simple_check_r2c_padded_newarray.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.50e+03;
simple_check_r2c_padded_transposed_newarray.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.48e+03;
simple_check_r2c_transposed.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.46e+03;
simple_check_r2c_transposed_newarray.c
Error after one forward and backward trafo of size n=(29, 27, 31):
maxerror = 1.46e+03;
rainwoodman commented 10 years ago

This is fixed in the latest commit on #3 .

mpip commented 10 years ago

Thanks a lot for the bugfix.