Hi Alan, Thanks for the suggestion. I will definitely give it a try.
Have a great weekend! Davide From: [email protected] <[email protected]> On Behalf Of Alan O'Cais Sent: Friday, July 2, 2021 1:12 PM To: easybuild <[email protected]> Cc: Davide Vanzo <[email protected]> Subject: [EXTERNAL] Re: [easybuild] EB configuration - Resolve dependencies in separate stack You can solve this by using an alias for the `eb` command, see https://gist.github.com/ocaisa/a24059bbb08b040d7710cd9184c7e95e#file-userinstallations_easybuild-lua-L49<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Focaisa%2Fa24059bbb08b040d7710cd9184c7e95e%23file-userinstallations_easybuild-lua-L49&data=04%7C01%7Cdavide.vanzo%40microsoft.com%7C6724d7292a274fae476908d93d84f3df%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637608463519684144%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8CC9XXvKgthdIoo9TVCaNWfH7dNaq5RbYJ3LaY8UWm4%3D&reserved=0> for an example that is pretty similar for what you are trying to achieve. Alan On Fri, 2 Jul 2021 at 20:06, Kenneth Hoste <[email protected]<mailto:[email protected]>> wrote: On 02/07/2021 19:38, Davide Vanzo wrote: > Hello EasyBuilders! > > I am trying to configure EasyBuild to allow users to install software > locally while using the existing cluster-wide stack (distributed via > CVMFS) for dependencies. > > Here is the relevant EB configuration on the clients: > > allow-loaded-modules (F) = EasyBuild > > detect-loaded-modules (F) = purge > > envvars-user-modules (F) = USER_STACK_ROOT, HOME > > installpath (F) = /home/hpcadmin/EasyBuild > > minimal-toolchains (F) = True > > module-depends-on (F) = True > > module-naming-scheme (F) = HierarchicalMNS > > prefix (F) = /home/hpcadmin/EasyBuild > > robot-paths (F) = > <cvmfs_stack_root>/EasyBuild/custom_easyconfigs, > <cvmfs_stack_root>/EasyBuild/software/EasyBuild/4.4.0/easybuild/easyconfigs > > rpath (F) = True > > subdir-user-modules (F) = EasyBuild/modules > > The cluster-wide stack root path is indicated above as: cvmfs_stack_root > > When a user wants to build and locally install a piece of software and > the toolchain is already available in the cluster-wide stack, the > expectation is that EB pulls the existing dependencies from the stack > and only builds/installs locally the missing dependencies and finally > the desired software. The generated local module will then appear in > Lmod thanks to the subdir-user-modules option. > > When EasyBuild tries to resolve the dependencies, it pulls the list of > installed modules from: > > * the paths in MODULEPATH > * the <installpath>/<subdir_modules> as specified in the EB configuration > > In my case this correspond to the following paths: > > * <cvmfs_stack_root>/EasyBuild/modules/all/Core > * /home/hpcadmin/EasyBuild/modules/all > > The problem with this is that EB only considers stack modules in the > Core directory and not on the rest of the hierarchical tree (Compiler, > MPI), causing the entire toolchain to be re-built locally. > > The solution would be to add <cvmfs_stack_root>/EasyBuild/modules/all to > MODULEPATH at build time. > > What am I missing? Nothing, that's the correct approach currently. EasyBuild relies on what we call the "full" module name (Core/GCC/9.3.0 for example, or Compiler/GCC/9.3.0/OpenMPI/4.0.2, where the "short" (user-facing) module names are GCC/9.3.0 and OpenMPI/4.0.2) to check whether modules are already installed in a hierarchy, and there's a good reason for it. It may be possible to avoid this, but this requires a bit of work to be done in framework, since we probably rely on this in a number of places... We discussed this recently in the EasyBuild conf call, and we agreed that a short-term easy solution could be to let EasyBuild automatically add <prefix> to $MODULEPATH when it notices <prefix>/Core is in there. See also https://github.com/easybuilders/easybuild-framework/issues/3703<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feasybuilders%2Feasybuild-framework%2Fissues%2F3703&data=04%7C01%7Cdavide.vanzo%40microsoft.com%7C6724d7292a274fae476908d93d84f3df%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637608463519694140%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DHHzffyZtSvH60v3koiVdFpfv3qNASvBCBqHlWNZBCc%3D&reserved=0> regards, Kenneth > > Davide > -- Dr. Alan O'Cais E-CAM Software Manager Juelich Supercomputing Centre Forschungszentrum Juelich GmbH 52425 Juelich, Germany Phone: +49 2461 61 5213 Fax: +49 2461 61 6656 E-mail: [email protected]<mailto:[email protected]> WWW: http://www.fz-juelich.de/ias/jsc/EN<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.fz-juelich.de%2Fias%2Fjsc%2FEN&data=04%7C01%7Cdavide.vanzo%40microsoft.com%7C6724d7292a274fae476908d93d84f3df%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637608463519704134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dtuG4Mbdp7d%2BisKTJ9LvuDP9WijToOw7S5Ucj57rJxA%3D&reserved=0> ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Volker Rieke Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Dr. Astrid Lambrecht, Prof. Dr. Frauke Melchior ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------

