Albany: Add Albany package.#8332
Albany: Add Albany package.#8332adamjstewart merged 1 commit intospack:developfrom gahansen:Albany_feature_addition
Conversation
| maintainers = ['gahanse'] | ||
|
|
||
| # Add proper versions and checksums here. | ||
| version('master', git='https://github.com/gahansen/Albany.git', branch='master') |
There was a problem hiding this comment.
| version('master', git='https://github.com/gahansen/Albany.git', branch='master') | ||
|
|
||
| variant('install', default=True, | ||
| description='Enable Install') |
There was a problem hiding this comment.
There is currently an explicit install option (on or off) in Albany's build process. I can eliminate this if I clean that option up on the Albany side. I'll do that and eliminate this option.
There was a problem hiding this comment.
On further inspection, some Albany users need this option. I'll explicitly set it in the update instead of having it as a variant.
| description='Enable LCM_SPECULATIVE') | ||
| variant('lame', default=False, | ||
| description='Enable LAME') | ||
| variant('edebug', default=False, |
| description='Enable ALBANY_CI') | ||
| variant('ascr', default=False, | ||
| description='Enable ALBANY_ASCR') | ||
| variant('perf', default=False, |
There was a problem hiding this comment.
does this run some tests? If so, it's not a variant:
spack install -h
--run-tests run package tests during installation (same as --test=all)
There was a problem hiding this comment.
No - sorry for the confusion. Albany optionally links to a Configuration Interface (CI) that is a GUI that helps users setup the Albany input and execution spec. I could add a better description than "Enable ALBANY_CI" at the expense of making that string longer. Are there limitations on the length of that string (either technical or project policies?)
There was a problem hiding this comment.
There are no limitations on the length of the description. However, if the line goes over 79 characters, flake8 will complain. As long as you keep the entire variant(...) on a single line, flake8 will not check that line.
| # Add dependencies | ||
| depends_on('mpi') | ||
| depends_on('trilinos@develop:~superlu-dist+isorropia+tempus+rythmos+teko+intrepid+intrepid2+minitensor+phal+pnetcdf+nox+piro+rol+shards+stk+superlu') | ||
| depends_on('trilinos@develop:~superlu-dist+isorropia+tempus+rythmos+teko+intrepid+intrepid2+minitensor+phal+pnetcdf+nox+piro+rol+shards+stk+superlu', when='+lcm') |
There was a problem hiding this comment.
why do you need this one if it's the same as the previous line?
| including fluid mechanics, solid mechanics (elasticity and plasticity), | ||
| ice-sheet flow, quantum device modeling, and many other applications.""" | ||
|
|
||
| # Add a proper url for your package's homepage here. |
There was a problem hiding this comment.
You can remove this comment.
| homepage = "http://gahansen.github.io/Albany" | ||
| url = "https://github.com/gahansen/Albany/tarball/master" | ||
|
|
||
| maintainers = ['gahanse'] |
There was a problem hiding this comment.
We usually use GitHub handles in the maintainers list so that we can ping people when there are build problems.
|
|
||
| maintainers = ['gahanse'] | ||
|
|
||
| # Add proper versions and checksums here. |
There was a problem hiding this comment.
You can delete this comment.
|
|
||
| options.extend([ | ||
| '-DALBANY_TRILINOS_DIR:FILEPATH={0}'.format(trilinos_dir), | ||
| '-DCMAKE_INSTALL_PREFIX:PATH=%s' % self.prefix |
There was a problem hiding this comment.
You don't need this one, Spack already adds it for you in CMakePackage.
| description='Enable Intrepid') | ||
| variant('intrepid2', default=False, | ||
| description='Enable Intrepid2') | ||
| variant('minitensor', default=False, |
There was a problem hiding this comment.
Please add packages in alphabetical order, this makes it easier to maintain.
| 'ON' if '+intrepid' in spec else 'OFF'), | ||
| '-DTrilinos_ENABLE_Intrepid2=%s' % ( | ||
| 'ON' if '+intrepid2' in spec else 'OFF'), | ||
| '-DTrilinos_ENABLE_Phalanx=%s' % ( |
There was a problem hiding this comment.
Please use alphabetical order here.
| '-DTrilinos_ENABLE_Rythmos=%s' % ( | ||
| 'ON' if '+rythmos' in spec else 'OFF'), | ||
| '-DTrilinos_ENABLE_Teko=%s' % ( | ||
| 'ON' if '+teko' in spec else 'OFF'), |
There was a problem hiding this comment.
Please add checks like conflict for configurations you know are incompatible so that they fail in the spack resolution phase and not during Trilinos configure/build. For example, Teko has a required dependency on many packages including Tpetra, ML, etc. Thus, it would be nice to have things like
conflicts('+piro', when='~tpetra')I understand that this would be time consuming, but I don't see a better solution (would be nice if we could somehow do parts of spack's trilinos package by parsing Trilinos Dependencies.cmake).
There was a problem hiding this comment.
I'll add that dependency. TriBits has an effective dependency system in place, we will need to dig through Dependencies.cmake and duplicate the dependencies in the Spack file for the options that I added. Would you be open to helping me with that?
There was a problem hiding this comment.
Thanks! Email is inbound...
|
Commit ba7f3fa replaces the above. @aprokop very kindly adopted my suggested changes to the Trilinos package and submitted PR outlined in #8363 which provides the changes needed that the Albany package requires. This commit contains only the albany/package.py file that builds on that for the new Albany package. I believe I addressed the above comments in this commit. Thanks to everyone who helped with this! |
aprokop
left a comment
There was a problem hiding this comment.
Looks good to me. The only minor nitpick is that depending on just trilinos@develop seems over restrictive to me. It should not be a problem compiling it with trilinos@master, for example, as they are now typically just few days off.
|
Thanks for the thought @aprokop . I actually tried trilinos@master, but spack fell back to using [email protected] when I did that. I think there might be a priority in spack, with the "@develop" is highest, but the numeric version is preferred over other string identifiers. Or perhaps it was due to an oversight on my part? |
Correct. By default, Spack installs the newest numeric release for stability. If you want a different release, you have to explicitly request it. |
|
I think you can do something like |
|
Thanks @aprokop! Your syntax suggestion for the Trilinos dependency works great. I added 0f34beb to change this Albany dependency to your suggestion. |
|
Just one minor point of confusion for me. @adamjstewart Is |
|
Yes, develop sorts higher than any other version. |
|
@adamjstewart Thanks! @gahansen So, you could remove the |
|
@adamjstewart - I'm new to the Spack effort. Do I need to take further action to move forward to a merge? |
|
I think the only thing left is @aprokop's comment on the unnecessary colon. |
* Add package.py to support the Albany GitHub project builds.
|
Will merge as soon as @davydden approves. |
Add package.py to support the Albany GitHub project builds.
Update the Trilinos package.py script to provide additional
options needed for Albany.