| 96 | | |
| | 97 | For example, [http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ SuperLU] is not available on the main module. |
| | 98 | |
| | 99 | Download the source codes, and compile and install it, for example, on '''/lustre/project/dpg/local/SuperLU_5.2.1''' |
| | 100 | |
| | 101 | Create a [http://modules.sourceforge.net/man/modulefile.html module-definition] file, for example, as '''/lustre/project/dpg/local/modulefiles/SuperLU/5.2.1''' where the directory name '''SuperLU''' is the software name without version number, |
| | 102 | and the file name, '''5.2.1''' is the version number. The file looks like this: |
| | 103 | {{{ |
| | 104 | #%Module1.0 -*- tcl -*- |
| | 105 | ## |
| | 106 | ## modulefile |
| | 107 | ## |
| | 108 | |
| | 109 | module-whatis "a general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations." |
| | 110 | |
| | 111 | set curMod [module-info name] |
| | 112 | if { [ module-info mode load ] } { |
| | 113 | system "/bin/logger -p local0.info 'module_load: $curMod.'" |
| | 114 | } |
| | 115 | |
| | 116 | conflict SuperLU/4.3 |
| | 117 | |
| | 118 | module load intel-psxe/2016 |
| | 119 | set INSTALL_ROOT /lustre/project/dpg/local/SuperLU_5.2.1 |
| | 120 | |
| | 121 | prepend-path PATH $INSTALL_ROOT/bin |
| | 122 | prepend-path LD_LIBRARY_PATH $INSTALL_ROOT/lib |
| | 123 | prepend-path LIBRARY_PATH $INSTALL_ROOT/lib |
| | 124 | setenv SLU_DIR $INSTALL_ROOT |
| | 125 | }}} |
| | 126 | |
| | 127 | Edit your '''.modulerc''' that looks like this: |
| | 128 | |
| | 129 | {{{ |
| | 130 | #%Module |
| | 131 | module use /lustre/project/dpg/local/modulefiles |
| | 132 | }}} |
| | 133 | |
| | 134 | Now your new module will be listed and you can load it with the usual commands. |
| | 135 | {{{ |
| | 136 | [tulaneID@cypress1 ~]$ module avail |
| | 137 | |
| | 138 | ------------------------------------------------ /lustre/project/dpg/local/modulefiles ------------------------------------------------ |
| | 139 | SuperLU/5.2.1 |
| | 140 | -------------------------------------------------------- /cm/local/modulefiles -------------------------------------------------------- |
| | 141 | cluster-tools/7.0 ipmitool/1.8.13 openldap |
| | 142 | : |
| | 143 | : |
| | 144 | }}} |