Open stephenmsachs opened 1 year ago
Hi @stephenmsachs, this is on our list to fix soon, there are a number of reasons we do not include examples in the pip (from PyPI) installation. We are also trying to improve our PyPI installation instructions in this PR: https://github.com/devitocodes/devito/pull/1920/files
Also, the examples directory is not in a sense acore component
of the devito DSL and compiler framework, as they just showcase examples of how you can use the DSL to model problems.
I am assuming that you want to run examples and benchmark some of them.
Is there any specific reason that the below path will not work for you?
# Clone Devito
git clone https://github.com/devitocodes/devito.git
cd devito
For a Python3 virtual environment:
python3 -m venv /path/to/new/virtual/environment
source activate /path/to/new/virtual/environment/bin/activate
For a Conda environment:
conda create -n devito
conda activate devito
and finally, install Devito along with any extra dependencies:
pip install -e .
# To install additional dependencies
# pip install -e .[extras,mpi,nvidia]
Hi @georgebisbas,
Thanks for the quick reply.
I am actually developing a Spack package for devito. Spack installs Python packages by downloading the tarball from pypi and then running pip install .
inside the sources. For now I have added a touch examples/__init__.py
in the spack package. I'l update once there is a PR.
FYI this is the PR to add devito tp Spack: https://github.com/spack/spack/pull/31495
Thank you @stephenmsachs !
@stephenmsachs would you like to point us to any resources wrt Devito in Spack?
@stephenmsachs would you like to point us to any resources wrt Devito in Spack?
Not sure hat you mean by resources. There is a Spack package to build Devito here. You can build this via spack install py-devito
. They use pypi under the hood, so at the time I could only add v4.6.2. Also, no GPU support yet.
@stephenmsachs I have not forgotten about this, just left in side for a moment. In addition, the examples are not really part of the Devito DSL and compiler framework but rather examples of using the DSL to model practical applications. Having this in my TODO list.
Is this still an issue?
I found out that building the tarball hosted on pypi will not include the examples directory (independent of
$DEVITO_BENCHMARKS
). It seems the fileexamples/__init__.py
is not present in the tarball:Please let me know if this is the wrong place to post the issue.