Child pages
  • Hyak_modules
Skip to end of metadata
Go to start of metadata

Hyak is a shared supercomputer. Different users may use different versions of some software. For example, there are many different versions of R available on hyak. Hence, hyak has the module command which allows you to use a specific version of some software.

Below command will load the module for R version 3.2.

module load r_3.2.0

After above command, you can issue commands such as R, Rscript etc.

Below command shows all the available modules:

module avail

Below command shows your currently loaded modules:

module list

Below command unloads the module for R version 3.2.

module unload r_3.2.0

Note that the modules starting with  the prefix contrib/ are created by Hyak users and are not maintained by the Hyak team. These modules could be changed or even deleted by  the user who owns the module.

For advanced users only:

Examples of module files:

On ikt, you can see module files at:

/sw/Modules/modulefiles

On mox, you can see module files at:

/sw/modules-1.775/modulefiles

How to create your own modules:

Suppose version 1.0 of your executable myprogram is in the directory /sw/contrib/myprogramdir/1.0.

You can create your own modules for use by your group xyz:

(1) mkdir /sw/modules-1.775/modulefiles/contrib/myprogram_xyz

(2) cd /sw/modules-1.775/modulefiles/contrib/myprogram_xyz

(3) edit a file with the name 1.0

(4) Put below  contents in the file from step 3.

#%Module1.0#############################
proc ModulesHelp { } {
        puts stderr "\tAdds myprogram 1.0 to the PATH."
}

module-whatis "Adds myprogram 1.0 to the PATH."

prepend-path    PATH            /sw/contrib/myprogramdir/1.0
######################################

Using your own module:

After doing the steps in the previous section, you can issue below command to load your module:

(1) Issue below command to verify that your module contrib/myprogram_xyz/1.0 shows up:

         module avail contrib

(2) Issue below command to load your module:

         module load contrib/myprogram_xyz/1.0

(3) Issue below command to verify that your module is loaded:

         module list

(4) Issue below command to verify that you can run myprogram:

         myprogram

(5) Issue below command to unload your module:

         module unload contrib/myprogram_xyz/1.0


The below links have more information:

https://modules.readthedocs.io/en/stable/module.html

https://modules.readthedocs.io/en/stable/modulefile.html

  • No labels