Hi,
I'm getting a similar error when installing to an anaconda environment using:
# Install Dedalus v2 from conda-forge to build stack
conda install -c conda-forge dedalus c-compiler "h5py=*=mpi*"
# Upgrade to Dedalus v3
conda uninstall --force dedalus
CC=mpicc pip3 install --no-cache http://github.com/dedalusproject/dedalus/zipball/master/
This has worked previously but now 'transposes.pyx' seems to be having some trouble importing modules in Cython. Maybe this is the same problem as you're having?
Matt
The error is:
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [269 lines of output]
Error compiling Cython file:
------------------------------------------------------------
...
from mpi4py.MPI cimport Comm as py_comm_t
from mpi4py.libmpi cimport MPI_Comm as mpi_comm_t
from libc.stddef cimport ptrdiff_t as p_t
from ..libraries.fftw import fftw_wrappers as fftw
from ..libraries.fftw cimport fftw_c_api as cfftw
^
------------------------------------------------------------
dedalus/core/transposes.pyx:17:0: 'dedalus/libraries/fftw.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cdef readonly int[::1] RL_reduced_shape
cdef readonly double[::1] CL_buffer
cdef readonly double[::1] RL_buffer
cdef readonly cnp.ndarray CL_view
cdef readonly cnp.ndarray RL_view
cdef cfftw.fftw_plan CL_to_RL_plan
^
------------------------------------------------------------
dedalus/core/transposes.pyx:57:9: 'cfftw' is not declared
Error compiling Cython file:
------------------------------------------------------------
...
cdef readonly double[::1] CL_buffer
cdef readonly double[::1] RL_buffer
cdef readonly cnp.ndarray CL_view
cdef readonly cnp.ndarray RL_view
cdef cfftw.fftw_plan CL_to_RL_plan
cdef cfftw.fftw_plan RL_to_CL_plan
^
------------------------------------------------------------
dedalus/core/transposes.pyx:58:9: 'cfftw' is not declared
Error compiling Cython file:
------------------------------------------------------------
...
for f in flags:
intflags = intflags | fftw.fftw_flags[f]
# Build buffers
cdef p_t alloc_doubles, local0, start0, local1, start1
alloc_doubles = cfftw.fftw_mpi_local_size_many_transposed(
^
------------------------------------------------------------
dedalus/core/transposes.pyx:150:24: undeclared name not builtin: cfftw
Error compiling Cython file:
------------------------------------------------------------
...
# Build buffers
cdef p_t alloc_doubles, local0, start0, local1, start1
alloc_doubles = cfftw.fftw_mpi_local_size_many_transposed(
2,
shape,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:152:16: Cannot convert 'ptrdiff_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
2,
shape,
howmany,
block0,
block1,
comm,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:156:16: Cannot convert 'MPI_Comm' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
shape,
howmany,
block0,
block1,
comm,
&local0,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:157:16: Cannot convert 'ptrdiff_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
howmany,
block0,
block1,
comm,
&local0,
&start0,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:158:16: Cannot convert 'ptrdiff_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
block0,
block1,
comm,
&local0,
&start0,
&local1,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:159:16: Cannot convert 'ptrdiff_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
block1,
comm,
&local0,
&start0,
&local1,
&start1)
^
------------------------------------------------------------
dedalus/core/transposes.pyx:160:16: Cannot convert 'ptrdiff_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
n1,
n0,
howmany,
block1,
block0,
&self.CL_buffer[0],
^
------------------------------------------------------------
dedalus/core/transposes.pyx:177:16: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
n0,
howmany,
block1,
block0,
&self.CL_buffer[0],
&self.RL_buffer[0],
^
------------------------------------------------------------
dedalus/core/transposes.pyx:178:16: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
howmany,
block1,
block0,
&self.CL_buffer[0],
&self.RL_buffer[0],
comm,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:179:16: Cannot convert 'MPI_Comm' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
n0,
n1,
howmany,
block0,
block1,
&self.RL_buffer[0],
^
------------------------------------------------------------
dedalus/core/transposes.pyx:187:16: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
n1,
howmany,
block0,
block1,
&self.RL_buffer[0],
&self.CL_buffer[0],
^
------------------------------------------------------------
dedalus/core/transposes.pyx:188:16: Cannot convert 'double *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
howmany,
block0,
block1,
&self.RL_buffer[0],
&self.CL_buffer[0],
comm,
^
------------------------------------------------------------
dedalus/core/transposes.pyx:189:16: Cannot convert 'MPI_Comm' to Python object
warning: dedalus/core/transposes.pyx:310:38: Index should be typed for more efficient access
Looking for mpi include path
Cannot find env var MPI_INCLUDE_PATH
Looking for mpi prefix
Found matching library in /local/mcrowe/Anaconda/envs/d3_Pytorch/lib
Looking for fftw include path
Cannot find env var FFTW_INCLUDE_PATH
Looking for fftw prefix
Found matching library in /local/mcrowe/Anaconda/envs/d3_Pytorch/lib
Looking for fftw library path
Cannot find env var FFTW_LIBRARY_PATH
Looking for fftw prefix
Found matching library in /local/mcrowe/Anaconda/envs/d3_Pytorch/lib
Looking for mpi library path
Cannot find env var MPI_LIBRARY_PATH
Looking for mpi prefix
Found matching library in /local/mcrowe/Anaconda/envs/d3_Pytorch/lib
Compiling dedalus/libraries/fftw/fftw_wrappers.pyx because it changed.
Compiling dedalus/core/transposes.pyx because it changed.
Compiling dedalus/libraries/spin_recombination.pyx because it changed.
[1/3] Cythonizing dedalus/core/transposes.pyx
Traceback (most recent call last):
File "/local/mcrowe/Anaconda/envs/d3_Pytorch/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/local/mcrowe/Anaconda/envs/d3_Pytorch/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/local/mcrowe/Anaconda/envs/d3_Pytorch/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 235, in <module>
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
cythonize_one(*args)
File "/tmp/pip-build-env-ot88z2um/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: dedalus/core/transposes.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.