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 despite extensive searching.
I'm not quite sure what I should and any help would be appreciated (it might help to know that the makefile I'm working with uses csh while my default shell is bash). Thanks!
The module command accepts command line switches as its first parameter. These may be used to control output format of all information displayed and the module behavior in case of locating and interpreting module files. All switches may be entered either in short or long notation.
module load [modulefile] Loads module or specifies which dependencies have not been loaded. module unload [modulefile] Unloads specified module from environment.
Linux modules are lumps of code that can be dynamically linked into the kernel at any point after the system has booted. They can be unlinked from the kernel and removed when they are no longer needed. Mostly Linux kernel modules are device drivers, pseudo-device drivers such as network drivers, or file-systems.
I tried to reproduce it and it turns out that for me sourcing
source /etc/profile.d/modules.sh
in th .sh
script helps for bash
and similar. For csh
and tcsh
, you have to add
source /etc/profile.d/modules.csh
to the script. Note, that this line must come first and then the
module load foo
line.
I think that you have to put this in your script to define the module command:
module () {
eval `/usr/bin/modulecmd bash $*`
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With