firedrakeproject / firedrake-spack Goto Github PK
View Code? Open in Web Editor NEWA repository of Spack packages for installing Firedrake
A repository of Spack packages for installing Firedrake
Thanks for creating this repo to install firedrake with spack.
After install the testing version, I get the following errors when import firedrake.
zzyang@MathWorkstation: ~
$ python
Python 3.8.10 (default, Jun 4 2021, 19:24:32)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import firedrake
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake/__init__.py", line 28, in <module>
firedrake_configuration.setup_cache_dirs()
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake_configuration/__init__.py", line 43, in setup_cache_dirs
os.environ["PYOP2_CACHE_DIR"] = os.path.join(config["options"]["cache_dir"], "pyop2")
KeyError: 'cache_dir'
Then I copy the file to the python path, and another error shows up.
zzyang@MathWorkstation: ~
$ cp /home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-firedrake-testing-5wii6ngzbo7qi325hd73h2wypcy56qpv/.configuration.json /home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake_configuration/configuration.json
zzyang@MathWorkstation: ~
$ python
Python 3.8.10 (default, Jun 4 2021, 19:24:32)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import firedrake
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake/__init__.py", line 39, in <module>
from pyop2 import op2 # noqa: F401
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-pyop2-master-qfjxifxctyo4eha6v6cgbbha7dnjr5ww/lib/python3.8/site-packages/pyop2/__init__.py", line 4, in <module>
from pyop2.op2 import * # noqa
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-pyop2-master-qfjxifxctyo4eha6v6cgbbha7dnjr5ww/lib/python3.8/site-packages/pyop2/op2.py", line 42, in <module>
from pyop2.sequential import par_loop, Kernel # noqa: F401
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-pyop2-master-qfjxifxctyo4eha6v6cgbbha7dnjr5ww/lib/python3.8/site-packages/pyop2/sequential.py", line 42, in <module>
from pyop2 import base
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-pyop2-master-qfjxifxctyo4eha6v6cgbbha7dnjr5ww/lib/python3.8/site-packages/pyop2/base.py", line 64, in <module>
import loopy
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-loopy-firedrake-ldx2zmspv6acaeokaegnk276oyzl4gv3/lib/python3.8/site-packages/loopy/__init__.py", line 27, in <module>
from loopy.translation_unit import for_each_kernel
File "/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-loopy-firedrake-ldx2zmspv6acaeokaegnk276oyzl4gv3/lib/python3.8/site-packages/loopy/translation_unit.py", line 43, in <module>
from pyrsistent import pmap, PMap
ModuleNotFoundError: No module named 'pyrsistent'
I think this one can be fixed by add depends
in the package file.
The first error maybe caused by installing the files in python path other than firedrake path?
How can I install the file in the proper palce?
zzyang@MathWorkstation: ~
$ find /home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8* -name '*firedrake*'
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/bin/firedrake-clean
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/bin/firedrake-install
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/bin/firedrake-preprocess-bibtex
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/bin/firedrake-status
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/bin/firedrake-zenodo
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/EGG-INFO/scripts/firedrake-clean
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/EGG-INFO/scripts/firedrake-install
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/EGG-INFO/scripts/firedrake-preprocess-bibtex
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/EGG-INFO/scripts/firedrake-status
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/EGG-INFO/scripts/firedrake-zenodo
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake_citations
/home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/python-3.8.10-w53qlewfh5ywh4sc4zicthpizfgh32jy/lib/python3.8/site-packages/firedrake-0+untagged.1.gc3b5440-py3.8-linux-x86_64.egg/firedrake_configuration
zzyang@MathWorkstation: ~
$ ls /home/zzyang/spack/opt/spack/linux-rhel7-skylake_avx512/gcc-9.3.0/py-firedrake-testing-5wii6ngzbo7qi325hd73h2wypcy56qpv/lib/python3.8/site-packages/
zzyang@MathWorkstation: ~
$
First, thank you for your team making this tool available.
I try to install firedrake with this useful tool, and find some options that should be updated:
+int64
of PETSc should be added if +64-bit-indices
is turned on.+complex
of PETSc should be added if +complex
is turned on.+chaco
is in conflict with +int64
py-pybind11
is one of the dependencies of firedrake.py-islpy
.In addition, I have a question about hypre
. It seems hypre
has options int64
and complex
. If I want to use it in complex and int64 mode, must it be compiled in int64?
I get the exact same issue as in spack/spack#27851.
PETSC assumes mpiexec
as executable.
I installed everything from scratch without trying to provide the system MPI (since I don't know how to do).
Any help?
The command raises the error "ImportError: cannot import name 'CachedCombineMapper' from 'pymbolic.mapper' ". It seems that the new version loopy
needs the develop
version py-pymbolic
and the package py-immutables
.
Traceback after install firedrake:
[firedrake-real-int32] [z2yang@ws2 firedrake-real-int32]$ python -c "import firedrake"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/firedrake/__init__.py", line 69, in <module>
from pyop2 import op2 # noqa: F401
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/__init__.py", line 4, in <module>
from pyop2.op2 import * # noqa
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/op2.py", line 38, in <module>
from pyop2.configuration import configuration
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/configuration.py", line 38, in <module>
from loopy.target.c import CWithGNULibcTarget
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/loopy/__init__.py", line 24, in <module>
from loopy.symbolic import (
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/loopy/symbolic.py", line 43, in <module>
from pymbolic.mapper import (
ImportError: cannot import name 'CachedCombineMapper' from 'pymbolic.mapper' (/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pymbolic/mapper/__init__.py)
Traceback after installing py-pymbolic@develop
:
[firedrake-real-int32] [z2yang@ws2 firedrake-real-int32]$ python -c "import firedrake"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/firedrake/__init__.py", line 69, in <module>
from pyop2 import op2 # noqa: F401
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/__init__.py", line 4, in <module>
from pyop2.op2 import * # noqa
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/op2.py", line 38, in <module>
from pyop2.configuration import configuration
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/pyop2/configuration.py", line 38, in <module>
from loopy.target.c import CWithGNULibcTarget
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/loopy/__init__.py", line 24, in <module>
from loopy.symbolic import (
File "/home/z2yang/opt/firedrake-real-int32/.spack-env/view/lib/python3.10/site-packages/loopy/symbolic.py", line 52, in <module>
import immutables
ModuleNotFoundError: No module named 'immutables'
I install firedrake by adding the following package to spack env:
spack add py-firedrake@develop%gcc +64-bit-indices+complex ^openblas \
^petsc+mumps+scalapack+int64+complex+libyaml+parmmg+mmg \
^hypre+complex+int64+superlu-dist && \
spack add py-pygmsh py-meshio py-tqdm py-pyyaml
spack
finished the installation by using openmpi
.
When I test the installation by
pytest tests/regression/ -k "poisson_strong or stokes_mini or dg_advection" 2>&1
The parallel tests all failed.
Is this a known issue?
The spec of the env and the test log is attached.
firedrake-pytest-log.txt
firedrake-spec.txt
Then I create a new spack env to install firedrake with mpich
, the test fails again. The errors are a little different:
==================================== ERRORS ====================================
___________ ERROR at setup of test_poisson_analytic_linear_parallel ____________
item = <Function test_poisson_analytic_linear_parallel>
def pytest_runtest_setup(item):
if item.get_closest_marker("parallel"):
from mpi4py import MPI
if MPI.COMM_WORLD.size > 1:
# Turn on source hash checking
from firedrake import parameters
from functools import partial
def _reset(check):
parameters["pyop2_options"]["check_src_hashes"] = check
# Reset to current value when test is cleaned up
> item.addfinalizer(partial(_reset,
parameters["pyop2_options"]["check_src_hashes"]))
E AssertionError: (<Function test_poisson_analytic_linear_parallel>, {})
tests/conftest.py:82: AssertionError
=========================== short test summary info ============================
Thanks for your attention!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.