Read Me
This is release 1.0.0 of the Fortran interface
to the GNU Scientific Library.
Although based on version 1.16 of GSL, it maintains backward
compatibility with versions 1.13 to 1.15.
It should also work with future releases apart from missing API mappings.
Please consult the NEWS file for a change log.
While this release supports a large subset of
GSL functionality, there are a number of things missing still:
* for the most part, no generics yet for varying types and kinds
* 1d and 2d vector/matrix API is not explicitly supported, but mapping
routines to Fortran arrays and pointers are available
* no support yet for non-interoperable function and polymorphic
arguments. This will be done once the compilers are ready.
* the test suite is still incomplete
License:
~~~~~~~~
FGSL is released under Version 2 or later of the GPL.
Installation procedure:
~~~~~~~~~~~~~~~~~~~~~~~
(A) prerequisites:
1. An installation of GSL libraries and include files.
Note that newer distributions may put libraries and
includes into different packages e.g., gsl and gsl-devel.
For building FGSL, both must be installed.
2. The ANSI C compiler used to build the GSL installation
3. A Fortran 95 compiler which additionally implements the
following Fortran 2003 features:
- the IMPORT statement
- Interoperability with C (more specifically, the C processor
mentioned in 2. above). The intrinsic ISO_C_BINDING
module and all of its functionality except C_F_PROCPOINTER
is needed. The configure script checks the needed subset
of interoperable intrinsic types.
- INTENT for pointers.
Note that to date, the following compilers have been verified to
correctly build the library and run the test programs:
- g95 0.92. On 64 bit systems, please use a version
from after August 14, 2008, earlier releases have problems
with C interoperable functions returning structures.
- NAG 5.1 build 344 or higher (32 bit). Please perform
export GSL_IEEE_MODE="mask-invalid,mask-underflow,mask-denormalized"
before running the test program, or build with the option
-ieee=full (this was not checked with the 0.9 release).
- NAG 5.2 and higher on 32 and 64 bit systems.
- Intel Fortran 11.1 U5 and later
In particular, the following compilers FAIL to build and/or run FGSL:
- IBM xlf 10.1.0.5 and lower fails to build the library due to
non-implemented character length to array mapping.
10.1.0.6 builds the library, but fails to build any application
using the module due to spurious label duplication errors.
- NAG 5.1 on 64 bit. There is no support for a c_size_t shape array
constructor for c_f_pointer.
- Sun Studio 12U1 lacks support for POINTER intent, and has an
additional bug which still needs to be tracked down.
- Intel ifort versions 10.1, 11.0 and 11.1 up to (I think) U4
had a problem with C interoperable functions returning
structures on 64 bit systems.
As a consequence, the tests poly.exe and array.exe will crash
with a segmentation fault when using these compilers.
- PGI 10.x (x up to 4) has sufficient C interop support to build
FGSL, but has the same issue on 64 bit systems as described above
for the Intel compiler.
- Pathscale 3.2 has too buggy C interop support to build FGSL.
- gfortran 4.3.x does not support complex(c_double).
- gfortran 4.4.1 builds OK, but fails the last montecarlo test,
apparently due to a spurious c_associated() call.
- IBM xlf 11.1 and higher builds the library and the tests.
Some tests fail, apparently due to being miscompiled (illegal
instruction). This requires further investigation.
(B) autoconf setup:
This section applies only if you have downloaded the sourceforge
repository. Use of autoconf version 2.69 or higher and m4 1.4.16 or
higher is recommended. Generate the configure script with
mkdir m4
autoreconf -i
After updating the same repository it may be necessary to issue
autoreconf
(without an additional option)
(C) build procedure:
this has changed due to introduction of an autoconf based system
(thanks to Tom Schoonjans for contributing this)
export FC=<fortran compiler command>
export FCFLAGS=<additional Fortran flags>
export gsl_LIBS=<gsl library link line>
export PKG_CONFIG_PATH=<directory in which gsl.pc resides>
./configure
If you have to explicitly select which Fortran compiler is
supposed to be used, add the following option to the configure script:
FC=<my_fortran_compiler>
Furthermore, the configure script allows the user to enable several
options, such as --prefix=<my_installation_location>
For a list of all available options run:
./configure --help
NOTE: for supporting different compilers with a single GSL
installation it is recommended to specify the following
./configure --prefix=<path to gsl install> \
--libdir=<path to gsl install>/lib/$FC \
--includedir=<path to gsl install>/include/$FC
make
Builds the module information file and static as well
as shared libraries.
Testing can be performed by doing
make check
which runs a number of tests. Please check for failures and
report to the indicated mail address.
For a debug version of the library using a debug build of GSL
is recommended. Furthermore, if the GSL installation contains
shared libraries, you may need add an entry to LD_LIBRARY_PATH
pointing to the lib subdirectory of the GSL installation before
running the tests. If you use GSL static libraries, these
probably require to be built with -fPIC, otherwise libtool
will probably fail to link your executables.
make install
this installs the library as well as the documentation into
/usr/local or, if specified, the prefix path.
make dist (or make distcheck)
Generate distribution tarballs. The latter is preferred (but it
takes much longer), since it will also make sure everything builds
correctly and the examples run, as well as verify if no files are
left after make clean and make uninstall.
(D) usage:
It is recommended that you obtain the necessary flags to compile with FGSL support
through pkg-config:
$F90 -o myprog.exe `pkg-config --cflags fgsl` myprog.f90 \
`pkg-config --libs fgsl`
Alternatively, libtool can also be used to link the executables.
Reporting Bugs etc.
~~~~~~~~~~~~~~~~~~~
Patches and/or bug reports are very welcome and can be directed
to Bader_at_lrz_dot_de
Suggestions for implementations of missing bits will be worked
on as time allows.
Releases:
* 0.5: End of March, 2007 (revision 1636)
* 0.6: End of April, 2007 (revision 1680)
* 0.7: End of July, 2007 (revision 1809)
* 0.8: Early October, 2007 (revision 1940)
* 0.8.1: Early April, 2008 (revision 2282)
* 0.9: End of August, 2008 (revision 2578)
* 0.9.1 Early September, 2009 (revision 3355)
* 0.9.2 September 22, 2009 (revision 3380)
* 0.9.3 May 01, 2010 (revision 4123)
* 0.9.4 May 31, 2011 (revision 5233)
--- Migrated to Sourceforge ---
* 1.0.0: February 11, 2014 (revision 34)