| | 118 | === Specifying the default version of an app (optional) === |
| | 119 | |
| | 120 | When you load an app into your environment with the {{{module load}}} command without specifying explicitly which version you want to use, Lmod will load the highest version number. This is usually fine, but if you installed a new version that is not yet well tested, you may want to explicitly configure an older version as the default. This can simply be accomplished by creating a **relative** symlink named default. Our module files are located at {{{/apps/modules/}}}. For example let's look at our NGS_DNA analysis pipeline. It is part of the ''bio'' collection of apps, so the the module files are in: |
| | 121 | {{{ |
| | 122 | $> ls -ahl /apps/modules/bio/NGS_DNA/ |
| | 123 | total 20K |
| | 124 | drwxrwsr-x 2 umcg-gvdvries umcg-depad 4.0K Nov 12 15:28 . |
| | 125 | drwxrwsr-x 64 umcg-pneerincx umcg-depad 4.0K Nov 18 17:43 .. |
| | 126 | lrwxrwxrwx 1 umcg-rkanninga umcg-depad 71 Aug 25 10:52 3.0.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 -> /apps/modules/all/NGS_DNA/3.0.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 |
| | 127 | lrwxrwxrwx 1 umcg-rkanninga umcg-depad 71 Nov 4 09:04 3.1.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 -> /apps/modules/all/NGS_DNA/3.1.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 |
| | 128 | lrwxrwxrwx 1 umcg-rkanninga umcg-depad 71 Nov 12 15:28 3.2.1-Molgenis-Compute-v15.11.1-Java-1.8.0_45 -> /apps/modules/all/NGS_DNA/3.2.1-Molgenis-Compute-v15.11.1-Java-1.8.0_45 |
| | 129 | lrwxrwxrwx 1 umcg-pneerincx umcg-depad 45 Sep 24 16:22 default -> 3.1.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 |
| | 130 | }}} |
| | 131 | Note that all module files for all apps are in {{{/apps/modules/all/}}} and we only see symlinks in {{{/apps/modules/bio/}}}. Version 3.2.1 is the latest, but 3.1.2 has been designated as default using a symlink. The symlink must be a relative one pointing to file or another symlink in the same directory. We can check with if the symlink was recognised using: |
| | 132 | {{{ |
| | 133 | $> module avail NGS_DNA |
| | 134 | |
| | 135 | -------------------------- /apps/modules/bio -------------------------- |
| | 136 | NGS_DNA/3.0.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 |
| | 137 | NGS_DNA/3.1.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 (D) |
| | 138 | NGS_DNA/3.2.1-Molgenis-Compute-v15.11.1-Java-1.8.0_45 |
| | 139 | |
| | 140 | Where: |
| | 141 | (D): Default Module |
| | 142 | |
| | 143 | $> module load NGS_DNA |
| | 144 | $> module list |
| | 145 | |
| | 146 | Currently Loaded Modules: |
| | 147 | 1) Java/1.7.0_80 |
| | 148 | 2) Molgenis-Compute/v15.04.1-Java-1.7.0_80 |
| | 149 | 3) NGS_DNA/3.1.2-Molgenis-Compute-v15.04.1-Java-1.7.0_80 |
| | 150 | |
| | 151 | }}} |
| | 152 | |
| | 153 | === Deprecating a previously installed older version of an app === |
| | 154 | |
| | 155 | You can inform users that (a certain version of) an app is deprecated and will be removed in the near future by creating a custom message when an app is added to the environment with {{{module load}}}. Add your custom message to {{{/apps/modules/modules.admin}}}. For example with this modules.admin: |
| | 156 | {{{ |
| | 157 | # |
| | 158 | # The Lmod admin file consists of "key: value" pairs terminated with a blank line: |
| | 159 | # |
| | 160 | # moduleName/version: message |
| | 161 | # <blank line> |
| | 162 | # |
| | 163 | # Or |
| | 164 | # |
| | 165 | # Full/PATH/to/Modulefile: message |
| | 166 | # <blank line> |
| | 167 | # |
| | 168 | # The message can be as many lines as you like and must be terminated with a blank line. |
| | 169 | # |
| | 170 | # Currently used by picard/1.102-Java-1.7.0_80 |
| | 171 | R/3.1.2-goolf-1.7.20: Deprecated incomplete installation. Will be removed in the near future. |
| | 172 | }}} |
| | 173 | loading this specific version of ''R'' will now result in: |
| | 174 | {{{ |
| | 175 | $> module load R/3.1.2-goolf-1.7.20 |
| | 176 | -------------------------------------------------------------------------- |
| | 177 | There are messages associated with the following module(s): |
| | 178 | -------------------------------------------------------------------------- |
| | 179 | R/3.1.2-goolf-1.7.20: |
| | 180 | Deprecated incomplete installation. Will be removed in the near future. |
| | 181 | -------------------------------------------------------------------------- |
| | 182 | }}} |
| | 183 | |