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
25
votes
5 answers

Loading environment modules within a python script

Is there a way for a python script to load and use environment modules? os.system('module load xxx') doesn't work since it executes them in a subshell (at least, I think that's what's happening).
marshall.ward
  • 6,758
  • 8
  • 35
  • 50
20
votes
5 answers

module: command not found

I'm attempting to load several modules for building a library on Linux but am told that the command 'module' doesn't exist. I've Googled around and discovered that the solution was to source a directory called "module" which I am unable to locate…
Sam
  • 433
  • 2
  • 4
  • 7
6
votes
2 answers

module load command in linux bash script

I need to execute Python script in HPC cluster. Unfortunately, the default python version is just 2.6.6 and there is no numpy and scipy. I can load these modules in command line #module load /home/hw1u16/modules/2.7.3 and module load…
skwang
  • 61
  • 1
  • 1
  • 2
6
votes
2 answers

How to use environment modules in a ssh command line?

The Environment Modules package is used for dynamic modification of a user's environment (debian package environment-modules). I would like to use module directly from a ssh command line. The purpose is to be able to execute commands on different…
jyvet
  • 2,021
  • 15
  • 22
5
votes
4 answers

Snakemake: I keep getting The 'conda' command is not available in $PATH. when running on SGE cluster

I'm tearing my hair out here, hopefully someone can help me. Running snakemake 4.8.0 I have a snakemake pipeline, which I run with two conda envs and --use-conda and it works fine when run as a standalone pipeline. However, when I run on our…
4
votes
1 answer

Module load intel (ERROR:105: Unable to locate a modulefile for 'intel')

I am trying to use environment-modules in Ubuntu I could successfully install the module package but when I tried to use module load intel, it gave me the following error: ERROR:105: Unable to locate a modulefile for 'intel' I used module avail…
user3452351
  • 103
  • 1
  • 2
  • 8
4
votes
3 answers

How can I use the Environment Modules system in Perl?

How can one use the Environment Modules system* in Perl? Running system("load module "); does not work, presumably because it forks to another environment. * Not to be confused with Perl modules. According to the Wikipedia entry: The…
gwo
  • 77
  • 5
3
votes
0 answers

Which conda environments can be `--stack`ed upon and which cannot?

Here is my logic: when you conda activate --stack ..., the only thing that is left over from the stacked-upon environment is its entry in PATH. Therefore, if a conda environment can function normally with only it's entry in PATH, then it doesn't…
Simon
  • 51
  • 5
3
votes
1 answer

How to create modulefile for linux Environment Modules?

How to create modulefile on centos7 for any software (ex. for python)? path of modulefile is /etc/modulefile I have two version of python ( python2.7 and python3.7). I Create a directory for python inside modulefiles /etc/modulefiles/python , then…
Sam.
  • 59
  • 7
3
votes
1 answer

Linux Environment Modules or Conda Environment

I looked for the difference between the Linux Environment Modules or Conda Environment, but I am not clear how are these different. Basically, I want to install OpenMPI and Mpich both in my Ubuntu, but they share the several compiler wrappers. To be…
Porcupine
  • 5,885
  • 2
  • 19
  • 28
2
votes
2 answers

Modules not loading when executed via a script (Bash)

I'm writing a bash script to perform some commands on files. In order to do that, I need to load the modules which contain these commands. Now I can do these from the command line just fine, but I wanted to implement a check in a script to see if…
Diyon335
  • 27
  • 9
2
votes
2 answers

modulefile - module unload is not unsetting environment variables

I have a very simple modulefile: #%Module1.0##################################################################### puts stderr "Loading personal environment" proc ModulesHelp { } { puts stderr "\tLoads personal environment" puts stderr…
stephenmm
  • 2,640
  • 3
  • 30
  • 48
2
votes
0 answers

Lmod bash completion for the command

Is there a way to achieve a "secure" autocompletion for the command loaded from module? I mean, I load a binary "dothis" and I would like to run "complete -F .... dothis" in module file so users have complete setup. Sourcing a completion file is not…
guma44
  • 23
  • 3
2
votes
1 answer

Set the default version in modulefiles

Given a directory containing modulefiles for several versions, how does one set a default so that the user can type module load random_tool without having to specify the version number? % ls random_tool 1.2 2.3 3.0
Ray Salemi
  • 5,247
  • 4
  • 30
  • 63
2
votes
1 answer

create environment module to work with opencv-python on hpc nodes

I have a task to train neural networks using tensorflow and opencv-python on HPC nodes via Torque. I have made privatemodule with python virtualenv and installed tensorflow and opencv-python modules in it. In the node I can load my python module.…
Trigremm
  • 61
  • 7
1
2 3 4 5 6