FGSL - Fortran Interface to GSL 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the release 0.8.1 for the Fortran interface 
to the GNU scientific library. It is based on version 1.10 of GSL, 
but should also work with later releases apart from missing API
calls.

Changes since 0.8:
~~~~~~~~~~~~~~~~~~
* bug fixes
* improved 32 vs. 64 bit handling (--bits switch for configure)
* OS X on Intel support

Fixes since first beta and new features:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* added string constants describing version and GSL base
* added new features from GSL 1.9 and 1.10 as far as deemed
  necessary for FGSL coverage.

Fixes since second alpha and new features:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* augmented error treatment
* additional compilers added to configure script
* more fgsl_sizeof specifics
* extended (but not finished) manual
* testing much extended and many bugs/missing symbols fixed:
  - special functions
  - permutations and combinations
  - integration
  - permutations and combinations
  - sorting
  - random numbers (partially)
  - histograms (partially)

Fixes since first alpha and new features:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* statistics functions not exported, fixed
* changed permutation/combination data access to return
  a fortran pointer to enable referencing original data
* added further examples, nearly all from C are now mirrored
* added fgsl_sizeof generic, often needed for API calls with
  C polymorphic arguments
* the build process has been improved

*********************************************************************************

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
* no support for linear algebra and FFT since these are covered
  by LAPACK, BLAS and FFTW, respectively
* 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
* the build process needs further refinement

Nothing is *guaranteed* to work at this point. Depending
on feedback and other considerations, the API for additional 
calls implemented within FGSL may change without notice up to 
the final production release.


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 
 2. The ANSI C compiler used to build the GSL installation
 3. A Fortran 95 compiler which additionally implements the
    following Fortran 2003 features:
    - IMPORT
    - 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


Note that to date, the following compilers have been verified to 
correctly build the library and run the test programs:

    - g95 0.91 (on 64 bit systems, please use a version
      from after April 26, 2007, earlier releases have problems
      with c_funloc).
    - 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
    - Intel ifort version 10.0, subrelease 23 or higher 
    - gfortran 4.3 prereleases from at least September 14, 2007
      (one test may still fail due to a bug in the I/O part of the RTL).
    - IBM 11.0 builds the library and the tests in the tests subdirectory
      correctly in 32 and 64 bit mode. It fails to build test_fgsl.exe.

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. This may actually not be required by 
      the standard. 
    - Sun Studio 12 (May 07) has no c_null_funptr and other problems.
    - PGI 7.0 has initial C interop support, but insufficient by far to build
      FGSL. The same applies to 7.1 
    - Pathscale has no C interop support as of release 3.0 or 3.1.
      The 3.2 (pre)releases have not been tested.
    - Intel 10.1 up to 10.1.14 on Mac OS X has a bug in the libraries, 
      missing the symbols for c_null_ptr and c_null_funptr. This is
      targeted to be fixed in a future release.

(B) build procedure:

export FFLAGS=<suitable Fortran flags>
./configure [--prefix <inst_path>] [--gsl <gsl_inst_path>] \
            [--f90 <f90_compiler] [--bits <32|64>] 
make
make install


    Testing can be performed by doing
make test
    which should produce a number of lines "OK: All tests passed".

(C) usage:

With F90 denoting the Fortran compiler and GSL_INST_PATH the GSL installation
path, and assuming GSL_INST_PATH was also chosen as installation prefix for
FGSL:

$F90 -o myprog.exe -I$GSL_INST_PATH/include/$F90 myprog.f90 \
     -L$GSL_INST_PATH/lib -lfgsl_${F90}.a -lgsl -lgslcblas



Reporting Bugs etc.
~~~~~~~~~~~~~~~~~~~

Patches and/or bug reports are very welcome and should be directed
to Bader@lrz.de

Suggestions for implementations of missing bits will be worked
on by me 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: ???
  * 1.0: ???
  

