Installing software in your home directory: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 42: Line 42:
<!--T:20-->
<!--T:20-->
Loading a library [[Using modules | module]] will set environment variables <tt>CPATH</tt> and <tt>LIBRARY_PATH</tt> pointing to the location of the library itself and its header files. These environment variables are supported by most compilers (for example [https://software.intel.com/en-us/node/522775 Intel] and [https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html GCC]), which will automatically try the directories listed in those environment variables during compilation and linking phases. This feature allows you you to easily link against the library without specifying its location explicitly by passing the <tt>-I</tt> and <tt>-L</tt> options to the compiler. If your make- or config- file calls for an explicit location of the library to pass to the compiler via <tt>-I</tt> and <tt>-L</tt>, you can usually omit the location of the library and leave these lines blank in the make- or config- file.
Loading a library [[Using modules | module]] will set environment variables <tt>CPATH</tt> and <tt>LIBRARY_PATH</tt> pointing to the location of the library itself and its header files. These environment variables are supported by most compilers (for example [https://software.intel.com/en-us/node/522775 Intel] and [https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html GCC]), which will automatically try the directories listed in those environment variables during compilation and linking phases. This feature allows you you to easily link against the library without specifying its location explicitly by passing the <tt>-I</tt> and <tt>-L</tt> options to the compiler. If your make- or config- file calls for an explicit location of the library to pass to the compiler via <tt>-I</tt> and <tt>-L</tt>, you can usually omit the location of the library and leave these lines blank in the make- or config- file.
In some cases, however, particularly with <tt>cmake</tt>, it may be necessary to specify the location of the library provided via a modulefile explicitly. The preferred and the most robust way to do so is to utilize EasyBuild <tt>EBROOT</tt> environment variables instead of manually typing paths. This will allow to easily switch between toolchains without modifying the compilation instructions, and will also prevent linking mismatched libraries by accident. For example, if you need to specify the location of the GSL library, your 'cmake' option might look like <tt>-DGSL_DIR=$EBROOTGSL</tt>. The <tt>EBROOT</tt> environment variables adhere to the same construction pattern: <tt>EBROOT</tt> followed by the name of the package, for example <tt>EBROOTGCC</tt>.


== BLAS/LAPACK and MKL == <!--T:10-->
== BLAS/LAPACK and MKL == <!--T:10-->
cc_staff
318

edits

Navigation menu