-
Notifications
You must be signed in to change notification settings - Fork 213
add support for alternative module naming schemes #679
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
Conversation
…dule_name function
…det_full_ec_version functions instead
… module + style fixes in module_generator
…s custom module naming scheme, add module naming scheme unit test
Hi Kenneth, nice work. I think that this is actually VERY close to the finishing line, since we'd like to see just 2 cases covered: I think that meeting these two targets would be sufficient to consider original #173 case closed; other schemes I'd consider them separate feature requests! (including the support for nested names, like |
It is certainly a big step towards #173, but it's not finished yet:
As a sidenote: there's really nothing special about nested names, so supporting those is free (as far as I can tell right now, maybe I'm missing something). I hope I can find more time to continue this soon... |
I really think the above is extra buggage that is truly optional:
Yes, that is needed and should work for both 2 cases mentioned, to consider this viable.
I think it would work well if all subdirs (/gcc/4.8.1) get auto-created, yet it will imply certain troubles if people modify the mapping scheme mid-flight (you probably need to start clean, whenever you play with the naming scheme) |
- add configuration option for module naming scheme - implement module naming scheme as a (Python) module in the easybuild.tools.module_naming_scheme package (with a class derived from 'abstract' class ModuleNamingScheme) - implement default EasyBuild module naming scheme in class EasyBuildModuleNamingScheme - enhance unit tests to test both the default and a (simple) custom naming scheme
…aming scheme can be selected in EasyBuild configuration
One step closer to our goal with the commits I've just included. This now enables building a module with a custom module naming scheme, e.g.: $ export EASYBUILD_MODULE_NAMING_SCHEME=MyModuleNamingScheme
$ eb gzip-1.5-goolf-1.4.10.eb
== temporary log file in case of crash /var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-5I_seD.log
== resolving dependencies ...
== processing EasyBuild easyconfig /Users/kehoste/.local/lib/python2.7/site-packages/easybuild_easyconfigs-1.6.0.0dev-py2.7.egg/easybuild/easyconfigs/g/gzip/gzip-1.5-goolf-1.4.10.eb
== building and installing gnu-openmpi-gzip-1.5...
== fetching files...
== creating build dir, resetting environment...
== unpacking...
== patching...
== preparing...
== configuring...
== building...
== testing...
== installing...
== taking care of extensions...
== packaging...
== postprocessing...
== sanity checking...
== cleaning up...
== creating module...
== COMPLETED: Installation ended successfully
== Results of the build can be found in the log file /var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-gzip-1.5-20130822.165933.log
== Build succeeded for 1 out of 1
== temporary log file /var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-5I_seD.log has been removed.
$ module av gnu/openmpi/gzip/1.5
-------------------------------------------------------------------- /Users/kehoste/.local/easybuild/modules/all --------------------------------------------------------------------
gnu/openmpi/gzip/1.5
$ module show gnu/openmpi/gzip/1.5
-------------------------------------------------------------------
/Users/kehoste/.local/easybuild/modules/all/gnu/openmpi/gzip/1.5:
module-whatis gzip (GNU zip) is a popular data compression program as a replacement for compress - Homepage: http://www.gnu.org/software/gzip/
conflict gzip
module load goolf/1.4.10
prepend-path MANPATH /Users/kehoste/.local/easybuild/software/gnu/openmpi/gzip/1.5/share/man
prepend-path PATH /Users/kehoste/.local/easybuild/software/gnu/openmpi/gzip/1.5/bin
setenv EBROOTGZIP /Users/kehoste/.local/easybuild/software/gnu/openmpi/gzip/1.5
setenv EBVERSIONGZIP 1.5
setenv EBDEVELGZIP /Users/kehoste/.local/easybuild/software/gnu/openmpi/gzip/1.5/easybuild/gnu-openmpi-gzip-1.5-easybuild-devel
-------------------------------------------------------------------
Still required: properly handling dependency resolution when a custom module naming scheme is selected. |
…aming schemes (note: break modules.py API!) - flesh out hardcoded assumption that module names are of format '<name>/<version>' - redefine function signature of available/exists/show/dependencies_for/modulefile_path functions: only accept module name parameter, not name and version parameters - return list of modules as list of strings instead of list of (name, version) tuples - get rid of (unused) modulePath/mod_paths named arguments in available/exists functions - stop using $_LMFILES_ as fallback for $LOADEDMODULES (latter should always work, we can't isolate module name from full path with making assumptions about depth) - add module_software_name function to determine software name from module file - hoist code common between module_software_name/modulefile_path functions into get_value_from_modulefile function - add unit tests for available/exists functions - fix running options unit tests stand-alone
The last commits take care of a significant refactoring of the |
c-o-n-g-r-a-t-u-l-a-t-i-o-n-s i'm sure you are really close to finalizing this; on behalf of many HPC sites (and their users), a big applause. |
I'm pretty close, yes, but not finished yet. Beyond a single |
…g scheme; add initial implementation of det_dependency_module_name() and toolchain.get_module_name() functions
…instead; stop picking software name from module name, use parsed easyconfig instead
Again, one step closer. Dependency resolution in the light of a custom module naming scheme now works:
The That shouldn't be too much work on top of this. And then: testing, testing, testing. :) I'll try and document how to play around with a custom module naming scheme ASAP. |
Hi Ken, one more step of progress. although you would be reluctant to do this, IFF dependency resolution is I very well understand that as a developer you may be reluctant to do so; To sum up, even if this is only partially working, please let it slip On Wed, Aug 28, 2013 at 5:31 PM, Kenneth Hoste notifications@github.comwrote:
|
I might be willing to include it so people can easily experiment with it, but if you look at the diff, you'll see that some major refactoring was required to be able to support this. It also needs a thorough review first, as mentioned before. I won't rush this through just to make the v1.7 release when the next release is only a month away (still very much in time for SC'13, which I find very important). |
OK. I think all that matters here is that you still have the freedom to On Wed, Aug 28, 2013 at 8:59 PM, Kenneth Hoste notifications@github.comwrote:
|
The problem is that it's way more than just an added feature 'on the side'. It required a significant amount of changing current functionality on which everything else supports. |
easybuild/main.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
die camelCase die
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Killed it.
@boegel i reread it, either i'm very tired or i only have some minor remarks. i'd say it's ready to run the release process with alt naming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use self.log.debug("Adding %s as a module dependency", dep_mod_name)
, it differs the string interpolation to when it is actually needed (when debug is on)
Or is this not working with easybuildlog?
(same for everywhere else)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EasyBuildLog
is an instance of FancyLogger
, so I don't see why it wouldn't work...
However, this is (way) out of the scope of this PR, which is already huge.
If we do this, we should apply that optimization consistently across the whole codebase.
I suggest you open an issue (or a PR ;-)) for this...
looks better |
Tested again it's current state, a robot build of DOLFIN, OpenFOAM, WPS, scipy with various toolchains (goalf, goolf, ictce) with a custom module naming scheme (i.e. the one currently shown in the documentation on the wiki) works perfectly. Builds with the default module naming have also been verified to still work as expected (and this will be well tested as part of the regression test anyway). So, I see no reason to hold this back any further, and I'm merging it in, well in time for EasyBuild v1.8.0. This work will be followed up in #687, where support for more 'advanced' module naming schemes will be implemented, together with some more supporting functionality that module naming schemes can use, most likely to be housed in the Thank to everyone who contributed to this, I consider this a very important feature! |
add support for alternative module naming schemes
This PR is far from finished, but intends to solve #173 when it's done.
Comments/suggestions w.r.t. the current draft, which works and even includes a unit test to check the functionality, are welcome.
I will keep updating this when I find time, and will request a full (re)review when I consider it ready for merging.