Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents


On O2, users can compile and install software in their /home directories or shared directories (e.g. /n/groups , /n/dataX ) where you have write permission. In general, during the configure step, --prefix can be set to a directory where you have write access to install the software to that directory. Software installs via binary files do not need to be compiled, only uncompressed.

...


If the file is just .gz, unpack:


Code Block
mfk8@compute-a-01-01:~$ gunzip yourgzipfile.gz

This creates a directory for the software with its contents.

3) Change to the directory created during the unpack, view README or install guide. This may indicate what compilers/libraries are needed to install. Check out module spider for available compilers and libraries.

...

Code Block
mfk8@compute-a-01-01:~/newsoftwarefolder$ module load gcc/6.2.0
mfk8@compute-a-01-01:~/newsoftwarefolder$ ./configure --prefix=/home/mfk8/newsoftwarefolder


5) Usually run make then make install (check README/install notes)

...

Once you have your program installed/the information on how it was installed, you need to create a modulefile for this program. A typical modulefile for a program on the O2 application stack will look something like this (using GCC 6.2.0 as an example), written inĀ Lua:

Code Block
linenumberstrue
help([[
For detailed instructions, go to:

    https://gcc.gnu.org/
]])

whatis("Version: 6.2.0")
whatis("Keywords: compiler, gcc")
whatis("URL: https://gcc.gnu.org/")
whatis("Description: GCC stands for \"GNU Compiler Collection\". GCC is an integrated distribution of compilers for several major programming languages. These languages currently include C, C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go.")

prepend_path( "PATH",            "/n/app/gcc/6.2.0/bin")
prepend_path( "LD_LIBRARY_PATH", "/n/app/gcc/6.2.0/lib")
prepend_path( "LD_LIBRARY_PATH", "/n/app/gcc/6.2.0/lib64")
prepend_path( "MANPATH",         "/n/app/gcc/6.2.0/share/man")

add_property("state", "experimental")

family("gcc")

-- set up MODULEPATH for packages built by this compiler
local mroot = os.getenv("MODULEPATH_ROOT")
local mdir = pathJoin(mroot, "Compiler/gcc", "6.2.0")
prepend_path("MODULEPATH", mdir)

...