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

lmod change family arch dir to arch dir #32960

Closed
wants to merge 1 commit into from
Closed

lmod change family arch dir to arch dir #32960

wants to merge 1 commit into from

Conversation

simonLeary42
Copy link
Contributor

With lmod I get name conflicts for modules in different architecture because the directory structure is family based.

==> Error: Name clashes detected in module files:

file: /modules/spack-0.18.1/share/spack/lmod/linux-ubuntu20.04-x86_64/Core/zlib/1.2.12.lua
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64_v3
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64_v4

With this little change it makes directories for each generic architecture.

With lmod I get name conflicts for modules in different architecture because the directory structure is family based.
```
==> Error: Name clashes detected in module files:

file: /modules/spack-0.18.1/share/spack/lmod/linux-ubuntu20.04-x86_64/Core/zlib/1.2.12.lua
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64_v3
spec: zlib@1.2.12%gcc@9.4.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-x86_64_v4
```
With this little change it makes directories for each generic architecture.
@spackbot-app spackbot-app bot added core PR affects Spack core functionality modules labels Oct 3, 2022
Copy link
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't allow people to mix software built for different targets, while you can already do what you ask for by configuring different roots in the modules.yaml, see https://spack.readthedocs.io/en/latest/module_file_support.html#changing-the-modules-root

@alalazo alalazo self-assigned this Oct 6, 2022
@simonLeary42
Copy link
Contributor Author

That would result in a structure like this:

$spack/share/spack/modules/x86_64/linux-ubuntu-20.04/x86_64
$spack/share/spack/modules/x86_64_v3/linux-ubuntu-20.04/x86_64
$spack/share/spack/modules/x86_64_v4/linux-ubuntu-20.04/x86_64

which is rather ugly.

Why would anyone want to mix targets in a single directory? Can they mix like that in TCL?

@bernhardkaindl
Copy link
Contributor

Closing due to lack of response on the review. A different way of doing this has been suggested.
Please reopen if needed still.

@simonLeary42
Copy link
Contributor Author

arch_folder = str(self.spec.architecture)

The TCL modules use the arch dir, so shouldn't the Lmod modules be consistent?

@simonLeary42
Copy link
Contributor Author

@alalazo can we revisit this?

@simonLeary42
Copy link
Contributor Author

One could mix modules from different targets by simply setting modules:default:arch_folder=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core PR affects Spack core functionality modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants