Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spack Package #8351

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Spack Package #8351

wants to merge 3 commits into from

Conversation

wraith1995
Copy link
Contributor

Hi.

I added a Spack package a while ago and I am maintaining it. I thought that I might let you all know and add something to the readme. If anyone wants to be added as a maintainer and receive notifications about it from Spack github, please let me know.

@alexreinking
Copy link
Member

Hi @wraith1995, thanks very much for writing and maintaining this package! Is it simple to set up Spack on my laptop so I can test it? I just want to confirm the instructions myself before merging this.

If anyone wants to be added as a maintainer and receive notifications about it from Spack github, please let me know.

I'm generally the point-of-contact for third-party packages (e.g. vcpkg, Debian), but I don't directly maintain them. I'd be happy to receive notifications, though.

@wraith1995
Copy link
Contributor Author

wraith1995 commented Jul 23, 2024

@alexreinking Yes, it is pretty simple. The instructions are at https://spack.readthedocs.io/en/latest/getting_started.html#getting-started

You can install some apt deps, clone it, run their setup script, and then try the commands. I would suggest something a bit more specific for a test thought:

spack install halide@17+python+tests

Once the PR for version 18 goes through I'll make another one to add you on the list of people to get notifications (technically a maintainer but that is really all that is entailed)

EDIT:
Then to use it, you should run

spack load halide
python3
import halide as hl

@wraith1995
Copy link
Contributor Author

Oh also @alexreinking If you already have an llvm installed, you can maybe skip installing it again via

spack external find llvm

provided llvm-config is in your path.

@alexreinking
Copy link
Member

@wraith1995 -- sorry for the delay on this, the Halide CMake build is undergoing some long-overdue upgrades at the moment and I've had my hands full. I promise I haven't forgotten!

@wraith1995
Copy link
Contributor Author

@alexreinking No problem - I've noticed and I am attempting to gauge how this will change the Spack package.

@alexreinking
Copy link
Member

Ideally, it shouldn't, at least not in this release. You will see some deprecation notices telling you which cache variables to change.

@steven-johnson steven-johnson requested review from halidebuildbots and removed request for halidebuildbots August 23, 2024 17:48
@steven-johnson
Copy link
Contributor

What sort of review does this need?

@alexreinking
Copy link
Member

What sort of review does this need?

We need to check that the apps build and run against the spack package as installed by the directions in the README (this patch)

@alexreinking
Copy link
Member

Running ./bin/spack install halide from Spack's git repo at 47e79c32fdd820b3ce825f62619c693e4a57d549 (develop branch) results in the following error:

==> Error: ProcessError: Command exited with status 1:
   'ninja' '-j16' '-v'

15 errors found in build log:
...

Followed by a bunch of errors regarding segmentation faults in llvm-as. Here is the log: spack-build-out.txt

@alexreinking
Copy link
Member

alexreinking commented Aug 26, 2024

Attempting to use Homebrew's LLVM fails like so:

$ export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
$ ./bin/spack external find llvm
/Users/areinking/dev/spack/lib/spack/spack/detection/path.py:295: UserWarning: "[email protected]+clang~lld+lldb" has been detected on the system but will not be added to packages.yaml [reason=c compiler not found for [email protected]+clang~lld+lldb]
  warnings.warn(msg)

The process then hangs indefinitely. I observe the same error message with ./bin/spack compiler find.

@wraith1995
Copy link
Contributor Author

wraith1995 commented Aug 26, 2024

@alexreinking Hmmm. It is hard for me to tell from the build log what is going on. I've done this on linux/macOS for old Halide and LLVMs; let me see what happens when I run it on my mac with Halide18 and llvm18. I suspect it is probably an issue with external find or the specific way llvm is being requested or some combination thereof.

@alexreinking
Copy link
Member

@wraith1995 -- have you gotten a chance to try to repro this? I would like to make the Spack package work and be able to list it in our README.

@wraith1995
Copy link
Contributor Author

@alexreinking Not yet - I have not had time as of late, but I will have time later this week (Thursday/Friday) to take a look.

@wraith1995
Copy link
Contributor Author

wraith1995 commented Sep 13, 2024

@alexreinking Okay. I can reproduce the first but not the second - I suspect the second might be that spack can sometimes small due to permissions issues (e.g. something on your path it can't read). I am looking into the cause of the segfaults and I will let you know. It is probably something Mac OSX specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants