NERSCPowering Scientific Discovery Since 1974

GNU Science Library (GSL)

 

Description

GSL, a numerical library for C and C++ programmers, is available on Hopper, Edison, and Carver, and PDSF.

How to Access GSL

You must use the module utility to access the library on all machines at NERSC.  To load:

module load gsl

To see what environment variables are defined by the library:

module show gsl

Using GSL at NERSC

Below, you can see a sample program that uses GSL.  To compile this program on Carver, use the following:

mpicc  gsl.c -I$GSL_DIR/include -L$GSL_DIR/lib -lgsl -lgslcblas

Note: On  Hopper or Edison if you want to use the gcc compiler and GSL you must swap the modulefiles for the programming environments.  DO NOT invoke gcc directly.  (This means you should use, for example, module swap PrgEnv-pgi PrgEnv-gnu.) On Hopper or Edison, the following is sufficient:

cc gsl.c -I$GSL_DIR/include -L$GSL_DIR/lib -lgsl

GSL Example Code

GSL example program

Documentation

Full documentation is available at GNU.org. For questions on using this software at NERSC contact the consultants via email: consult@nersc.gov

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
GNU Scientific Library carver libraries/ math 1.13 gsl/1.13 2010-06-14 2012-01-13
GNU Scientific Library carver libraries/ math 1.14 gsl/1.14 2012-01-13
GNU Scientific Library carver libraries/ math 1.15 gsl/1.15 2012-01-13
GNU Scientific Library genepool pe_libraries/ math 1.15 gsl/1.15 2012-07-30 2012-08-08
GNU Scientific Library phoebe pe_libraries/ math 1.15 gsl/1.15 2012-07-30 2013-06-26
GNU Scientific Library (GSL) edison libraries/ math 1.15 gsl/1.15 2013-01-02 2013-01-02
GNU Scientific Library (GSL) edison libraries/ math 1.16 gsl/1.16 2013-10-01
GNU Scientific Library (GSL) hopper libraries/ math 1.14 gsl/1.14 2011-03-03 2012-01-13
GNU Scientific Library (GSL) hopper libraries/ math 1.15 gsl/1.15 2012-01-13 2013-06-17
GNU Scientific Library (GSL) hopper libraries/ math 1.16 gsl/1.16 2013-12-13
GSL pdsf libraries/ math 1.3 gsl/1.3 2012-03-12