Questions tagged [environment-modules]

The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles.

Typically users initialize their environment when they log in by setting environment information for every application they will reference during the session. The Environment Modules package is a tool that simplify shell initialization and lets users easily modify their environment during the session with modulefiles.

Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles.

Modules can be loaded and unloaded dynamically and atomically, in an clean fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, tcsh, fish, as well as some scripting languages such as perl, ruby, tcl and python.

Modules are useful in managing different versions of applications. Modules can also be bundled into metamodules that will load an entire suite of different applications.

80 questions
2
votes
2 answers

How can I load a module from inside a bash script?

I'm trying to get a script running. Essentially I need to load some modules and then execute a python script. So something like this... #!/usr/bin/env bash module use /PATH/TO/MODULEFILE module load MY_MODULE python my_script.py The problem that…
user3047641
  • 149
  • 1
  • 2
  • 12
2
votes
1 answer

Good alternative to environment modules for windows?

In the past I have used environment modules extensively in Unix based systems. The tool proved very usefull since we had many different projects each of them using a potentially different set of tools. I am now however stuck with a windows machine…
viterbi
  • 419
  • 5
  • 11
2
votes
2 answers

How to remove 'Process finished' message from make-process or start-process in elisp code

I made a small elisp code which handles environment module (http://modules.sourceforge.net/) as follows: (defun Modules-module (command) "foo" (interactive (list (read-string "Module cmd: " nil nil))) ;; clear cmd buffer, log buffer is…
Seong
  • 556
  • 4
  • 18
2
votes
1 answer

What are module-info mode switch statements?

The package Environment Modules defines the module-info mode command. The man page for modulefile lists the possible modes as: load, remove, display, help, whatis, switch, switch1, switch2, or switch3. What are the multiple switch statements?
Pete
  • 10,310
  • 7
  • 53
  • 59
1
vote
3 answers

Starting module shell command from python subprocess module

I'm trying to run vnc server, but in order to do it first I need to run 'module load vnc'. If I call which module in loaded bash shell then the command in not found is the PATH but in the same time it's available. It looks like the command is…
yart
  • 7,515
  • 12
  • 37
  • 37
1
vote
1 answer

Overwrite and restore environment variables in bash with environment modules

An environment variable that is overwritten in an environment module with the setenv command is unset when unloading the module. In the documentation it is stated that environment variables can be restored, but no method is provided. I tried using…
gkaf
  • 80
  • 6
1
vote
1 answer

Numpy not having access to its libs HPC environment-module

I've installed numpy using sudo pip install -I --prefix=/soft/bin/system/python/3.7.4 numpy I can now import numpy but numpy has access to none of its attributes. I dont know what to set in path/config to make it working. I tried while loading the…
ul.Duc
  • 31
  • 6
1
vote
0 answers

Setting the MODULE_PATH variable for default env of spack

Lately, the mechanism used by Spack to manage the modules (I refer to the Environment Modules and to LMod) changed a little bit to allow a better integration with the spack environments (see pull request #23703). Unfortunately, this also affect the…
SteP
  • 262
  • 1
  • 2
  • 9
1
vote
0 answers

Usage case for conda vs. linux environment modules

I am familiarizing myself with conda and linux environment modules (lems henceforth), largely for the purpose of enabling reproducible research. I know that conda is more geared towards setting up user-level environments compatible across many…
Vince
  • 3,325
  • 2
  • 23
  • 41
1
vote
4 answers

VSCode remote development server prerequisites on HPC server managed via environment modules

I have installed the VSCode remote development extension pack, and I am trying to connect to the remote host via the Remote-SSH: Connect to Host command, however it fails to automatically install the code server with the message: The remote host may…
Ben Farmer
  • 2,387
  • 1
  • 25
  • 44
1
vote
1 answer

combining pkg-config with module environment

This question may not make much sense if my understanding of both the pkg-config and environment modules is somewhat incorrect, but I'll ask anyways as I could not find anything specific on this topic. There might be an entirely better solution…
tom
  • 361
  • 3
  • 11
1
vote
2 answers

Module files don't return non-zero exit codes to bash if the module fails to load. How can you make a conditional in bash with that?

I'm new here, so I apologize in advance if I'm not following the protocol, but the message said to ask a new question. I had asked an earlier question: How can a bash script try to load one module file and if that fails, load another?, but it is not…
Reid
  • 85
  • 8
1
vote
1 answer

Environment Modules: can is-loaded look for a range of modulefile-names?

I'm getting started writing Environment Modules. I'm currently writing modulefiles that load the appropriate environment variables to run different versions of a program and want to display a warning if multiple modulefiles for the same program are…
julian19
  • 13
  • 2
1
vote
1 answer

Is loading/unloading of environment modules commutative / associative?

I'm using environment modules: http://modules.sourceforge.net/ Are the load/unload commands commutative and associative? Or, is it possible that, e.g. if I do load X load Y The result will be different than if I do load Y followed by load X? Can I…
capybaralet
  • 1,757
  • 3
  • 21
  • 31
1
vote
1 answer

Docker, CentOS: How to automate loading of modules with environment-modules, in bash shell?

I would like to automate the loading of modules within a CentOS Docker container. Normally, I would put the commands in the .bashrc / .bash_profile, but I can't seem to get this to work. Here is the start of my current Dockerfile: FROM…
Chris Sewell
  • 679
  • 1
  • 7
  • 19