Skip to content

Conversation

@boegel
Copy link
Member

@boegel boegel commented Aug 13, 2014

Not 100% finished yet, but getting there. I'm not confident enough yet that I'm covering everything I need to... Some code cleanup might be needed too.

Currently tackled:

  • installing a hidden module, and skipping the build for existing hidden modules
  • specifying hidden modules as dependencies via hiddendependencies, and resolving those dependencies correctly
  • correctly reporting hidden modules in --dry-run (needs an enhanced unit test)

@wpoely86: please review, since we discussed this earlier

Copy link
Member

Choose a reason for hiding this comment

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

Extend the docstring with the new argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@wpoely86
Copy link
Member

Looks good after first read

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@wpoely86: added some extra stuff w.r.t. checking for existing (potentially) hidden modules, and fixed your remarks

I'd like to be able to merge this ASAP, since this is (kind of) blocking other stuff I have queued up.

Can you review this PR again?

Copy link
Member

Choose a reason for hiding this comment

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

Am I missing something here? If hidden=True and the first part of this and is False, then the we should get a hidden name?

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to think about this... I think the hidden named argument only matters if the module is not being specified as being hidden by another way, i.e. it's a fallback mechanism.

But I need to double check that again, the logic gets complex here.

Copy link
Member

Choose a reason for hiding this comment

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

if it's not specified, won't the first part of the and be False? And thus the other part doesn't matter anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed it to force_visible, and used False as a default, please check again.

The intention is to force the module name to be a non-hidden module name, regardless of whether the installed module should be hidden or not. This is used to determine the installation subdir which (for now?) matches the module name.

Copy link
Member

Choose a reason for hiding this comment

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

Looks better!

@wpoely86
Copy link
Member

Second read, still looks great 👍

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

Jenkins is happy with this too, so merging in, thanks for the review @wpoely86!

@ocaisa has a good idea to leverage this support for hidden modules, to make modules for stuff that users typically don't care about (i.e., wouldn't load directly themselves) hidden. Examples include libreadline, ncurses, X11 libraries, etc... With this in place, it should suffice to simply move dependencies like these to hidden_dependencies instead of dependencies in the resp. easyconfigs...

boegel added a commit that referenced this pull request Aug 20, 2014
add support for installing hidden modules and using them as dependencies (WIP)
@boegel boegel merged commit fa0d7d8 into easybuilders:develop Aug 20, 2014
@boegel boegel deleted the hidden branch August 20, 2014 16:16
@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

I totally vote for this! Using hidden_dependencies instead of dependencies would allow to only present users modules they care about and vastly reduce clutter in "module avail" output.

That, in conjunction with HMNS, would be a big win for end-users.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

I'm having second thoughts on installing stuff like ncurses and X11 libs via hidden_dependencies, since that kind of enforces the use of hidden modules on EasyBuild users.

Instead, we should probably add an EasyBuild configuration option that allows to list the software packages that should be installed as hidden modules, somewhat similar to --filter-deps supported now:

% eb --help | grep filter-deps -A 4
    --filter-deps=FILTER-DEPS
                        Comma separated list of dependencies that you DON'T
                        want to install with EasyBuild, because equivalent OS
                        packages are installed. (e.g. --filter-
                        deps=zlib,ncurses) (type comma-separated list)

That gives more freedom imho, avoids updating all existing easyconfig files and reserves hidden_dependencies for the special cases, e.g. inserting GCC as a hidden dependency for icc/ifort.

Thoughts?

@wpoely86
Copy link
Member

Can we not use hierarchy for this? Now, you got MPI where everything ends up in. Maybe split this up in supporting libraries and end user applications? Both will be visible with avail and spider but you can make a clear distinct between in the output of module av so the end users can easily see which programs are installed.

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

@boegel: I was not sure what you meant, but I think I get it now.

I was also thinking about a configuration flag that would treat hidden_dependencies as regular dependencies, if set. That would still require to update the existing easyconfig files, though.

Overall, I'm ok with your approach, even if it means I'll have to manually specify extra arguments when I install packages, different for each one of them, if I want to use hidden dependencies.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@wpoely86: sure, with a custom module naming scheme you can do that already

The point is that EasyBuild shouldn't force you one way or another, every site will have the policies they want to stick to, EB should allow to implement all of them.

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

@boegel Although having nice and easy to use defaults is a big plus. Having to write a custom module naming scheme to start with is a big showstopper, at least for me.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: so, it seems we need both a --no-hidden-modules and --hidden-dependencies=X,Y,Z as configuration options?

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: the naming scheme remark was w.r.t. installing apps and deps in separate trees, see @wpoely86's suggestion; hidden modules is completely orthogonal to that

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

@boegel: well, probably. --no-hidden-modules would only applies to easyconfig files that contains hidden-dependencies, and --hidden-dependencies=X,Y,Z only to those which don't.

So yes, that's the most flexible approach. Maybe the most confusing too. :)

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

@boegel Installing apps and deps in separate trees is also a nice approach. But this would have to be available as a configuration switch (as a provided module naming scheme) to be really usable. I don't think it's reasonable to expect first-time EB users to write their own module custom naming scheme right away to benefit from this apps/deps separation.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: I'd say --hidden-dependencies would complement all easyconfigs, whether they use hidden_dependencies or not

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: I don't think providing a configuration switch to differentiate between apps and deps would work. When is something a dep and not an app? That seems a site-specific aspect to me...

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

Ok for --hidden-dependencies=X,Y,Z, then. That's probably the best approach.
What about a catch-all value, such as --hidden-dependencies=ALL_DEPS or something like that, which would treat all of the easyconfig dependencies as hidden ones?

@wpoely86
Copy link
Member

Aldo you can do a split between end users apps and supporting libraries in the namescheme technically, I don't think it's possible in practice. You have no way of knowing what a easyconfig is? Something in the catagory chem can be a supporting library or a end user program. You would need to add new catagories for it to work.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: w.r.t. the ALL_DEPS: say Python is used as a dependency for something else... You install Python first, and then install something else that uses Python as a dep later. Is Python hidden or not? Or both? I don't see how that would work, a catch-all doesn't make much sense to me.

@wpoely86
Copy link
Member

I agree with @boegel, hidden deps should be used sparely. If you want to present nicer and cleaner to the end user, hierarchical modules are the way to go.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@wpoely86: well, I think actually hiding stuff that users would never load directly, like ncurses, via a hidden module makes sense; I think mixing both a HMNS and hidden modules makes a lot of sense, both are orthogonal to each other imho

@wpoely86
Copy link
Member

What if an end user wants his home made program to compile with ncurses? I wouldn't hide it, just make it less visible 😉

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

Yeah, well, the optimal solution probably doesn't exist... So, each site should be able to configure EB to make it behave as they want it to, as easily as possible (like @kcgthb already mentioned, not having to dive deep into the framework and write custom Python code, if possible at all).

@wpoely86
Copy link
Member

So that means a naming scheme based on the catagories? Then it should be possible to alter the output of module av to display something better then other.

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@wpoely86: picking categories that appeal to everyone is equally impossible... That's just moving the problem imho.

@kcgthb
Copy link
Contributor

kcgthb commented Aug 20, 2014

@boegel. Regarding ALL_DEPS and your Python example: when EB checks for existing modules at the beginning of its installation process, couldn't it detect that a hidden module already exists and display a warning about it? Or similarly, when a package is built with --hidden-dependencies=Python and a visible Python module already exists, it could just ignore the --hidden-dependencies directive (I feel like visible modules should take precedence over hidden ones).

@boegel
Copy link
Member Author

boegel commented Aug 20, 2014

@kcgthb: I certainly can do that, both cases. I guess the question there is: should EB complain (and fail) when it detects an 'inconsistency' like that, or implicitly pick up what is there (e.g. pick up GCC/.4.8.2 when GCC/4.8.2 is specified, and vice-versa)? I'd say that's (yet another) configuration switch, and the default should probably be complaining and failing (to avoid surprises). Starting strict and allowing to loosen it up is better than the other way around imho.

@rtmclay
Copy link

rtmclay commented Aug 20, 2014

I think that hiding is a bad idea in general. First hidden modules are only hidden from avail and spider and not from module list. We all have novice users but not all users are novice. When you hide things, you hide them from users who want to know its there. You are going to get questions about say ncurses/.4.2.1 which wasn't on the avail list but is listed with the modules your users have.

The only time I think that hiding is a good idea is when you have to install something that staff and maybe friendly users to test before making available for general use.

@boegel
Copy link
Member Author

boegel commented Aug 21, 2014

@rtmclay: don't you agree that hiding a GCC module that purposely does not extend $MODULEPATH included in a module hierarchy makes sense? See easybuilders/easybuild-easyconfigs#1014 (comment). Users shouldn't be loading this one directly, since it won't yield the result they expect (i.e., other modules turning up)...

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.

4 participants