Skip to content

User Created Modules

This is for advanced usage, since creating your own module files for software access is usually not necessary.

If you develop or install your own software, you might consider writing a modulefile to help manage your environment variables. HPCC presently uses the LMOD module package, developed at TACC. The following is a typical module file with comments. Name your files with a .lua extension.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- -*- lua -*- 
 help( 
 [[ 
 Describe your software here. 
 ]]) 

 -- comments are prefaced with two dashes 

 whatis("Description: Name of software") 
 whatis("URL:  www.ucc.org ") 

 local install_path = "/mnt/home/ongbw/opt/mysoftware" 

 -- set an environment variable 
 setenv("MYSOFTWARE_HOME",install_path) 

 -- add to PATH variable 
 prepend_path('PATH', pathJoin(install_path,"bin")) 

 -- add Library Paths 
 prepend_path('LD_LIBRARY_PATH',pathJoin(install_path,"lib")) 
 prepend_path('LIBRARY_PATH',pathJoin(install_path,"lib")) 

 -- add include paths 
 prepend_path('INCLUDE',pathJoin(install_path,"include"))