Kenneth, Thank you for the warm welcome. A few thoughts:
1. I noticed that the develop branch contains the basic support for Mac
OSX, but the release versions do not (yet). I found this support very
useful (proper determination of Darwin, definition of SHLIB_EXT, etc).
Fixing the blocks and configs was so much easier with this basic
infrastructure in place.
2. Our setup is like yours (Macs are so common on scientist desktops). The
difference is I do a lot of development and basic testing on my Mac. I've
figured out how to compile all the software I need with MacPorts. But I
came to EasyBuild because I wanted something multi-platform. (Or more
specifically: I have all this great software running on my laptop now, but
I'm not able to compile it on the super computer where it will need to
run). A couple of comparisons of EB vs. MP:
a) I found understanding EB and writing .eb files significantly less
daunting than writing Portfiles. One problem with Portfiles is they are
all named the same, so it get confusing in your Emacs. EB is also nice
that it's all in Python, I've already answered a lot of questions by
looking through the code.
b) In the past at least, I like the ability of MP to have one Portfile
that can handle more than one version of dependencies, toolchains, etc. I
assume there's already been a discussion of this issue with EB, and would
be interested in hearing any positions on it.
3. Getting EB set up was a royal PITA. Reasons for this:
a) I'm not on a supercomputer and did not already have a module system.
Lmod was highly recommended, so that's the one I wanted to use. But
getting it installed took too much effort, including the fact that it's
written in Lua (why Lua? Could someone please port this to Python?). So I
had to learn all about lua rocks and setting lua environment variables and
various lua modules that had to be added, just for this one program. Ugh.
b) EasyBuild doesn't like it if the standard "python" command brings up
Python3.
see: https://github.com/hpcugent/easybuild-framework/issues/1532
I ultimately solved (a) with an Lmod+EasyBuild bootstrap script, and (b) by
replacing easybuild/bin/eb with my own command (which disables the nice
EasyBuild module functionality). Both scripts attached (see
easybuild_bootstrap and eb, attached).
4. Once I got EB set up, figuring out how to overwrite the existing
EasyBuild installation with one cloned from github was a bit of effort, but
not that hard in the end. Just:
git clone easybuild-xxxx ...
cd easybuild-xxx
export PYTHONUSERBASE=$EB_ROOT/software/EasyBuild/2.5.0
python2.7 setup.py install --user
This is still not a perfect solution because I have to say "python setup.py
install" every time I make a change and want to see if it works. The best
would be a no-compile setup where I can edit .py files in easybuild, try
them out immediately without saying setup, and check them into a repo if
they work out well.
5. As I mentioned before, I'm running with my toolchain provided by
MacPorts. This would not suit the EasyBuild purist. But it is expedient.
The fact is, MacPorts is good at compiling a lot of things for Macs, and I
am obliged to get this stuff built as quickly as possible. I unfortunately
will not be able to debug the EasyBuild GCC on Mac.
Here are the steps I used to make it work:
a. I have a bootstrap script that sets up a user-level MacPorts pretty
easily:
https://github.com/citibob/usermacports
b. I fill it with just the software needed for EasyBuild:
https://github.com/citibob/usermacports/blob/master/setup/mpgompi-4.9.3
c. I set up EasyBuild configs that point into the MacPorts toolchain (see
attached .eb file and tree.py): I set up these files manually, but I
suppose they could be done automatically by inspecting the MacPorts
installation.
This is not ideal, but it gets the job done for now. Some kind of
automation on the EasyBuild peers of MacPorts software would be nice. Of
course, MacPorts software cannot be selected individually, it's like one
giant bundled module. But we're pretending otherwise on the EB side.
6. I'm also considering how I will use EasyBuild with the (CMake-based)
software I'm developing. Suppose I'm working on A and B, and B depends on
A. I want to have source folders open on A and B simultaneously. If I'm
working on B, I want to go to A, edit a file and say "make install," and
then go right back to B. The ideas here are not fully fleshed out yet, but
I think it has something to do with:
a) For each project, I'd write an .eb file with project version
'-devel'. Then B-devel.eb would depend on A-devel.eb
b) I want to use EasyBuild to figure out what modules to load for each
devel build, but little else when you run that .eb file. For example:
i) EB should use a pre-existing project directory (eg:
~/projects/A), instead of creating its own. EB should NOT download a .tar
file, or automatically run configure/cmake.
ii) EB SHOULD be responsible for configuring your project, based
on the contents of the .eb file.
ii) EB SHOULD write a script (ebrun) that loads the modules
required for each project. I would run with no modules loaded, and then
run the commands, for example:
cd ~/projectes/A
mkdir build
cd build
call eb to configure
./ebrun make
./ebrun make install # This installs in the normally EB
repository location, under A-devel
I think that what I want here has something to do with the tree.py script
I'm sending you, and also with devel modules already in EasyBuild. Any
guidance/suggestions on the best way to put this stuff together would be
greatly appreciated.
Thanks,
-- Elizabeth
eb
Description: Binary data
easybuild_bootstrap
Description: Binary data
GCC-4.9.3.eb
Description: Binary data
CMake-3.4.1-GCC-4.9.3.eb
Description: Binary data
""" EasyBuild support for using (already installed/existing) tree off software instead of a full install via EasyBuild. @author Elizabeth Fischer (Columbia University, USA) """ import os import re from easybuild.easyblocks.generic.bundle import Bundle class Tree(Bundle): """ Support for generating a module file for some existing pre-installed tree of software (eg: a MacPorts installation). """ def __init__(self, *args, **kwargs): """Extra initialization: determine system compiler version and prefix.""" super(Tree, self).__init__(*args, **kwargs) def make_installdir(self, dontcreate=None): """Custom implementation of make installdir: do nothing, do not touch system compiler directories and files.""" pass def make_module_step(self, fake=False): """Custom module step for Tree: make 'EBROOT' and 'EBVERSION' reflect actual system compiler version and install path.""" # For module file generation: temporarly set version and # installdir to system compiler values orig_installdir = self.installdir self.installdir = self.cfg['sanity_check_paths']['dirs'][0] # Generate module res = super(Tree, self).make_module_step(fake=fake) # Reset version and installdir to EasyBuild values self.installdir = orig_installdir return res # def permissions_step(self): # """Override: https://github.com/hpcugent/easybuild-framework/blob/541556488193cc917c2478f2134ae1e51bbde7d4/easybuild/framework/easyblock.py""" # pass

