Skip to content
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

module files : explicit load and mnemonic suffixes #984

Merged
merged 19 commits into from
Jun 27, 2016

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented May 23, 2016

Modifications
  • adds a new keyword load to the spec subsection in modules.yaml
  • adds a new keyword suffixes to the spec subsection in modules.yaml
  • generates module files with explicit module load
  • unit tests for modules.py
Example : explicit load

A configuration file like :

modules:
  tcl:
    %gcc@4.8:
      load:
        - foo/bar
        - baz

will add the following lines to anything compiled with gcc@4.8:

if ![ is-loaded foo/bar ] {
    puts stderr "Autoloading foo/bar"
    module load foo/bar
}

if ![ is-loaded baz ] {
    puts stderr "Autoloading baz"
    module load baz
}

Dotkit will exhibit the same behavior.

Example : mnemonic suffixes

A configuration file like :

modules:
  tcl:
    hdf5:
      suffixes:
        +mpi: parallel

will append to any hdf5 module file the suffix parallel if +mpi in spec, producing a module file name like:

hdf5-1.10.0-gcc-6.1.0-parallel-vhxsri5po6nzynspknbjbo6uot6stcrv

@glennpj This should address the request for features made here, any feedback is welcome

@alalazo alalazo changed the title [WIP] module files : explicit load from configuration files [WIP] module files : explicit load and mnemonic suffixes May 24, 2016
@glennpj
Copy link
Contributor

glennpj commented May 27, 2016

@alalazo Sorry for the delayed response. I have not had a chance to test yet but this looks good and addresses the use case I brought up. Are the suffixes meant to help with making the module names more friendly for humans?

Thanks.

@glennpj
Copy link
Contributor

glennpj commented May 27, 2016

@alalazo One potential use case I see for suffixes would be to assign a name to a set of constraints/specs that are common across packages. For example, a package built with the combination of gcc/openmpi/openblas, with respective versions, could be assigned a suffix that would represent that set. That would allow the module names to be parsable by humans while maintaining the hash for guaranteed uniqueness and a check on the reproducibility of the build.

@glennpj
Copy link
Contributor

glennpj commented May 28, 2016

@alalazo I tested this and it seems to work fine.

Thanks.

@alalazo alalazo changed the title [WIP] module files : explicit load and mnemonic suffixes module files : explicit load and mnemonic suffixes Jun 4, 2016
@alalazo
Copy link
Member Author

alalazo commented Jun 4, 2016

@tgamblin If you have time to have a look, I think this is ready to be merged

@alalazo
Copy link
Member Author

alalazo commented Jun 4, 2016

@glennpj Sorry for the late reply. For suffixes : your guess is 100% correct. I put that feature in because of the many requests I had internally for some mnemonic suffix to distinguish different variants of a package directly from the module file name.

@gartung
Copy link
Member

gartung commented Jun 6, 2016

@alalazo This is just what I was looking for. We have a package called ROOT that has a builtin C++ parser Cling (based on Clang) that calls gcc to determine where the system headers are located. With this option I can make gcc load when root is loaded.

@alalazo
Copy link
Member Author

alalazo commented Jun 6, 2016

@gartung Glad I have been of help!

@robertdfrench
Copy link
Contributor

@alalazo @tgamblin This would be very valuable for us, namely for distinguishing between the umpteen different petsc variations.

@alalazo
Copy link
Member Author

alalazo commented Jun 11, 2016

@tgamblin @trws another one ready to be reviewed 😄

@tgamblin
Copy link
Member

@alalazo We finally got #561 in, but it seems to conflict -- can you update and I'll review this?

…/module_file_explicit_load

Conflicts:
	lib/spack/spack/test/modules.py
@alalazo
Copy link
Member Author

alalazo commented Jun 18, 2016

@tgamblin done

@alalazo
Copy link
Member Author

alalazo commented Jun 25, 2016

@tgamblin The PR is ready to be reviewed

@tgamblin
Copy link
Member

@alalazo: merged! sorry for the delay.

@tgamblin tgamblin merged commit 73213ac into spack:develop Jun 27, 2016
@alalazo alalazo deleted the module_file_explicit_load branch June 27, 2016 06:37
olupton pushed a commit to olupton/spack that referenced this pull request Feb 7, 2022
* Update dependencies for Circuit Indexer in SpatialIndex

Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants