Hello EasyBuilders! fyi. (seen in env. modules mailing list)
Begin forwarded message: > From: Kenneth Hoste <[email protected]> > Date: April 7, 2013 10:56:03 PM GMT+02:00 > To: Fotis Georgatos <[email protected]> > Cc: hpc-sysadmins <[email protected]>, Xavier Besseron > <[email protected]>, <[email protected]> > Subject: Re: [Modules] "flavours": dealing with libraries built against > multiple compilers, MPIs, etc. > > Hi Fotis, > > Very interesting indeed! > > This seems like a nice way to handle the explosion of modules we have going > on via EasyBuild... > > > K. > > > On 07 Apr 2013, at 17:15, Fotis Georgatos wrote: > >> fyi. very interesting... >> >> ---------- Forwarded message ---------- >> From: "Mark Dixon" <[email protected]> >> Date: Apr 5, 2013 3:58 PM >> Subject: [Modules] "flavours": dealing with libraries built against multiple >> compilers, MPIs, etc. >> To: <[email protected]> >> >> Hi, >> >> We have been using modules for around 8 years now (thanks :) and have been >> running an experimental extension on top of it for the past 5 years. This >> has been a great success internally and we would like to share it. I've been >> meaning to do this for quite some time. >> >> The extension is called "flavours" and is designed to give both the end user >> and the sysadmin an easy ride in an environment where multiple builds of the >> same software is required. >> >> e.g. various permutations of the same hdf5 library compiled in both 32-bit >> and 64-bit modes, with various different compilers, and against various >> different MPI libraries. >> >> We offer it under the GNU GPL version 2 or later and hope that it is of >> interest to others. Please see below and the files attached. >> >> Best wishes, >> >> Mark >> >> PS I would be very interested to know if it looks easy or appropriate to add >> the equivalent functionality directly into modulecmd :) >> >> -- >> ----------------------------------------------------------------- >> Mark Dixon Email : [email protected] >> HPC/Grid Systems Support Tel (int): 35429 >> Information Systems Services Tel (ext): +44(0)113 343 5429 >> University of Leeds, LS2 9JT, UK >> ----------------------------------------------------------------- >> >> The problem: >> =========== >> >> Before writing this extension, we used to have lots and lots of modules with >> similar names. An example of such a scheme might be: >> >> $ module avail >> >> ------------------------ /apps/Modules ------------------------- >> gnu/4.7.1 >> intel/12.1.5.339 >> openmpi/1.6.1/32bit/gnu4.7.1 >> openmpi/1.6.1/64bit/gnu4.7.1 >> openmpi/1.6.1/32bit/intel12.1.5.339 >> openmpi/1.6.1/64bit/intel12.1.5.339 >> hdf5/1.8.9/32bit/gnu4.7.1 >> hdf5/1.8.9/64bit/gnu4.7.1 >> hdf5/1.8.9/32bit/gnu4.7.1/openmpi/1.6.1 >> hdf5/1.8.9/64bit/gnu4.7.1/openmpi/1.6.1 >> hdf5/1.8.9/32bit/intel12.1.5.339 >> hdf5/1.8.9/64bit/intel12.1.5.339 >> hdf5/1.8.9/32bit/intel12.1.5.339/openmpi/1.6.1 >> hdf5/1.8.9/64bit/intel12.1.5.339/openmpi/1.6.1 >> >> Unsurprisingly, we had frequent complaints from horribly confused users. >> "module avail" just scared them, so they never quite knew what was >> installed. Over time, as we installed newer compilers and MPI libraries, >> this just got worse. >> >> To get round the problem, we tried various tactics - automatic loading of >> modules, modules that were collections of other modules, multi-level module >> directories, aliases, etc. Again, they all just made things worse. >> >> We firmly believed that we need to present all these alternatives, but in a >> simpler way, to encourage people to at least try different compilers and MPI >> implementations - checking both portability and performance. >> >> But we wanted to keep modules. >> >> >> The solution: >> ============ >> >> Flavours resolves this by allowing interdependency between modules and >> hiding some of the detail, so the above example might collapse to: >> >> $ module avail >> >> ------------ /apps/Modules/developers/architecture ------------- >> bit/32 bit/64 >> >> -------------- /apps/Modules/developers/compilers -------------- >> gnu/4.7.1 intel/12.1.5.339 >> >> -------------- /apps/Modules/developers/libraries -------------- >> openmpi/1.6.1 hdf5/1.8.9 >> >> >> Ideally this capability would be built into the modulecmd program itself. >> However, in order to quickly provide a proof-of-concept, we instead wrote a >> small Tcl library to be called from modulefiles and a small Perl wrapper >> around the vanilla modulecmd C binary. >> >> At its core are alternative, suped-up, "prereq" and "conflict" commands, >> differing from the traditional versions in the following areas: >> >> * The concept of a class that modules can belong to if they provide that >> functionality (e.g. compiler, mpi). >> >> * The concept of optional prerequisites. >> >> * Using "prereq" to automatically generate a "flavour" string, used to find >> the correct build in the filesystem. >> >> * Storing "prereq" information in an environment variable, allowing modules >> to be automatically reloaded if one of their prerequisites are switched or >> unloaded. >> >> The problem for the sysadmin is then reduced to installing (or symlinking) >> compatible builds to the flavour relevant names. We automated the chugging >> through all the permutations (not presented here). >> >> Example of its use: >> >> $ module purge >> $ module load hdf5 >> hdf5/1.8.9 depends on one of the module(s) 'bit' >> $ module load bit/64 >> $ module load hdf5 >> hdf5/1.8.9 depends on one of the module(s) 'gnu intel' >> $ module load intel >> $ module load hdf5 >> >> $ module purge >> $ module load bit/64 gnu/4.7.1 hdf5/1.8.9 >> $ echo $HDF5_HOME >> /apps/developers/libraries/hdf5/1.8.9/1/bit-64-gnu-4.7.1 >> $ module switch gnu intel >> $ echo $HDF5_HOME >> /apps/developers/libraries/hdf5/1.8.9/1/bit-64-intel-12.1.5.339 >> $ module load openmpi >> $ echo $HDF5_HOME >> >> /apps/developers/libraries/hdf5/1.8.9/1/bit-64-intel-12.1.5.339-openmpi-1.6.1 >> >> >> As an exmaple, the hdf5 modulefile looks like this: >> >> #%Module 1.0 >> >> # Initialise "flavours" >> package require flavours >> flavours init >> >> proc ModulesHelp { } { >> puts stderr "File format for storing and managing data >> >> Information: >> Homepage : http://www.hdfgroup.org/HDF5/ >> " >> } >> >> module-whatis "File format for storing and managing data " >> >> # Construct flavour name >> flavours prereq bit >> flavours prereq -class compiler >> flavours prereq -optional -class mpi >> flavours conflict hdf5 >> >> # Declare where the flavours are held >> flavours root /apps/developers/libraries/hdf5/1.8.9 >> flavours revision 1 >> flavours commit >> >> # Set environment variables >> setenv HDF5_HOME [flavours path] >> >> # Prepend to environment variables (paths relative to >> # the directory containing the flavour) >> flavours prepend-path PATH bin >> flavours prepend-path LIBRARY_PATH lib >> flavours prepend-path LD_LIBRARY_PATH lib >> flavours prepend-path CPATH include >> >> # Reload any modules with this as a prerequisite >> flavours cleanup >> ------------------------------------------------------------------------------ >> Minimize network downtime and maximize team effectiveness. >> Reduce network management and security costs.Learn how to hire >> the most talented Cisco Certified professionals. Visit the >> Employer Resources Portal >> http://www.cisco.com/web/learning/employer_resources/index.html >> _______________________________________________ >> Modules-interest mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/modules-interest >> >> <flavours-1.0.0.tar.gz> > -- Drs./Eng. Fotis Georgatos <[email protected]> HPC Systems Engineer, LCSB (University of Luxembourg) L-4362 Esch-sur-Alzette, Campus Belval, avenue des Hauts-Fourneaux 7 Phone: +352 466644 5609

