A couple modules.yaml questions

58 views
Skip to first unread message

Rob Groner

unread,
Oct 30, 2020, 12:25:47 PM10/30/20
to Spack
  1. Is there a means for specifying a default module?  I know you can do it with the "spack module lmod setdefault" command, but that means having to execute that command after every module tree rebuild.  It would be nice if that wasn't necessary and I could simply specify a default in the modules.yaml file.
  2. I've learned how to "rename" modules using projections in the modules.yaml file.  For instance, instead of "intel-mpi", I'm able to specify it as "impi" which is what our users are used to.  However, I'm now facing a situation where "netlib-lapack" is taking the place of both "lapack" and "blas" on our system.  So, I'd LIKE to rename netlib-lapack as BOTH "lapack/{version}" and "blas/{version}".  I tried setting both of those projections in modules.yaml and it just used the last one instead of both.
    projections:
      all:     '{name}/{version}'
      intel-mpi: 'impi/{version}'
      netlib-lapack: 'blas/{version}'
      netlib-lapack: 'lapack/{version}'

Thanks for the helps.

Rob


Massimiliano Culpo

unread,
Nov 3, 2020, 3:34:38 AM11/3/20
to Spack
Hi Rob,

I am afraid that at the moment we don't support both 1. and 2. For 1. , as you noticed, we provide an explicit command to set default modules - so at least there's that. 

For 2. can you open a feature request on Github? Off the top of my head I think we just need to allow lists as values for the projections dictionary, but it's worth checking out other uses of projections with filesystem views to understand if there are problematic edge cases.

Thanks,
Massimiliano

Richard Young

unread,
Nov 3, 2020, 5:43:51 PM11/3/20
to Massimiliano Culpo, sp...@googlegroups.com

Massimiliano

I am a bit late to the conversion, so this might already be covered.

 

I run two module systems on our hpc, spack and a standard module system that came with the system. In both cases, if I create a .version file in a module directory containing the default module, example below for intel-tbb, I simply have to run “module load intel-tbb” and it will load this version by default.

 

#%Module1.0

set ModulesVersion 2020.3-gcc6.5.0-z7izbv2

 

regards

---------------------------------------------------------------------

Richard A. Young

HPC Systems Engineer | Office of Research Development | Q338A

T: +61 7 4631 5557  |  M: +61 437 544 370

E: Richar...@usq.edu.au  

---------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/0be9150c-f4e8-4132-b308-b06fd81d72f9n%40googlegroups.com.

__________________________________________________________________
This email (including any attached files) is confidential and is 
for the intended recipient(s) only. If you received this email by 
mistake, please, as a courtesy, tell the sender, then delete this 
email.
The views and opinions are the originator's and do not necessarily 
reflect those of the University of Southern Queensland. Although 
all reasonable precautions were taken to ensure that this email 
contained no viruses at the time it was sent we accept no 
liability for any losses arising from its receipt.
The University of Southern Queensland is a registered provider 
of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)

Groner, Rob

unread,
Nov 3, 2020, 5:56:07 PM11/3/20
to Richard Young, Massimiliano Culpo, sp...@googlegroups.com
Richard,

Thanks for the hint.  That would indeed allow for setting a default module.  My problem is that when I build modules via spack, I'm pretty much always telling it to --delete-tree in the process, so everything in the modules directory gets wiped out each time.  I'd have to create the .version file each time. I'm trying to get it where I don't have to combine the spack module rebuild with manual actions to "make it work".  I was hoping there was a simple setting on the modules.yaml file that would let me specify the default and then spack, which is already rebuilding all the modules, could take care of that too.

For now, if I have to do it manually anyway, I'll just use the "spack module lmod setdefault" command.

Rob





From: sp...@googlegroups.com <sp...@googlegroups.com> on behalf of Richard Young <Richar...@usq.edu.au>
Sent: Tuesday, November 3, 2020 5:43 PM
To: Massimiliano Culpo <massimili...@googlemail.com>; sp...@googlegroups.com <sp...@googlegroups.com>
Subject: RE: [spack] Re: A couple modules.yaml questions
 
__________________________________________________________________
email.
You received this message because you are subscribed to a topic in the Google Groups "Spack" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spack/Cur7LEtiNas/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/SYBPR01MB48732E854B44EE5E80F289F1CE110%40SYBPR01MB4873.ausprd01.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages