Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
About
People
Publications
Teaching
Resources
Research Blog
Wiki Functions
Recent changes
Help
Licensing
Project page
Discussion
Edit
View history
Editing
CommunityData:Hyak software installation
(section)
From CommunityData
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Installing and making available a custom module ==== {{note}} If you are using <code>screen</code> to run and manage your builds, keep in mind that <code>screen</code> [https://superuser.com/a/235773 drops a few environment variables] such as <code>LD_LIBRARY_PATH</code>, which may mess up your build process. You should check that all the relevant environment variables are set before starting your build. The first step toward installing and making available a custom module (in this case, [https://www.jedsoft.org/releases/slang/ slang 2.3.2]) is to spin up the build node, download slang, compile it with a specific prefix, and install it. <source lang='bash'> $ build_machine $ wget https://www.jedsoft.org/releases/slang/slang-2.3.2.tar.bz2 $ tar jxvf slang-2.3.2.tar.bz2 $ cd slang-2.3.2 $ ./configure --prefix=/gscratch/comdata/modules/sw/slang/2.3.2 $ make $ make install </source> The <code>--prefix</code> option to <code>./configure</code> tells the build scripts that slang is going to be installed in <code>/gscratch/comdata/modules/sw/R/3.5.0</code>. This follows a convention that we picked—software in modules should go into <code>/gscratch/comdata/modules/sw/{SOFTWARE_NAME}/{SOFTWARE_VERSION}</code>. The <code>--prefix</code> option is the most important flag for <code>./configure</code>—any other flag or option will be specific to the software being installed. The second step is to write a <code>modulefile</code>. This contains the metadata about our module. Edit the file <code>/gscratch/comdata/modules/modulefiles/slang/2.3.2</code> to contain the following <source lang='tcl'> #%Module1.0#################################################################### ## proc ModulesHelp { } { puts stderr "\tModule providing slang 2.3.2" } module-whatis "Module providing slang 2.3.2" prepend-path PATH /gscratch/comdata/modules/sw/slang/2.3.2/bin prepend-path MANPATH /gscratch/comdata/modules/sw/slang/2.3.2/share/man prepend-path LD_LIBRARY_PATH /gscratch/comdata/modules/sw/slang/2.3.2/lib prepend-path PKG_CONFIG_PATH /gscratch/comdata/modules/sw/slang/2.3.2/lib/pkgconfig </source> Note that the filename follows a similar convention as <code>--prefix</code> earlier (<code>/gscratch/comdata/modules/modulefiles/{SOFTWARE_NAME}/{SOFTWARE_VERSION}</code>). This file sets up the <code>PATH</code>, <code>MANPATH</code>, <code>LD_LIBRARY_PATH</code>, and <code>PKG_CONFIG_PATH</code>, environment variables appropriately so that the specified version of slang can be accessed and run as needed. There are many more directives that can go into the <code>modulefile</code>—see <code>man modulefile</code> for details on those directives. If your program is a simple binary, you will likely only need to append to the <code>PATH</code>, and <code>MANPATH</code> environment variables. Once this file is written out, the <code>module avail</code> command should list <code>slang/2.3.2</code> as an available module. This is because the module system is set up to look inside <code>/gscratch/comdata/modules/modulefiles</code> for module files, thanks to the <code>MODULEPATH</code> variable that is set through <code>.bashrc</code>. The command <code>module load slang/2.3.2</code> should make slang available and ready for use. To avoid running <code>module load slang/2.3.2</code> whenever you log in, you can add the command at the end of your <code>.bashrc</code> file (after the section that sets <code>MODULEPATH</code>).
Summary:
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see
CommunityData:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information