hopper/myzlib> pwd /global/project/projectdirs/mpccc/usg/modulefiles/hopper/myzlib hopper/myzlib> ls -al total 640 drwxrwsr-x 2 yunhe usg 131072 2013-03-24 11:14 . drwxrwsr-x 11 wyang usg 131072 2013-03-24 11:16 .. -rw-rw-r-- 1 yunhe usg 1656 2013-03-24 11:14 1.2.7 hopper/myzlib> more 1.2.7 #%Module1.0 ## ## Required internal variables set name zlib set version 1.2.7 set root /usr/common/usg/$name/$version ## List conflicting modules here conflict $name ## List prerequisite modules here set fullname zlib set externalurl http://www.zlib.net set nerscurl https://www.nersc.gov/users/software/programming-libraries/io-libraries/ set description "ZLIB is a general purpose data compression library." ## Required for "module help ..." proc ModulesHelp { } { global description nerscurl externalurl puts stderr "Description - $description" puts stderr "NERSC Docs - $nerscurl" puts stderr "Other Docs - $externalurl" } ## Required for "module display ..." and SWDB module-whatis "$description" ## Software-specific settings exported to user environment set LCcompiler pgi if { [ info exists env(PE_ENV) ] } { set compiler $env(PE_ENV) } else { set compiler 0 } if { $compiler == "0" } { set LCcompiler gnu } elseif { $compiler == "PGI" } { set LCcompiler pgi } elseif { $compiler == "PATHSCALE" } { set LCcompiler pathscale } elseif { $compiler == "GNU" } { set LCcompiler gnu } elseif { $compiler == "CRAY" } { set LCcompiler cray } elseif { $compiler == "INTEL" } { set LCcompiler intel } setenv ZLIB_VERSION $version setenv ZLIB_DIR $root/$LCcompiler setenv ZLIB_POST_LINK_OPTS "-L$root/$LCcompiler/lib -Wl,-rpath=$root/$LCcompiler/lib" setenv ZLIB_INCLUDE_OPTS -I$root/$LCcompiler/include prepend-path LD_LIBRARY_PATH $root/$LCcompiler/lib prepend-path MANPATH $root/$LCcompiler/share/man prepend-path PE_PRODUCT_LIST ZLIB