DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.
http://dedalus-project.org/
GNU General Public License v3.0
513 stars 121 forks source link

Incompatibility with FFTW3 #231

Closed rosmirnov closed 1 year ago

rosmirnov commented 1 year ago

Dedalus3 master compilation with official standalone fftw3 vers. 3.3.4-3.3.10 gives error:

  building 'dedalus.libraries.fftw.fftw_wrappers' extension
  mpicc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Idedalus/libraries/fftw/ -I/tmp/pip-build-env-9_w_tfcu/overlay/lib/python3.9/site-packages/numpy/core/include -I/tmp/pip-build-env-9_w_tfcu/overlay/lib/python3.9/site-packages/mpi4py/include -I/usr/local/openmpi/include -I/usr/local/fftw3/include -I/usr/local/include/python3.9 -c dedalus/libraries/fftw/fftw_wrappers.c -o build/temp.linux-x86_64-cpython-39/dedalus/libraries/fftw/fftw_wrappers.o -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -Wno-unused-function
  dedalus/libraries/fftw/fftw_wrappers.c: In function ‘__pyx_pf_7dedalus_9libraries_4fftw_13fftw_wrappers_16R2RTransformBase___init__’:
  dedalus/libraries/fftw/fftw_wrappers.c:6707:163: warning: passing argument 7 of ‘fftw_plan_guru_r2r’ from incompatible pointer type
     __pyx_v_self->forward_plan = fftw_plan_guru_r2r(__pyx_v_trans_rank, __pyx_v_trans_struct, __pyx_v_vec_rank, __pyx_v_vec_struct_f, __pyx_v_gdata, __pyx_v_cdata, (&__pyx_v_self->kind_f), (__pyx_v_intflags | __pyx_e_7dedalus_9libraries_4fftw_10fftw_c_api_FFTW_DESTROY_INPUT));
                                                                                                                                                                     ^
  In file included from dedalus/libraries/fftw/fftw_wrappers.c:800:0:
  /usr/local/fftw3/include/fftw3.h:355:1: note: expected ‘const enum fftw_r2r_kind *’ but argument is of type ‘int *’
   FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
   ^
  dedalus/libraries/fftw/fftw_wrappers.c:6716:164: warning: passing argument 7 of ‘fftw_plan_guru_r2r’ from incompatible pointer type
     __pyx_v_self->backward_plan = fftw_plan_guru_r2r(__pyx_v_trans_rank, __pyx_v_trans_struct, __pyx_v_vec_rank, __pyx_v_vec_struct_b, __pyx_v_cdata, __pyx_v_gdata, (&__pyx_v_self->kind_b), (__pyx_v_intflags | __pyx_e_7dedalus_9libraries_4fftw_10fftw_c_api_FFTW_DESTROY_INPUT));
                                                                                                                                                                      ^
rosmirnov commented 1 year ago

Compilation works after installing pylib-fftw3 via pip3.