Fortran code in Scilab

There is an R package n1qn1

n1qn1: Port of the ‘Scilab’ ‘n1qn1’ Module for Unconstrained BFGS Optimization

Provides ‘Scilab’ ‘n1qn1’. This takes more memory than traditional L-BFGS. The n1qn1 routine is useful since it allows prespecification of a Hessian. If the Hessian is near enough the truth in optimization it can speed up the optimization problem. The algorithm is described in the ‘Scilab’ optimization documentation located at <https://www.scilab.org/sites/default/files/optimization_in_scilab.pdf>. This version uses manually modified code from ‘f2c’ to make this a C only binary.

Scilab is on GitHub and GitLab. I wonder which Fortran codes in Scilab are worth porting to modern Fortran. A list of the directories in Scilab with Fortran code is below. n1qn1 is from modules\elementary_functions\src\fortran. Some libraries, such as slicot, slatec, dcdflib, minpack, linpack are imported from other sources and may already have modern Fortran translations. Which ones do not and are worth translating? The same analysis could be done for Octave and R – what Fortran code do they have that is not from a common library and has not been modernized? Scilab, a project from France, has code comments in French. If one translated the code to modern Fortran, one may want to have versions with the original comments and with comments translated to English.

#files #bytes directory
106 2027056 modules\cacsd\src\slicot
58 1269306 modules\differential_equations\src\fortran
87 772545 modules\elementary_functions\src\fortran\slatec
66 426715 modules\optimization\src\fortran
109 300289 modules\elementary_functions\src\fortran
63 266456 modules\statistics\src\dcdflib
10 214846 modules\sparse\src\fortran
39 188022 modules\cacsd\src\fortran
55 170019 modules\polynomials\src\fortran
5 144954 modules\interpolation\src\fortran
17 125554 modules\optimization\src\fortran\minpack
58 116210 modules\signal_processing\src\fortran
57 106140 modules\scicos_blocks\src\fortran
17 81954 modules\elementary_functions\src\fortran\linpack
14 68375 modules\output_stream\src\fortran
9 55384 modules\special_functions\src\fortran
15 33397 modules\randlib\src\fortran
3 30797 modules\linear_algebra\src\fortran
10 24467 modules\core\src\fortran

For Octave it looks the Fortran code is from other libraries:

#files #bytes directory
66 500737 liboctave\external\amos
16 254007 liboctave\external\odepack
28 250008 liboctave\external\daspk
17 168540 liboctave\external\quadpack
32 112703 liboctave\external\slatec-fn
8 104052 liboctave\external\dassl
35 100088 liboctave\external\ranlib
3 78376 liboctave\external\dasrt
15 56040 liboctave\external\slatec-err
18 18828 liboctave\external\blas-xtra
9 7161 liboctave\external\lapack-xtra

For R the unique Fortran codes are here and listed below.

Cubic spline and smooth.spline machinery

  • bsplvd.f

  • bvalue.f

  • bvalus.f

  • qsbart.f

  • sgram.f

  • sinerp.f

  • sslvrg.f

  • stxwx.f

  1. Clustering
    • hclust.f

    • kmns.f

  2. Local smoothing / nonparametric regression
    • loessf.f

    • ppr.f

    • stl.f

  3. Regression diagnostics
    • lminfl.f
  4. Toeplitz linear systems
    • eureka.f
  5. General optimization library
    • portsrc.f