-
Notifications
You must be signed in to change notification settings - Fork 1
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
Would it make sense to use an existing package management system like nix? #9
Comments
Hi @aidanheerdegen , Nix is very interesting. How is difficult to use? How does it integrate (if it is the case) with git/github? One of feature that I really love of @cmacmackin project is its simplicity. I am a poor Fortran man that does not like to struggle with complicated environment managers :-) Thank you for help. |
I'm in the same (poor Fortran) boat as you, so I can't bring any expert knowledge of nix. Just wondering if those sorts of options had been explored. I've also come across spack: https://github.com/scalability-llnl/spack and EasyBuild: https://github.com/hpcugent/easybuild So many tools! I've now learnt about FoBiS because of your reply, so I'm very happy. |
@aidanheerdegen thank you! Very nice hints! If can suggest nice Fortran projects here take a look of @cmacmackin FORD and many many others of the our group members https://github.com/Fortran-FOSS-Programmers (the personal projects, our group is young and has few projects). If you like to join us let me know. Our group is very open and like to add new Fortraner entusiast! See you soon. |
Hi, thanks for your interest. I was not aware that such package-management tools existed. They are certainly worth considering. The issue I potentially have with nix is that it seems to require the package maintainers to learn a whole new language. Not only that, but it's a functional language. The other two you mention only require maintainers to write some Python, which people are much more likely to be familiar with. However, I'll have to take a more detailed look at these before I can say anything decisive. Hopefully I'll get to that over the weekend. |
Looking at these I can see pros and cons of all of them. nixPros:
Cons:
SpackPros:
Cons:
EasybuildPros:
Cons:
To be honest, my inclination right now would be to fork spack, altering it so that package files are no longer part of the installation per se, but are in a separate git respository. We'd also probably want to add a command to pull down any updates to said repository. These changes would be relatively minor and it would be fairly easy to pull in updates made by the spack team themselves. In addition to the FLATPack repository, we'd also set up a FLATPack-db repository containing the package files. Preferably we could also add some way for people to add their own repositories as sources of package files (similar to adding PPAs in Ubuntu). However, it does seem a shame to have to fork a project which is so nearly where we want to be. |
Thanks for taking the time to compare these existing projects. I had a vague idea of what the differences might be, but I didn't have the time to go into in detail. I think you're right that they have different strengths and use cases. While I agree that Easybuild requires modules, I'm not sure this is entirely a "con". It allows for supporting libraries (and compilers) to be installed rather seamlessly. Which also helps a lot with testing and reproducibility. Whilst some scientific coders might not value these things in the beginning, you just know they'll thank you if they ever have a support request like "uhhh .. it doesn't work on my system". Is it worth explicitly asking the developers of Easybuild and Spack to comment by @'ing them into the conversation? The Easybuild developer might have an opinion about package repos. |
Hi all, I agree with @aidanheerdegen : maybe the developers of Easybuild and Spack can give us valuable help. See you soon. |
I'm no fan of modules either @szaghi, but have you looked into Lmod? It seems to solve a lot of the problems of the original modules, and has a lot of features, including a hierarchical naming scheme http://www.admin-magazine.com/HPC/Articles/Lmod-Alternative-Environment-Modules I particularly like the save/restore, where you can save your current module setup. Even do named saves: http://hpcugent.github.io/easybuild/files/sllides_mclay_20140617_Lmod.pdf I plan to test out Lmod, but haven't had the time to do so up to this point. Desk does look neat, but the support and wide user base of modules (Lmod) is very useful in my opinion. |
Hi all: I'm one of the Spack developers. I'm actually integrating a PR for external package repositories right now, so you will soon be able to maintain packages outside the main Spack distro and point Spack at them. Your package will still be able to depend on the built-in packages; you'll just have to get your users to add a URL to a list of package repositories (kind of like yum, RPM, etc.). As for modules, Spack actually does generate module files, but you only need them to get things into your PATH. Spack's compiler wrappers will add RPATHs for you so that your executables find their deps with or without modules, but the modules are still there for interactive stuff like PATH and MANPATH. There is also a PR for Lmod support which is on the list for integrating into the mainline. We've had some adoption by solver folks... see this SC15 poster for details about INRIA Bordeaux's MORSE stack. If you're interested in more details there is also our paper and some slides, and I'm happy to answer questions. |
@aidanheerdegen Lmod is very interesting, thank you for pointing it out! I agree that modulefiles are the de facto standard thus they are important (especially in HPC frameworks), but for single-user workstation I would like something more easy to maintain (Lmod seems very promising on this regards). @tgamblin Thank you very much for your help!
Nice, so one of the main issue identified by Chris is being fixed, good news!
Is the dependency limited to the built-in packages or a package will be allowed to depend on also the external packages repositories that you are integrating? This could matter for us.
Can you give us more details? I am not sure to understand the RPATHs mechanism. Which is the Spack's compiler wrappers workflow? Spack will compile the sources by means its wrappers, but the reference to RPATHs is not clear for me. Thank you for poster/paper/slides I will read them soon and thank you for your kind help. See you soon. |
@szaghi: Sure thing. Answers below.
The repositories would be implemented as overlays, so you could do either. e.g., in a YAML config file: repos:
- /path/to/local/packages
- $spack/var/spack/packages If your package
This is explained in more detail in the paper and the slides, but in short There's a tiny bit more on how the compiler wrappers set this in the packaging guide. |
Wow, very interesting, I am completely unaware about RPATH mechanism. I will read your paper soon. Thank you very much! If I am not too much bothering... can point me to the list of the compilers that SPACK currently wraps? For us it is very important GNU gfortran that I am almost sure you support, but others could be also important (Intel Fortran, IBM XL Fortran, NAG, etc...). Thank you very much again for your help! |
@tgamblin |
Thanks very much to @tgamblin for popping in and sharing such great info. I was looking into the differences between spack and EasyBuild, when I came across this thread for hashdist: https://groups.google.com/forum/#!topic/hashdist/CcsjgeaR7Zo which features a lot of Todd's comments. So there is yet another great tool. From a scientific perspective, for me, reproducibility of builds is paramount. I want to be able to unambiguously identify what executable was used for a simulation, how the model code was built, and if necessary rebuild the executable to re-run the simulation. Seems like hashdist is a better fit for those requirements? Is it worth bothering @certick for his opinion? Edit: seems that @ didn't work ... |
Support for each new compiler (compiler family, really) goes here. If you look at the files there, it's only 20-30 lines to add a new one -- all Spack needs to know is possible names, suffixes, how to add an
This week or next, hopefully.
We've fallen behind on actually tagging the release (and updating the roadmap, apparently) but all the stuff slated for 0.9 on the roadmap you saw (variants, optional dependencies) is in
We could probably rework spack to include PyPI support, although it's currently pretty easy to use. You just clone it (or grab a tarball) and you're ready to go -- you can run it right out of If people are used to PyPI, I suppose putting it there would increase exposure, which is a benefit, but is there a technical advantage? I would have to think about how best to rework the directory structure to fit a standard python install, and this might interfere with the current scheme, which is designed to fit unobtrusively into a standard Linux filesystem hierarchy. I don't see too much difference between hashdist and Spack from a reproducibility perspective. Neither uses a completely isolated environment (like Nix), but then again neither requires root access for Spack at queries your compilers to ensure they're what they say they are and that they're at a particular version... with hashdist you have to set some env vars to swap compilers (per the last time I talked to Ondrej), so that aspect would be more cumbersome. hashdist does hash the actual build file, which is nice, while Spack only hashes the build DAG for a version. However, I'm planning to add build file hashing, along with perhaps some customizability for how detailed you want your version hash to be. Feel-wise, I think hashdist has more of a meta-build-system feel to it, while Spack feels more like a package manager like homebrew. This is all just my opinion, though -- a lot of great work has gone into hashdist so I'd ask them for more details, as well. |
Thanks again for the information @tgamblin. There is so much that is similar between the different packages that finding the critical differences can be hard for those of us who aren't very familiar with either (or both) packages. Have you, the EB guys or hashdist done a comparison at all? Or use cases? Sounds like, if you wanted to test your code against a bunch of compiler/library combinations, spack would be a better choice than hashdist, at the present time. As a user, I have to say PyPi isn't a big pull for me. Apart from the general weirdness of the inception-like installer recursion PyPi entails, I think it is a bonus that spack will install without dependencies. |
I have a slightly provocative question: given the maturity and capabilities of spack (or hashdist) what is the raison d'être of FLATPack? Is it a curated collection of Fortran specific libraries? Or does it make sense for more focussed curated collections in specific subject areas? In which case, is FLATPack more of an information source, HOW-TOs, suggestions for best practice, and maybe a point of aggregation for search and collaboration? |
@aidanheerdegen I think the intention now would be to make it a curated collection of Fortran libraries and software. I don't think that it makes sense to have subject-specific collections, because there are many things in Fortran which are useful across a variety of fields. For example: ODE solvers, JSON parsers, plotting packages, vector libraries, implementation of data structures, etc. These are the sorts of things which a code may depend on whether it deals with radiative transfer, ocean currents, plasma physics, or economic transactions. If we hope to have some libraries become de facto standards for these things (and such a hope was part of the reason why I initiated this project) then a centralized collection makes the most sense. As such, I see major disadvantages of having subject-specific collections and no real advantage. @tgamblin |
I talk to the EB guys quite a bit, and I'm on the Spack has seen quite a bit of adoption with app teams and users, and more recently some HPC centers. EB seems to target sysadmins (though we'd like to target sysadmins too), and has been around for longer. In general, EB likes to be very specific about versions, and the config files are the DAG. With Spack, the package recipes are templates, and the tool has pretty robust DAG management (virtual deps, version constraints, normalization, concretization -- see the paper). So, you can compose things more easily but you might also build things that perhaps no one ever tested, so it might break :). The idea is to make it easy to build a one-off configuration outside the vetted stack. There has been some talk about maybe sharing Spack's DAG library and capabilities with EB, to get some commonality bt/w the tools.
I think that is accurate, though I believe hashdist does let you test lots of lib combinations. You might have to do more editing to get everything done, though. With spack you can type a few commands b/c it has a syntax for this. @cmacmackin: I'll keep PyPI in mind; it would be nice to install from there. I have a lot of things on my plate at the moment as we approach |
https://nixos.org/nix/
It is built to support multiple environments, which seems a very good fit for compiler/lib combinations, I'm thinking especially of compiler/MPI library combinations.
The text was updated successfully, but these errors were encountered: