Installation issue

270 views
Skip to first unread message

C Wareing

unread,
Sep 25, 2024, 12:20:44 PM9/25/24
to Dedalus Users
Hi,

Script that was working fine up until recently now fails with pip install errors such as...

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dedalus

Failed to build dedalus
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dedalus)

Is something up with the master package?

Thanks,
Chris

C Wareing

unread,
Sep 26, 2024, 4:22:44 AM9/26/24
to Dedalus Users
Hello all,

If more detail is required, the output from the fairly standard conda installation script taken from the Dedalus pages is appended below. Everything except Dedalus installation in this environment seems to be fine. It clearly pulls the Dedalus package, then fails in the pyproject.toml script at an MPI_Session command in transposes.c. Possibly a IntelMPI/Cython/Python version mismatch, but I'm controlling versions of IntelMPI and Python to match previous installation.

Calum Skene and I developed this process for the HPC resources at Leeds in the last year or so and it has been working fine, although I haven't had need to use it for ~6 months.

It's failing at Leeds using not only this conda script, but also Calum's instructions - and on the freshly downloaded standard installation scripts on HPC at Exeter.

Any help appreciated. I will try rolling back to python 3.10

Thanks,
Chris Wareing
--------
Installing dedalus with pip
Collecting http://github.com/dedalusproject/dedalus/zipball/master/
  Downloading http://github.com/dedalusproject/dedalus/zipball/master/
     | 24.5 MB 26.5 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting docopt (from dedalus==3.0.3)
  Downloading docopt-0.6.2.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: h5py>=3.0.0 in /home/home01/matcjw/.conda/envs/dedalus3-202409/lib/python3.11/site-packages (from dedalus==3.0.3) (3.11.0)
Collecting matplotlib (from dedalus==3.0.3)
  Downloading matplotlib-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Requirement already satisfied: mpi4py>=2.0.0 in /home/home01/matcjw/.conda/envs/dedalus3-202409/lib/python3.11/site-packages (from dedalus==3.0.3) (4.0.0)
Collecting numexpr (from dedalus==3.0.3)
  Downloading numexpr-2.10.1.tar.gz (101 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.20.0 in /home/home01/matcjw/.conda/envs/dedalus3-202409/lib/python3.11/site-packages (from dedalus==3.0.3) (2.0.0)
Collecting py (from dedalus==3.0.3)
  Downloading py-1.11.0-py2.py3-none-any.whl.metadata (2.8 kB)
Collecting pytest (from dedalus==3.0.3)
  Downloading pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB)
Collecting pytest-benchmark (from dedalus==3.0.3)
  Downloading pytest_benchmark-4.0.0-py3-none-any.whl.metadata (23 kB)
Collecting pytest-cov (from dedalus==3.0.3)
  Downloading pytest_cov-5.0.0-py3-none-any.whl.metadata (27 kB)
Collecting pytest-parallel (from dedalus==3.0.3)
  Downloading pytest_parallel-0.1.1-py3-none-any.whl.metadata (3.0 kB)
Requirement already satisfied: scipy>=1.4.0 in /home/home01/matcjw/.conda/envs/dedalus3-202409/lib/python3.11/site-packages (from dedalus==3.0.3) (1.14.0)
Collecting xarray (from dedalus==3.0.3)
  Downloading xarray-2024.9.0-py3-none-any.whl.metadata (11 kB)
Collecting contourpy>=1.0.1 (from matplotlib->dedalus==3.0.3)
  Downloading contourpy-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.4 kB)
Collecting cycler>=0.10 (from matplotlib->dedalus==3.0.3)
  Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->dedalus==3.0.3)
  Downloading fonttools-4.54.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (163 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib->dedalus==3.0.3)
  Downloading kiwisolver-1.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.3 kB)
Collecting packaging>=20.0 (from matplotlib->dedalus==3.0.3)
  Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting pillow>=8 (from matplotlib->dedalus==3.0.3)
  Downloading pillow-10.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.2 kB)
Collecting pyparsing>=2.3.1 (from matplotlib->dedalus==3.0.3)
  Downloading pyparsing-3.1.4-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib->dedalus==3.0.3)
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting iniconfig (from pytest->dedalus==3.0.3)
  Downloading iniconfig-2.0.0-py3-none-any.whl.metadata (2.6 kB)
Collecting pluggy<2,>=1.5 (from pytest->dedalus==3.0.3)
  Downloading pluggy-1.5.0-py3-none-any.whl.metadata (4.8 kB)
Collecting py-cpuinfo (from pytest-benchmark->dedalus==3.0.3)
  Downloading py_cpuinfo-9.0.0-py3-none-any.whl.metadata (794 bytes)
Collecting coverage>=5.2.1 (from coverage[toml]>=5.2.1->pytest-cov->dedalus==3.0.3)
  Downloading coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.3 kB)
Collecting tblib (from pytest-parallel->dedalus==3.0.3)
  Downloading tblib-3.0.0-py3-none-any.whl.metadata (25 kB)
Collecting pandas>=2.1 (from xarray->dedalus==3.0.3)
  Downloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
Collecting pytz>=2020.1 (from pandas>=2.1->xarray->dedalus==3.0.3)
  Downloading pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas>=2.1->xarray->dedalus==3.0.3)
  Downloading tzdata-2024.2-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib->dedalus==3.0.3)
  Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Downloading matplotlib-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB)
   ???????????????????????????????????????? 8.3/8.3 MB 150.9 MB/s eta 0:00:00
Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
Downloading pytest-8.3.3-py3-none-any.whl (342 kB)
Downloading pytest_benchmark-4.0.0-py3-none-any.whl (43 kB)
Downloading pytest_cov-5.0.0-py3-none-any.whl (21 kB)
Downloading pytest_parallel-0.1.1-py3-none-any.whl (7.0 kB)
Downloading xarray-2024.9.0-py3-none-any.whl (1.2 MB)
   ???????????????????????????????????????? 1.2/1.2 MB 89.6 MB/s eta 0:00:00
Downloading contourpy-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (323 kB)
Downloading coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238 kB)
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.54.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB)
   ???????????????????????????????????????? 4.9/4.9 MB 134.6 MB/s eta 0:00:00
Downloading kiwisolver-1.4.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB)
   ???????????????????????????????????????? 1.4/1.4 MB 353.4 MB/s eta 0:00:00
Downloading packaging-24.1-py3-none-any.whl (53 kB)
Downloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB)
   ???????????????????????????????????????? 13.1/13.1 MB 258.3 MB/s eta 0:00:00
Downloading pillow-10.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB)
   ???????????????????????????????????????? 4.5/4.5 MB 219.5 MB/s eta 0:00:00
Downloading pluggy-1.5.0-py3-none-any.whl (20 kB)
Downloading pyparsing-3.1.4-py3-none-any.whl (104 kB)
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Downloading py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Downloading tblib-3.0.0-py3-none-any.whl (12 kB)
Downloading pytz-2024.2-py2.py3-none-any.whl (508 kB)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading tzdata-2024.2-py2.py3-none-any.whl (346 kB)
Building wheels for collected packages: dedalus, docopt, numexpr
  Building wheel for dedalus (pyproject.toml) ... error
  error: subprocess-exited-with-error
 
  × Building wheel for dedalus (pyproject.toml) did not run successfully.
  ? exit code: 1
  ??> [123 lines of output]
      
      Configuration:
        INCLUDE_MPI = True
        INCLUDE_FFTW = True
        FFTW_STATIC = True
        CYTHON_PROFILE = False
     
      Looking for mpi include path:
        Found env var MPI_PATH = /apps/developers/libraries/intelmpi/2019.4.243/1/intel-19.0.4
      Looking for mpi library path:
        Found env var MPI_PATH = /apps/developers/libraries/intelmpi/2019.4.243/1/intel-19.0.4
      Looking for fftw include path:
        Found env var FFTW_PATH = /apps/developers/libraries/fftw/3.3.8/2/intel-19.0.4-intelmpi-2019.4.243
      Looking for fftw library path:
        Found env var FFTW_PATH = /apps/developers/libraries/fftw/3.3.8/2/intel-19.0.4-intelmpi-2019.4.243
      Statically linking FFTW
      CC set to mpicc; using gcc linker flags
     
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-311/dedalus
      copying dedalus/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus
      copying dedalus/__main__.py -> build/lib.linux-x86_64-cpython-311/dedalus
      copying dedalus/public.py -> build/lib.linux-x86_64-cpython-311/dedalus
      creating build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/arithmetic.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/basis.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/coords.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/distributor.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/domain.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/evaluator.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/field.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/future.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/problems.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/solvers.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/subsystems.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/system.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/timesteppers.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      copying dedalus/core/transforms.py -> build/lib.linux-x86_64-cpython-311/dedalus/core
      creating build/lib.linux-x86_64-cpython-311/dedalus/extras
      copying dedalus/extras/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/extras
      copying dedalus/extras/flow_tools.py -> build/lib.linux-x86_64-cpython-311/dedalus/extras
      copying dedalus/extras/plot_tools.py -> build/lib.linux-x86_64-cpython-311/dedalus/extras
      creating build/lib.linux-x86_64-cpython-311/dedalus/libraries
      copying dedalus/libraries/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries
      copying dedalus/libraries/matsolvers.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries
      creating build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/ball_diffusion_analytical_eigenvalues.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cartesian_ncc.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cartesian_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cfl.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
     copying dedalus/tests/test_clenshaw.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cylinder_calculus.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cylinder_ncc.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_cylinder_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_evp.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_fourier_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_grid_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_ivp.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_jacobi_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_lbvp.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_nlbvp.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_output.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_polar_calculus.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_polar_ncc.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_polar_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_sphere_calculus.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_sphere_ncc.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_spherical_arithmetic.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_spherical_calculus.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_spherical_ncc.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_spherical_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      copying dedalus/tests/test_transforms.py -> build/lib.linux-x86_64-cpython-311/dedalus/tests
      creating build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/array.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/cache.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/clenshaw.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/config.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/dispatch.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/exceptions.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/general.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/jacobi.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/logging.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/parallel.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/parsing.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/plot_op.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/post.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/progress.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      copying dedalus/tools/random_arrays.py -> build/lib.linux-x86_64-cpython-311/dedalus/tools
      creating build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/annulus.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/ball_wrapper.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/clenshaw.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/jacobi.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/old_intertwiner.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/shell.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/sphere.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/sphere_wrapper.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/spin_operators.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/timesteppers.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/tuple_tools.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      copying dedalus/libraries/dedalus_sphere/zernike.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/dedalus_sphere
      creating build/lib.linux-x86_64-cpython-311/dedalus/libraries/fftw
      copying dedalus/libraries/fftw/__init__.py -> build/lib.linux-x86_64-cpython-311/dedalus/libraries/fftw
      copying dedalus/dedalus.cfg -> build/lib.linux-x86_64-cpython-311/dedalus
      copying dedalus/examples.tar.gz -> build/lib.linux-x86_64-cpython-311/dedalus
      running build_ext
      building 'dedalus.core.transposes' extension
      creating build/temp.linux-x86_64-cpython-311/dedalus/core
      mpicc -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/home01/matcjw/.conda/envs/dedalus3-202409/include -fPIC -O2 -isystem /home/home01/matcjw/.conda/envs/dedalus3-202409/include -fPIC -I/local/6942127.1.langfeld.q/pip-build-env-f0un7h3a/overlay/lib/python3.11/site-packages/numpy/_core/include -I/local/6942127.1.langfeld.q/pip-build-env-f0un7h3a/overlay/lib/python3.11/site-packages/mpi4py/include -I/apps/developers/libraries/intelmpi/2019.4.243/1/intel-19.0.4/include -Idedalus/libraries/fftw/ -I/apps/developers/libraries/fftw/3.3.8/2/intel-19.0.4-intelmpi-2019.4.243/include -I/home/home01/matcjw/.conda/envs/dedalus3-202409/include/python3.11 -c dedalus/core/transposes.c -o build/temp.linux-x86_64-cpython-311/dedalus/core/transposes.o -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -Wno-unused-function -fopenmp
      dedalus/core/transposes.c(2155): error: identifier "MPI_Session" is undefined
          MPI_Session ob_mpi;
          ^
     
      compilation aborted for dedalus/core/transposes.c (code 2)
      error: command '/apps/developers/libraries/intelmpi/2019.4.243/1/intel-19.0.4/bin/mpicc' failed with exit code 2
      [end of output]

 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dedalus
  Building wheel for docopt (setup.py) ... done
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=54b0c9c84d02dc7fd1a4c3919b3f3885d095eb940fa787eacbe79562473fed3d
  Stored in directory: /local/6942127.1.langfeld.q/pip-ephem-wheel-cache-qhwdmb9a/wheels/1a/b0/8c/4b75c4116c31f83c8f9f047231251e13cc74481cca4a78a9ce
  Building wheel for numexpr (pyproject.toml) ... done
  Created wheel for numexpr: filename=numexpr-2.10.1-cp311-cp311-linux_x86_64.whl size=183061 sha256=d3812ada8e055b39a78f6b19e2dadc0eea2572fcdbdbd7da9edfcd2246492619
  Stored in directory: /local/6942127.1.langfeld.q/pip-ephem-wheel-cache-qhwdmb9a/wheels/95/8f/06/86d86d1afaa270e49bedb56c85c6ffd48d8eccdb9f678e55e4
Successfully built docopt numexpr

Failed to build dedalus
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dedalus)
Disabled threading by default in the environment
usage: conda-env [-h] {create,export,list,remove,update} ...
conda-env: error: invalid choice: 'config' (choose from 'create', 'export', 'list', 'remove', 'update')
usage: conda-env [-h] {create,export,list,remove,update} ...
conda-env: error: invalid choice: 'config' (choose from 'create', 'export', 'list', 'remove', 'update')

Installation complete in conda environment 'dedalus3-202409'

(base)... ...$ 

C Wareing

unread,
Sep 26, 2024, 4:33:28 AM9/26/24
to Dedalus Users
A little more googling and I find MPI_Session is in the MPI 4.0 standard from 2022 (no wonder I didn't recognize it).
This probably isn't compatible with the ARC 2019 IntelMPI installation, which is the latest infiniband performance MPI on the (old!) hardware.
I could install OpenMPI 5.x to pick up MPI_Session, as the latest system is 4.x, but this might be tricky to system optimise.
There's probably a work around this somewhere... it's concerning that letting Dedalus install it's own MPI is hitting the same problem at Exeter though.
Thanks
Chris

Rose Hinz

unread,
Sep 27, 2024, 8:48:33 AM9/27/24
to Dedalus Users
Hi Chris,

I ran into similar problems when installed Dedalus on HPCs, with the same sort of errors. Are you using the build script to download Dedalus? If so, can you send it along and I'll see if I can see the issue.

Rose Hinz

C Wareing

unread,
Sep 27, 2024, 9:10:04 AM9/27/24
to Dedalus Users
Thanks Rose.
The script is appended below, included my commented notes on running the script. Most of it was identical to the standard script.
We've come to suspect the problem is with mpi4py 4.0. I've tried downgrading back to 3.1.6 & 3.1.5 and also downgrading some of the other dependencies, back to match what previously worked, but with no luck yet. There are similar comments, albeit buried well, in this group.
Appended below is the script that produced a working version of Dedalus 3.0.2 based on our local Intel compilers and MPI back in the Spring.
Appended below that is the package version listing in that working conda environment (I'm trying to create a new one to assist someone else).
Chris
----------------------
#!/usr/bin/env bash

# Dedalus stack builder using conda, with options for custom MPI/FFTW/HDF5.
# Run this file after installing conda and activating the base environment.

#############
## Options ##
#############

# NOTES - CJW, 29/02/2023
# Following:-
# https://dedalus-project.readthedocs.io/en/latest/pages/installation.html#custom-conda-installation
#
# 1. Working environment for system installs:-
#(dedalus3-202402) [XXX...@d9s2b1.arc4 dedalus]$ module list
#Currently Loaded Modulefiles:
#  1) licenses              5) user                  9) visit/2.13.0         13) anaconda/2019.10
#  2) sge                   6) hdf5/1.8.21          10) idl/8.4
#  3) intel/19.0.4          7) silo/4.10.2          11) python/3.7.4
#  4) intelmpi/2019.4.243   8) fftw/3.3.8           12) mkl/2019.0
#(dedalus3-202402) [XXX...@d9s2b1.arc4 dedalus]$# Currently Loaded Modulefiles:
#
# NOTE: script uses system MPI and FFTW, not system HDF5 - clash between pyh5 and hdf5/1.8.21
#
#> source activate base
#(base)> bash conda_install_dedalus3_CJW-29-02-2024.sh
#(base)> source activate dedalus3-202402
#(dedalus3-202402)> pip3 install --upgrade cython numpy setuptools wheel # ALL UP TO DATE
#(dedalus3-202402)> echo $MPI_PATH
#(dedalus3-202402)> echo $FFTW_PATH
#(dedalus3-202402)> echo $MKL_NUM_THREADS
#(dedalus3-202402)> echo $NUM_EXPR_THREADS
#(dedalus3-202402)> echo $OMP_NUM_THREADS
#(dedalus3-202402)> python3 -m dedalus test
#(dedalus3-202402)> ================== 6532 passed, 16 skipped, 173 xfailed,
#                   12 xpassed in 93.51s (0:01:33) ===================#>...

# Conda environment name
CONDA_ENV="dedalus3-202402"

# Skip conda prompts
CONDA_YES=1

# Quiet conda output
CONDA_QUIET=1

# Install OpenMPI from conda, otherwise MPI_PATH must be set to your custom MPI prefix
#INSTALL_MPI=1
export MPI_PATH=$MPI_HOME

# Install FFTW from conda, otherwise FFTW_PATH must be set to your custom FFTW prefix
# Note: FFTW from conda will likely only work with custom MPIs that are OpenMPI
#INSTALL_FFTW=1
export FFTW_PATH=$FFTW_HOME

# Install HDF5 from conda, otherwise HDF5_DIR must be set to your custom HDF5 prefix
# Note: HDF5 from conda will only be built with parallel support if MPI is installed from conda
# Note: If your custom HDF5 is built with parallel support, HDF5_MPI must be set to "ON"
INSTALL_HDF5=1
#export HDF5_DIR=$HDF5_HOME
#export HDF5_MPI="ON"

# BLAS options for numpy/scipy: "openblas" or "mkl"
#BLAS="openblas"
BLAS="mkl"

# Python version
PYTHON_VERSION="3.11.3"

# Install native arm64 build on Apple Silicon
# Note: Only relevent on Apple Silicon machines, where native arm64 builds may exhibit errors
APPLE_SILICON_BUILD_ARM=0

export MKL_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export OMP_NUM_THREADS=1

############
## Script ##
############

prompt_to_proceed () {
    while true; do
        read -p "Proceed ([y]/n)? " proceed
        case "${proceed}" in
            "y" | "") break ;;
            "n") exit 1 ;;
            *) ;;
        esac
    done
}

# Check requirements
if [ "${CONDA_DEFAULT_ENV}" != "base" ]
then
    >&2 echo "ERROR: Conda base environment must be activated"
    exit 1
fi

if [ ${INSTALL_MPI} -ne 1 ]
then
    if [ -z ${MPI_PATH} ]
    then
        >&2 echo "ERROR: MPI_PATH must be set"
        exit 1
    else
        echo "MPI_PATH set to '${MPI_PATH}'"
    fi
fi

if [ ${INSTALL_FFTW} -ne 1 ]
then
    if [ -z ${FFTW_PATH} ]
    then
        >&2 echo "ERROR: FFTW_PATH must be set"
        exit 1
    else
        echo "FFTW_PATH set to '${FFTW_PATH}'"
    fi
fi

if [ ${INSTALL_HDF5} -ne 1 ]
then
    if [ -z ${HDF5_DIR} ]
    then
        >&2 echo "ERROR: HDF5_DIR must be set"
        exit 1
    else
        echo "HDF5_DIR set to '${HDF5_DIR}'"
        echo "HDF5_MPI set to '${HDF5_MPI}'"
    fi
fi

# Unset arm build flag unless on Apple Silicon
if [ $(uname -s) == "Darwin" ] && [ $(uname -m) == "arm64" ]
then
    ON_APPLE_SILICON=1
else
    ON_APPLE_SILICON=0
    APPLE_SILICON_BUILD_ARM=0
fi

# Set conda flags
CARGS=(-n ${CONDA_ENV})
if [ ${CONDA_YES} -eq 1 ]
then
    CARGS+=(-y)
fi
if [ ${CONDA_QUIET} -eq 1 ]
then
    CARGS+=(-q)
fi

echo "Setting up conda with 'source ${CONDA_PREFIX}/etc/profile.d/conda.sh'"
source ${CONDA_PREFIX}/etc/profile.d/conda.sh

echo "Preventing conda from looking in ~/.local with 'export PYTHONNOUSERSITE=1'"
export PYTHONNOUSERSITE=1

echo "Preventing conda from looking in PYTHONPATH with 'unset PYTHONPATH'"
unset PYTHONPATH

# Check if conda environment exists
conda activate ${CONDA_ENV} >&/dev/null
if [ $? -eq 0 ]
then
    echo "WARNING: Conda environment '${CONDA_ENV}' already exists"
    prompt_to_proceed
else
    echo "Building new conda environment '${CONDA_ENV}'"
    if [ ${ON_APPLE_SILICON} -eq 1 ] && [ ${APPLE_SILICON_BUILD_ARM} -eq 0 ]
    then
        CONDA_SUBDIR=osx-64 conda create "${CARGS[@]}"
        conda activate ${CONDA_ENV}
        conda config --env --set subdir osx-64
    else
        conda create "${CARGS[@]}"
        conda activate ${CONDA_ENV}
    fi
fi

echo "Setting conda-forge as strict priority channel"
conda config --add channels conda-forge
conda config --set channel_priority strict

echo "Installing conda-forge python, pip, wheel, setuptools, cython"
conda install "${CARGS[@]}" "python=${PYTHON_VERSION}" pip wheel setuptools cython

case "${BLAS}" in
"openblas")
    echo "Installing conda-forge openblas, numpy, scipy"
    # Pin openblas on apple silicon since 0.3.20 causes ggev errors
    if [ ${APPLE_SILICON_BUILD_ARM} -eq 1 ]
    then
        conda install "${CARGS[@]}" "libopenblas<0.3.20"
    fi
    conda install "${CARGS[@]}" "libblas=*=*openblas" numpy scipy
    # Dynamically link FFTW
    export FFTW_STATIC=0
    ;;
"mkl")
    echo "Installing conda-forge mkl, numpy, scipy"
    conda install "${CARGS[@]}" "libblas=*=*mkl" numpy scipy
    # Statically link FFTW to avoid MKL symbols
    export FFTW_STATIC=1
    ;;
*)
    >&2 echo "ERROR: BLAS must be 'openblas' or 'mkl'"
    exit 1
    ;;
esac

if [ ${INSTALL_MPI} -eq 1 ]
then
    echo "Installing conda-forge compilers, openmpi, mpi4py"
    conda install "${CARGS[@]}" compilers openmpi openmpi-mpicc mpi4py
else
    echo "Not installing openmpi"
    echo "Installing mpi4py with pip"
    # Make sure mpicc will appear on path
    export PATH=${MPI_PATH}/bin:${PATH}
    echo "which mpicc: `which mpicc`"
    # no-cache to avoid wheels from previous pip installs
    python3 -m pip install --no-cache mpi4py
fi

if [ ${INSTALL_FFTW} -eq 1 ]
then
    echo "Installing conda-forge fftw"
    # no-deps to avoid pulling openmpi
    conda install "${CARGS[@]}" --no-deps "fftw=*=*openmpi*"
else
    echo "Not installing fftw"
fi

if [ ${INSTALL_HDF5} -eq 1 ]
then
    if [ ${INSTALL_MPI} -eq 1 ]
    then
        echo "Installing parallel conda-forge hdf5, h5py"
        conda install "${CARGS[@]}" "hdf5=*=mpi*" "h5py=*=mpi*"
    else
        echo "Installing serial conda-forge hdf5, h5py"
        conda install "${CARGS[@]}" "hdf5=*=nompi*" "h5py=*=nompi*"
    fi
else
    echo "Not installing hdf5"
    if [ ${HDF5_MPI} == "ON" ]
    then
        echo "Installing parallel h5py with pip"
        # CC=mpicc to build with parallel support
        # no-cache to avoid wheels from previous pip installs
        # no-binary to build against linked hdf5
        CC=mpicc python3 -m pip install --no-cache --no-binary=h5py h5py
    else
        echo "Installing serial h5py with pip"
        # no-cache to avoid wheels from previous pip installs
        # no-binary to build against linked hdf5
        python3 -m pip install --no-cache --no-binary=h5py h5py
    fi
fi

echo "Installing conda-forge docopt, matplotlib"
conda install "${CARGS[@]}" docopt matplotlib

echo "Installing dedalus with pip"
# CC=mpicc to ensure proper MPI linking
# no-cache to avoid wheels from previous pip installs
CC=mpicc python3 -m pip install --no-cache http://github.com/dedalusproject/dedalus/zipball/master/

echo "Disabled threading by default in the environment"
conda env config vars set OMP_NUM_THREADS=1
conda env config vars set NUMEXPR_MAX_THREADS=1

echo
echo "Installation complete in conda environment '${CONDA_ENV}'"
echo
conda deactivate



-----

$ pip list
Package          Version
---------------- --------
cached-property  1.5.2
contourpy        1.2.0
coverage         7.4.3
cycler           0.12.1
Cython           3.0.8
dedalus          3.0.2
docopt           0.6.2
fonttools        4.49.0
h5py             3.10.0
imageio          2.34.0
imageio-ffmpeg   0.4.9
iniconfig        2.0.0
kiwisolver       1.4.5
matplotlib       3.8.3
mpi4py           3.1.5
numexpr          2.9.0
numpy            1.26.4
packaging        23.2
pandas           2.2.1
pillow           10.2.0
pip              24.0
pluggy           1.4.0
psutil           5.9.8
py               1.11.0
py-cpuinfo       9.0.0
pyparsing        3.1.1
pytest           8.0.2
pytest-benchmark 4.0.0
pytest-cov       4.1.0
pytest-parallel  0.1.1
python-dateutil  2.8.2
pytz             2024.1
scipy            1.12.0
setuptools       69.1.1
six              1.16.0
tblib            3.0.0
tzdata           2024.1
wheel            0.42.0
xarray           2024.2.0
$

Rose Hinz

unread,
Sep 27, 2024, 9:34:18 AM9/27/24
to Dedalus Users
Hi,

Are you using already available MPI, FFTW and HDF5 libraries? Because if so, then I may have solved the issue detailed below. If not, then I am not entirely sure what's going on. My suggestion in this case would be to preinstall the MPI, FFTW and HDF5 libraries and then following below

I believe I may have found the issue, and I believe it is related to when I had this issue. The fault, I've found, lies in pip. It doesn't install all the correct C libraries when downloading the modules. The fix I found was to use conda instead.

I have attached a copy of my install file. The changes lie in lines 191 and 221.

Let me know if this works, and if not, I'll take a look again.

Rose
conda_install_dedalus3.sh

C Wareing

unread,
Sep 27, 2024, 9:47:27 AM9/27/24
to Dedalus Users
Hi Rose,
I've been using system MPI and FFTW for tuned performance, yes. I've let Dedalus use it's own HDF5 implementation.
Thanks for your script, I'll have a go.
Cheers,
Chris

Keaton Burns

unread,
Sep 27, 2024, 9:56:59 AM9/27/24
to dedalu...@googlegroups.com
Hi all,

My understanding is that this the issue arises when using mpi4py >= 4.0 with an older version of MPI that doesn’t support the full MPI 4.0 standard (confusingly, this includes version of openmpi > 4.0).

The solution that has worked for me so far is to:

  1. Pin mpi4py < 4.0 if using an older MPI version e.g. from a cluster.
pip3 install "mpi4py<4.0"

  1. Use the “--no-build-isolation” flag when pip installing Dedalus. This tells pip to use the currently installed packages when building the wheel for Dedalus. If you don’t do this, pip tries to setup an isolated build environment and will automatically pull the latest mpi4py into that environment, breaking the installation.
CC=mpicc pip3 install --no-cache --no-build-isolation dedalus

Please send the full errors you see if that doesn’t work!

Best,
-Keaton


--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/b673504b-612c-4044-b872-e38cc2e1b747n%40googlegroups.com.

C Wareing

unread,
Sep 27, 2024, 12:01:10 PM9/27/24
to Dedalus Users
That's fixed it. v3.0.3 up and working, running test suite, running scripts well in serial and parallel.
Thank you both for your assistance. 
The combination of mpi4py version and forcing the build to use the current packages, as Keaton noted, was the key.
Have a great weekend,
Chris

Reply all
Reply to author
Forward
0 new messages