Skip to content

xsdk: Very preliminary xsdk.py definition for installing xSDK packages#2035

Closed
BarrySmith wants to merge 0 commit intospack:developfrom
BarrySmith:develop
Closed

xsdk: Very preliminary xsdk.py definition for installing xSDK packages#2035
BarrySmith wants to merge 0 commit intospack:developfrom
BarrySmith:develop

Conversation

@BarrySmith
Copy link
Copy Markdown
Contributor

I don't have a clue what I am doing so all input welcome. @tgamblin @jwillenbring @sarich

Please read the questions/comments in the changes.

Funded-by: IDEAS
Project: IDEAS/xSDK
Time: 4 hours
Thanks-to: Todd Gamblin [email protected]

# @git:tag_or_commit_hash using maybe
#version('*', git='https://bitbucket.org/petsc/petsc.git')
# then users could do petsc@master or [email protected] or petsc@11bc23.. ?
version('master', git='https://bitbucket.org/petsc/petsc.git')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use master, in comparators for versions the following won't work: master > 3.7.2 and alike. For now you should name it develop to behave correctly. I have a PR #1983 which introduce other aliases for infinity-like versions, i.e. those which are greater than any given release, but there is a lot of discussion around Version and different opinions.

ps. The proper comparision is important if packages write depends_on([email protected]: (open range) or depends_on(petsc@:3.6.4) (again open range).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

# could spack be smart enough to know that master is greater than or equal to the
# to any release and thus not need the line below ? Or is there a better way to handle this?
# if I don't add the line below and build with petsc master, it uses [email protected] which fails
depends_on('[email protected]:', when='@master:+superlu-dist+mpi')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this line if you use develop, because develop will satisfy @3.7:.

could spack be smart enough to know that master is greater than or equal to the

Spack already does this, but for develop only, see my comment above.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, you don't need : here, @x.y.z: == [x.y.z, +\infty)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

# be a way to describe the git tag/hash in the spack spec such a
# @git:tag_or_commit_hash using maybe
#version('*', git='https://bitbucket.org/petsc/petsc.git')
# then users could do petsc@master or [email protected] or petsc@11bc23.. ?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can provide tag versions like this:

version('1.5', git='<URL>', tag='<tag>')

Same for commit and branch (see fetching from VCS repositories).

Making it automatic would be nice, but keep in mind that Spack is supposed to work behind an air gap -- so the package can't expect a connection to the git server. The versions have to be enumerated here so the Spack can know what to fetch if it's pulling from an https or filesystem mirror.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

depends_on('[email protected]:', when='@3.7:+superlu-dist+mpi')
# could spack be smart enough to know that master is greater than or equal to the
# to any release and thus not need the line below ? Or is there a better way to handle this?
# if I don't add the line below and build with petsc master, it uses [email protected] which fails
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a huge discussion on this if you want to weigh in. FWIW, we currently do this for develop.

My issue w/this is that develop (or master) is newer now but if we write that into the provenance and compare against it in the future, it's probably wrong (i.e., the installed develop version will one day be older than the most recent version). My idea was to be smart enough to figure out what commit/recently tagged version it is actually at and write that into the provenance, so we can compare later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huge discussion is here #1975, the other is just another suggestion.

My idea was to be smart enough to figure out what commit/recently tagged version it is actually at and write that into the provenance, so we can compare later.

AFAIK won't always work: #1975 (comment) 😄

variant('trilinos', default=True, description='Enables turning off building Trilinos for testing; since it takes so long to build')

# we actually want 2.11.1 but that isn't available in the Spack file
depends_on('[email protected]~internal-superlu')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably eventually want:

depends_on('[email protected]~internal-superlu', when='@0.1.0')

Then you can add another depends_on for Hypre for 0.2.0 when it comes out.

I have ideas about making this kind of thing easier to specify (some kind of version matrix literal) but haven't implemented them yet.


# We need a way to pass -DUSE_XSDK_DEFAULTS=YES into Trilinos
# How do we propagate debug flag to all depends on packages ?
# If I just do spack install xsdk+debug will that propogate it down?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this you could just add an xsdk variant to Trilinos that adds the option, and depend on trilinos+xsdk... blahblah.

depends_on('[email protected]~internal-superlu')

# we actually want git commit 0b5369f but that isn't supported by the Spack file
depends_on('[email protected]')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add this to superlu:

version('xsdk-0.1.0', git='<url>', commit='0b5369f')

Would it be crazy to ask them to tag that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, added this but had to commit it out because it looks like commit of Superlu_dist no longer works with spack.

@tgamblin tgamblin added the xSDK label Oct 17, 2016
@BarrySmith
Copy link
Copy Markdown
Contributor Author

Thanks for the comments. Aside from "add the xsdk variant for Trilinos" I think I've done what was suggested.

Also started to use the develop version to other xsdk packages; got it working on linux.

Copy link
Copy Markdown
Member

@davydden davydden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good apart from minor issues.

depends_on('hypre~internal-superlu', when='+hypre+mpi~complex')
depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi')
depends_on('[email protected]:', when='@3.7:+superlu-dist+mpi')
depends_on('superlu-dist@:4.3', when='@3.6.4+superlu-dist+mpi')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably a typo, unless petsc 3.6.3 and below can't be compiled with superlu-dist@:4.3

depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi')
depends_on('[email protected]:', when='@3.7:+superlu-dist+mpi')
depends_on('superlu-dist@:4.3', when='@3.6.4+superlu-dist+mpi')
depends_on('[email protected]', when='@3.7:+superlu-dist+mpi')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably a typo, unless [email protected]: would not work with [email protected] and 5.1.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p.s. I am adding those in #2038

homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"

version('xsdk-0.1.0', git='https://github.com/xiaoyeli/superlu_dist', commit='0b5369f')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe call it develop for time being, otherwise xsdk-0.1.0 will always compare less-than with any other released version. In other words, it will not satisfy conditions like depends_on([email protected]:).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be ok -- xsdk-0.1.0 is unlikely to be requested by packages other than xsdk. Although it would be nice if the xsdk versions of things were also officially tagged releases of their respective projects so we could avoid things like this.

Copy link
Copy Markdown
Member

@davydden davydden Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgamblin : How about I strip multiple infinity-like versions from #1983 but keep the rest, it would allow you write here develop.xsdk.0.1.0 and it will behave correctly w.r.t comparision with 5.0.0?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

point being is that you can't build [email protected]: with [email protected] because petsc depends_on('[email protected]:', when='@3.7:+superlu-dist+mpi')


# we actually want git commit 0b5369f but that isn't supported by the Spack file
#depends_on('[email protected]')
# the spack build fails on the above so for now just use the previous release
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the reasons is exactly because of version comparision. It can't find the graph of packages which would satisfy all the constraints.

Copy link
Copy Markdown
Member

@tgamblin tgamblin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from the superlu version @davydden mentioned, and the failing flake8 tests.

@BarrySmith: you can run the style checks locally with share/spack/qa/run-flake8-tests, or just see the travis build details.

@tgamblin tgamblin mentioned this pull request Oct 18, 2016
@adamjstewart
Copy link
Copy Markdown
Member

@BarrySmith
Copy link
Copy Markdown
Contributor Author

Replaced with pull request #2058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants