Modules and the module load command are instructed upon how to be used in the Using Modules article found Here. Spack is a package management tool that has simple syntax.
Some packages and modules have what are called dependencies. A dependency is when a package requires the loading of another package in order to work correctly.
Spack greatly simplifies handling dependencies. The loading of a package with the spack load command will also load all of the packages dependencies.
The spack load command uses the following syntax:
$ spack load packagename
Spack list vs Spack find
Spack list works similarly to the
module avail command; however, unlike
spack list shows all the packages available upstream to our own RIT Research Computing Spack. That means, just because it's listed does not mean it will work on our system. Instead, use
spack find, which shows all the packages actually available. Of course if you see a package in
spack list that is not in
spack find, you can ask if it possible we can make it available.
Entering this command will bring up a list of all the available packages that spack could load.
$ spack list
Entering this command will bring up a list of all the available packages that spack can actually load and available to you.
$ spack find
When to use spack or module load
Sometimes it can be unclear whether to load with module or with spack.
For example if you enter the commands module avail, and spack list while on the rc cluster, both return a loadable package of py-torchvision.
Generally speaking, you should always use spack load when possible. This is because you will always get the correct version and it will also handle all dependencies.
If you were to module load py-torchvision, you would have to specify the version, as well as make sure you have the correct version of python.
For most python packages you should use spack load, as it also loads the correct version of python and all other dependencies.
Module Load can be useful when you want a specific version of a package. Spack load will always load the newest version, or the version specified by RC.
If you would like to use an older version of the package for any reason, it may be available in Module avail.
If there are any further questions, or there is an issue with the documentation, please contact firstname.lastname@example.org for additional assistance.