GSL 2.4

Basic information

Tested on (Requirements)

  • OS base: CentOS (x86_64) \(\boldsymbol{\ge}\) 6.6 (Rocks 6.2)
  • Dependencies:
    • GNU GCC >= 5.4.0

Installation

  1. Download the desired version of the software (Source code - tar.gz)

    cd /home/mgomezzul/apps/gsl/src
    wget http://mirror.cedia.org.ec/gnu/gsl/gsl-2.4.tar.gz
    tar -zxvf gsl-2.4.tar.gz
    cd gsl-2.4
    
  2. After unpacking GSL, continue with the following steps for configuration and compilation:

    module load gcc/5.4.0
    ./configure --prefix=/share/apps/gsl/2.4/gcc-5.4.0 --build=x86_64-redhat-linux --enable-shared --enable-static 2>&1 | tee gsl-config.log
    make 2>&1 | tee make-gsl.log
    
  3. Installation of compiled binaries

    sudo mkdir -p /share/apps/gsl/2.4/gcc-5.4.0
    sudo chown -R mgomezzul.apolo /share/apps/gsl/2.4/gcc-5.4.0
    make install 2>&1 | tee make-install-gsl.log
    make installcheck 2>&1 | tee make-check-gsl.log
    sudo chown -R root.root /share/apps/gsl/2.4/gcc-5.4.0
    

Module

#%Module1.0####################################################################
##
## module load gsl/2.4_gcc-5.4.0
##
## /share/apps/modules/gsl/2.4_gcc-5.4.0
##
## Written by Mateo Gómez Zuluaga
##

proc ModulesHelp {} {
    global version modroot
    puts stderr "Sets the environment for using GSL 2.4\
        \nin the shared directory /share/apps/gsl/2.4/gcc-5.4.0\
        \nbuilded with gcc-5.4.0."
}

module-whatis "(Name________) gsl"
module-whatis "(Version_____) 2.4"
module-whatis "(Compilers___) gcc-5.4.0"
module-whatis "(System______) x86_64-redhat-linux"
module-whatis "(Libraries___) "

# for Tcl script use only
set         topdir        /share/apps/gsl/2.4/gcc-5.4.0
set         version       2.4
set         sys           x86_64-redhat-linux

conflict gsl
module load gcc/5.4.0


prepend-path    PATH                    $topdir/bin

prepend-path    LD_LIBRARY_PATH         $topdir/lib
prepend-path    LIBRARY_PATH            $topdir/lib
prepend-path    LD_RUN_PATH             $topdir/lib

prepend-path    C_INCLUDE_PATH          $topdir/include
prepend-path    CXX_INCLLUDE_PATH       $topdir/include
prepend-path    CPLUS_INCLUDE_PATH      $topdir/include

prepend-path    PKG_CONFIG_PATH         $topdir/lib/pkgconfig

prepend-path    MANPATH                 $topdir/share/man

Use

module load gsl/2.4_gcc-5.4.0
gcc -I/share/apps/gsl/2.4/gcc-5.4.0/include -L/share/apps/gsl/2.4/gcc-5.4.0/lib main.c -o main -lgsl -lgslcblas -lm

Author

  • Mateo Gómez Zuluaga