General Information
Home page | Versions | Module dependencies | |
---|---|---|---|
Compiler | |||
www.gnu.org/software/gsl | 2.1 | GCC/4.9.3-2.25 |
|
2.3 | GCC/5.4.0-2.26 |
||
2.3 | GCC/6.3.0-2.27 |
The GNU Scientific Library (GSL) is a free numerical software package for C and C++ covering a range of subject areas including:
- BLAS (level 1, 2, and 3) and linear algebra routines
- Fast Fourier transform (FFT) functions
- Numerical integration
- Random number generation function
Usage on Idun
Load one of the GSL and the corresponding GCC modules to use the GSL library on Idun, e.g.:
$ module load GCC/5.4.0-2.26 GSL/2.3
The library header files are installed in a subdirectory gsl
of the main installation directory that must prefix preprocessing include statements, see e.g. the example program blas_test.c
below. The header files define functions to have extern "C"
linkage when included in C++ programs allowing functions to be called directly from C++. The GSL library is available in both shared and static versions.
Example program
Compile and link the program using the GCC compiler, adding:
$ gcc blas_test.c -lgsl -lgslcblas