Mark Jensen

Invoke Theory. Apply Boundry Conditions

  • Lab Notebook
  • home
  • blog
  • About
  • Art
  • Events
  • References
  • MHCPC
Courtesy of Ralf Pfeifer (2012). Animation of the Newton-Raphson Method of finding zeros of a real function. Newton’s method is implemented in the GNU Scientific Library as gsl_root_fdfsolver_newton (Galassi et al. 2009).

Courtesy of Ralf Pfeifer (2012). Animation of the Newton-Raphson Method of finding zeros of a real function. Newton’s method is implemented in the GNU Scientific Library as gsl_root_fdfsolver_newton (Galassi et al. 2009).

GNU Scientific Library Installation

April 06, 2020 by Mark Jensen in Software Tools

Installation of GNU Scientific Library under Pengwin

Impetus

The GNU Scientific Library (GSL) (Free Software Foundation 2024) is a requirement for the Dieharder Random Number Test Suite (Brown, Eddelbuettel, and Bauer 2020). I already have the WLS Pengwin running under Windows 10 so it seems natural to install GSL under Pengwin as well.

You can download the source and compile the library, but being inherently lazy, I chose to install the binaries using the Debian APT package installer.

apt-get install gsl-bin

For my machine, the binary libraries are loaded into

/usr/lib/x86_64-linux-gnu/

Since I wanted to compile programs using the GSL I also downloaded the header files, “.h”:

apt-get install libgsl0-dev

Again for my machine the headers were loaded into

/usr/include/gsl

The next step is to load the sample test code to calculate the Bessel function, J0(5).

cat >j0.c << '/*'
#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>
int
main (void)
{
  double x = 5.0;
  double y = gsl_sf_bessel_J0 (x);
  printf ("J0(%g) = %.18e\n", x, y);
  return 0;
}
/*

Now compile j0 into an executable:

gcc j0.c -o j0 -lgsl -lgslcblas -lm

Run the sample code:

./j0

yields:

J0(5) = -1.775967713143382642e-01

This matches the expected result (Galassi et al. 2009, p. 5).

Thus, the GNU Scientific Library installation in Penwin is complete.

Reference

Brown, Robert G., Dirk Eddelbuettel, and David Bauer. 2020. Dieharder. Education. Robert G. Brown’s General Tools. March 6, 2020. https://webhome.phy.duke.edu/~rgb/General/dieharder.php.

Free Software Foundation. 2024. GSL - GNU Scientific Library. GNU. C, C++, Fortran,. Boston: Free Software Foundation. https://www.gnu.org/software/gsl/.

Galassi, Mark, Jim Davies, James Theiler, Brian Gough, Gerard Jungman, Patrick Alken, Michael Booth, and Fabrice Rossi. 2009. GNU Scientific Library Reference Manual. 3rd ed. Bristol, UK: Network Theory Ltd. https://www.gnu.org/software/gsl/doc/html/index.html.

Kosonen, Lauri. 2011. Full Featured Double Rainbow at Savonlinna. Image/jpeg. Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=File:Full_featured_double_rainbow_at_Savonlinna_1000px.jpg&oldid=449964351.

Pfeifer, Ralf. 2012. Newton-Raphson Animation. Image/gif. Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/wiki/File:NewtonIteration_Ani.gif.

April 06, 2020 /Mark Jensen
Penwin, GSL, Linux
Software Tools
$\setCounter{0}$
  • Newer
  • Older
blog RSS

Powered by Squarespace