user2377038
user2377038

Reputation: 21

How to set the path for module command?

This is my .modulepath file, the last two lines are the paths where I have my modules mounted from another hard drive. Even though I added these lines module avail command does not fetch me any of the modules in those folders. If anyone could help it would be of great help.

#
#  @(#)$Id: 38aa24cc33a5f54a93781d63005a084f74418022 $
#  Module version 3.2.10
#  init/.modulespath.  Generated from .modulespath.in by configure.
#
#  Modulepath initial setup
#  ========================
#
#  This file defines the initial setup for the module files search path.
#  Comments may be added anywhere, which begin on # and continue until the
#     end of the line
#  Each line containing a single path will be added to the MODULEPATH
#     environment variable. You may add as many as you want - just
#     limited by the maximum variable size of your shell.
#
/etc/environment-modules/modules
#/usr/share/modules/versions                            # location of     version files
#/usr/Modules/$MODULE_VERSION/modulefiles       # Module pkg modulefiles   (if versioning)
#/usr/Modules/modulefiles       # Module pkg modulefiles (if no versioning)
#/usr/share/modules/modulefiles                         # General module files
#/usr/Modules/3.2.10/your_contribs                      # Edit for your requirements
/opt/apps/modulefiles/Core                              
/opt/apps/modulefiles/Compiler                          

I have even tried using module use /opt/apps/modulesfiles/Core

user@user-N501VW:~$ module use /opt/apps/modulefiles/Core
user@user-N501VW:~$ $MODULEPATH
bash: /opt/apps/modulefiles/Core:/etc/environment-modules/modules:/usr/share/modules/versions:/usr/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles: No such file or directory


akhila@akhila-N501VW:~$ module avail

------------------------------------------------------------- /usr/share/modules/versions --------------------------------------------------------------
3.2.10

------------------------------------------------------------ /usr/share/modules/modulefiles ------------------------------------------------------------
dot         module-git  module-info modules     null        use.own

Upvotes: 1

Views: 11287

Answers (1)

Xavier Delaruelle
Xavier Delaruelle

Reputation: 848

Even though your specific modulepaths are correctly set in MODULEPATH environment variable, module avail does not return any modulefiles for these directories. It means module has not found a file in these directories that is a modulefile.

So I suggest you to:

  • check if your mountpoint is correctly mounted
  • verify that the files in the directories are modulefiles compatible with the module command you use (on the module command version you use, the content of a modulefile should start with the #%Module magic cookie)

Upvotes: 2

Related Questions