Skip to content

openfoam: broken modules (with zsh) #13504

@davydden

Description

@davydden

Looks like something is wrong with modules from openfoam. If I generate module files, spack shows an error for openfoam package:

==> Warning: Quotes in command arguments can confuse scripts like configure.
  The following arguments may cause problems when executed:
      source /spack/opt/spack/linux-centos7-skylake_avx512/gcc-9.2.0/openfoam-1906-gf5sdxweeqsj2awgyc5bu2uy5grudvmf/etc/bashrc &> /dev/null && python -c "import os, json; print(json.dumps(dict(os.environ)))"
  Quotes aren't needed because spack doesn't use a shell.
  Consider removing them
==> OpenFOAM bashrc env: /spack/opt/spack/linux-centos7-skylake_avx512/gcc-9.2.0/openfoam-1906-gf5sdxweeqsj2awgyc5bu2uy5grudvmf/etc/bashrc
==> Warning: Quotes in command arguments can confuse scripts like configure.
  The following arguments may cause problems when executed:
      source /spack/opt/spack/linux-centos7-skylake_avx512/gcc-9.2.0/openfoam-1906-gf5sdxweeqsj2awgyc5bu2uy5grudvmf/etc/bashrc &> /dev/null && python -c "import os, json; print(json.dumps(dict(os.environ)))"
  Quotes aren't needed because spack doesn't use a shell.
  Consider removing them
==> OpenFOAM bashrc env: /spack/opt/spack/linux-centos7-skylake_avx512/gcc-9.2.0/openfoam-1906-gf5sdxweeqsj2awgyc5bu2uy5grudvmf/etc/bashrc

when loading a module, I get from lmod:

invalid command
name ""

or from environment modules:

Module ERROR: invalid command name ""

This has to do with

prepend-path BASH_FUNC__module_raw() "() {  unset _mlshdbg;
...blahblahblah...
}"

If I manually delete it, I can at least load modules and get environment variables set correctly.

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions