Spack: py-pyfftw import issue with scipy.fftpack

Created on 25 Feb 2020  路  3Comments  路  Source: spack/spack

Hi,
Sorry to bother you all.
After loading the spack modules via:

  spack load -r [email protected]
  spack load py-h5py
  spack load py-scipy
  spack load py-pyfftw
  spack load py-mpi4py

When in the python code I am using I try to do import spicy_fftpack, I have been getting an error message that ends with:

Error Message

from scipy.fftpack import (dct, idct, dst, idst, diff, tilbert, itilbert,
ImportError: cannot import name '_fftpack' from 'scipy.fftpack'

The full error output is in error.txt.

I think that that error is solved in the recent version of pfftw (https://github.com/pyFFTW/pyFFTW/pull/265 and https://github.com/pyFFTW/pyFFTW/issues/279).

But in my machine I still get that error.
I am not sure if I am installing py-pyfftw or py-scipy incorrectly, or making another mistake.
Or if I would just need to add an equivalent line to:

version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')

but for version 0.12.0, to the package.py of py-pyfftw of spack.

Do you have any suggestion on how I can fix this issue and correctly import the library?

Thank you,
Diana

System

  1. macOS Catalina - %[email protected] (but with [email protected] fortran compilers - see compilers.yaml below)
  2. spack installed python (@3.7.6)
  3. spack installed py-scipy (@1.4.1)
  4. spack installed py-pfftw (@0.11.1)

compilers.yaml

compilers:
- compiler:
    spec: [email protected]
    paths:
      cc: /usr/bin/clang
      cxx: /usr/bin/clang++
      f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
      fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
    flags: {}
    operating_system: catalina
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []
- compiler:
    spec: [email protected]
    paths:
      cc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gcc
      cxx: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/g++
      f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
      fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
    flags: {}
    operating_system: catalina
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []

packages.yaml

packages:
  all:
    providers:
      mpi: [mpich, openmpi]
bug macOS python update-package

Most helpful comment

Thank you for the reply @adamjstewart.
Yes, I would like to try to do that PR!

All 3 comments

My spack repo is at commit

676eb56ab2379e4d1b3958aad382d81cb012c560 (HEAD -> develop, origin/develop, origin/HEAD)
Author: Patrick Gartung <[email protected]>
Date:   Tue Feb 25 11:01:59 2020 -0600
...

Or if I would just need to add an equivalent line to:

version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')

but for version 0.12.0, to the package.py of py-pyfftw of spack.

Yep, if the bug is fixed in 0.12.0, you just need to add a new version of py-pyfftw. You can run spack checksum py-pyfftw 0.12.0 to get the line, then manually paste it in the package.

Would you like to submit a PR to fix this? If not, I can do it too.

Thank you for the reply @adamjstewart.
Yes, I would like to try to do that PR!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eschnett picture eschnett  路  3Comments

adamjstewart picture adamjstewart  路  3Comments

adamjstewart picture adamjstewart  路  3Comments

hartzell picture hartzell  路  3Comments

ifelsefi picture ifelsefi  路  3Comments