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

SCR CMake package #3916

Merged
merged 16 commits into from
Aug 3, 2017
Merged

SCR CMake package #3916

merged 16 commits into from
Aug 3, 2017

Conversation

gonsie
Copy link
Contributor

@gonsie gonsie commented Apr 19, 2017

SCR is now using CMake to build.

This package is still being developed, please add the WIP label.

Copy link
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.

mostly LGTM -- some requests/comments.


version('master', git='https://github.com/llnl/scr.git', branch='master')

depends_on('pdsh')
Copy link
Member

Choose a reason for hiding this comment

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

Is this a build/link dependency? I'm suspicious it's a run dependency.

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be build/run. CMake will fail if it's not there, and it's a run dependency.

depends_on('zlib')
depends_on('mpi')

variant('dtcmp', default=True, description="DTCMP")
Copy link
Member

Choose a reason for hiding this comment

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

Is there maybe a better description than saying it louder? 😄

# variant('yogrt', default=True, description="Lib YOGRT")
# depends_on('yogrt', when="+yogrt")

## MySQL not yet in spack
Copy link
Member

Choose a reason for hiding this comment

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

mariadb is, though. Is it worth making mysql a vdep and making mariadb and (some future) mysql providers?

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look like there's a good guarantee of the two APIs staying identical, so I'm not sure a vdep fits well.

## NOTE: scr-v1.1.8 is built with autotools and is not properly build here.
## scr-v1.1.8 will be deprecated with the upcoming release of v1.2.0
# url = "https://github.com/LLNL/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz"
# version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e')
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth preserving old versions (i.e. are there going to be codes that depend on them?) If so, it might be useful to look at dyninst, which is an example of a package with two build systems. Only disadvantage is that it extends Package, which lacks many of the nice phases that AutotoolsPackage and CMakePackage provideI. I don't think anyone's tried to do this with multiple inheritance, though it was discussed with @alalazo here in #3642.

Copy link
Member

Choose a reason for hiding this comment

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

There should not be any codes dependent on older versions, and as of now the SCR team does not plan to support versions before 1.2.0 once that version is released.

Copy link
Member

Choose a reason for hiding this comment

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

@tgamblin How frequent are cases where a package changes build system and we want to support both? I ask because multiple inheritance won't work out of the box, but we can think of adding a build system class that is a "variant" (in the design pattern sense) and can defer to a later stage the instantiation of its actual type.

For example we can have this "shell" build system and instruct it to turn either in AutotoolsPackage or CMakePackage after the inspection of the version of the concrete spec.

Copy link
Member

Choose a reason for hiding this comment

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

Personally, I only care about installing the latest version of a package. Keeping a single build system for this package makes everyone's life easier. It's an interesting technical problem if @alalazo gets bored, but there are so many other open issues that I think we should drop the old versions altogether and only support CMake releases until we know of someone who actually needs the old releases.

Copy link
Member

Choose a reason for hiding this comment

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

@alalazo @adamjstewart: Yeah in this case the old releases are not necessary, that I know of. SCR has mainly been used internally at LLNL and people are likely to only need the latest release.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is more of an issue for things we've been supporting in Spack for old versions.

@tgamblin tgamblin added the WIP label Apr 20, 2017
@tgamblin
Copy link
Member

@gonsie: gave you write privs -- you can add labels now 😄


class Scr(Package):
from llnl.util.filesystem import join_path
Copy link
Member

Choose a reason for hiding this comment

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

This import isn't necessary. join_path is already imported by from spack import *. To see exactly what comes with that, check out spack.__all__.

## NOTE: scr-v1.1.8 is built with autotools and is not properly build here.
## scr-v1.1.8 will be deprecated with the upcoming release of v1.2.0
# url = "https://github.com/LLNL/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz"
# version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e')
Copy link
Member

Choose a reason for hiding this comment

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

Personally, I only care about installing the latest version of a package. Keeping a single build system for this package makes everyone's life easier. It's an interesting technical problem if @alalazo gets bored, but there are so many other open issues that I think we should drop the old versions altogether and only support CMake releases until we know of someone who actually needs the old releases.


def configure_args(self):
args = []
return args
Copy link
Member

Choose a reason for hiding this comment

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

I know this needs to go away if it stays empty, leaving it here for now as I'm not sure whether I'll need to change it yet.



class Libyogrt(AutotoolsPackage):
"""FIXME: Put a proper description of your package here."""
Copy link
Member

Choose a reason for hiding this comment

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

Needs description.

@adamjstewart
Copy link
Member

Here are the things causing flake8 tests to fail:

var/spack/repos/builtin/packages/scr/package.py:30: [E302] expected 2 blank lines, found 1
var/spack/repos/builtin/packages/scr/package.py:37: [E266] too many leading '#' for block comment
var/spack/repos/builtin/packages/scr/package.py:38: [E266] too many leading '#' for block comment
var/spack/repos/builtin/packages/scr/package.py:57: [E266] too many leading '#' for block comment
var/spack/repos/builtin/packages/scr/package.py:107: [E126] continuation line over-indented for hanging indent
var/spack/repos/builtin/packages/scr/package.py:110: [E126] continuation line over-indented for hanging indent
var/spack/repos/builtin/packages/scr/package.py:113: [E126] continuation line over-indented for hanging indent
var/spack/repos/builtin/packages/scr/package.py:116: [E126] continuation line over-indented for hanging indent
var/spack/repos/builtin/packages/scr/package.py:119: [E126] continuation line over-indented for hanging indent
var/spack/repos/builtin/packages/scr/package.py:127: [E501] line too long (82 > 79 characters)
var/spack/repos/builtin/packages/scr/package.py:130: [E116] unexpected indentation (comment)

@becker33 becker33 dismissed tgamblin’s stale review July 20, 2017 21:53

All issues addressed, Todd not available to confirm.

@becker33 becker33 merged commit bb4692f into spack:develop Aug 3, 2017
@becker33 becker33 removed the WIP label Aug 3, 2017
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.

None yet

5 participants