Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
f2cl
f2cl
Commits
8b81a6f0
Commit
8b81a6f0
authored
Mar 30, 2017
by
Raymond Toy
Browse files
Merge branch 'asdf3' into 'master'
Make F2CL work on ASDF 3.0 to 3.2 Closes
#1
See merge request
!2
parents
a0352cc7
b2c434bd
Changes
16
Hide whitespace changes
Inline
Side-by-side
f2cl-asdf.asd
0 → 100644
View file @
8b81a6f0
;;; -*- Mode: lisp -*-
;; asdf file for f2cl asdf support
(
defsystem
"f2cl-asdf"
:description
"ASDF support for F2CL"
:components
((
:file
"src/f2cl-asdf"
)))
f2cl.asd
View file @
8b81a6f0
;;; -*- Mode: lisp -*-
;; f2cl asd file
(
defclass
cl-source-file.l
(
cl-source-file
)
((
type
:initform
"l"
))
(
:documentation
"Component class for a Common Lisp source file using type \"l\""
))
(
defsystem
f2cl
(
defsystem
"f2cl"
:description
"F2CL: Fortran to Lisp converter"
:defsystem-depends-on
(
"f2cl-asdf"
)
:components
((
:module
"src"
:default-component-class
cl-source-file.l
:default-component-class
:
cl-source-file.l
:serial
t
:components
((
:file
"f2cl-asdf"
)
(
:file
"f2cl0"
)
((
:file
"f2cl0"
)
(
:file
"f2cl1"
)
(
:file
"f2cl2"
)
(
:file
"f2cl3"
)
...
...
@@ -24,4 +20,3 @@
#+
cmu
(
:file
"f2cl8"
)
(
:file
"macros"
:depends-on
(
"f2cl0"
))))))
packages/blas-complex.asd
View file @
8b81a6f0
...
...
@@ -7,6 +7,7 @@
(
defsystem
"blas-complex"
:description
"BLAS routines for complex double-float matrices"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:array-type
:array
:relaxed-array-decls
t
)
:depends-on
(
"blas-real"
)
:components
...
...
packages/blas-hompack.asd
View file @
8b81a6f0
...
...
@@ -8,6 +8,7 @@
(
defsystem
"blas-hompack"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:array-type
:array
:relaxed-array-decls
nil
)
:depends-on
(
"blas-package"
)
:pathname
"blas"
...
...
packages/blas-real.asd
View file @
8b81a6f0
...
...
@@ -7,6 +7,7 @@
(
defsystem
"blas-real"
:description
"BLAS routines for real double-float matrices"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:relaxed-array-decls
t
:array-type
:array
)
:depends-on
(
"blas-hompack"
)
:components
...
...
packages/colnew.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"colnew"
:description
"F2CL conversion of COLNEW: Solution of boundary-value problems for ODEs"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:components
((
:module
package
...
...
@@ -18,8 +19,7 @@
(
:module
"colnew"
:depends-on
(
"package"
)
:components
(
;; Linpack routines needed by colnew
(
;; Linpack routines needed by colnew
(
:file
"dgesl"
:depends-on
(
"daxpy"
"ddot"
))
(
:file
"dgefa"
...
...
@@ -72,14 +72,15 @@
:depends-on
(
"subfor"
"subbak"
))
(
:file
"subfor"
)
(
:file
"subbak"
))))
:in-order-to
((
test-op
(
test-op
"colnew
-
test-1"
"colnew
-
test-2"
"colnew
-
test-3"
))))
:in-order-to
((
test-op
(
test-op
"colnew
/
test-1"
"colnew
/
test-2"
"colnew
/
test-3"
))))
;; Test problem 1 from TOMS 569.
;;
;; Run (*main*). Appears to work since the error tolerance is satisfied.
(
defsystem
"colnew
-
test-1"
(
defsystem
"colnew
/
test-1"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
...
...
@@ -97,8 +98,9 @@
;; Test problem 2 from TOMS 569. Appears to work.
(
defsystem
"colnew
-
test-2"
(
defsystem
"colnew
/
test-2"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
...
...
@@ -117,8 +119,9 @@
;; Test problem 3 from TOMS 569.
(
defsystem
"colnew
-
test-3"
(
defsystem
"colnew
/
test-3"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
...
...
packages/fishpack.asd
View file @
8b81a6f0
...
...
@@ -12,6 +12,7 @@
(
defsystem
"fishpack"
:description
"F2CL conversion of FISHPACK: Solution of separable elliptic PDEs"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:components
((
:module
"package"
...
...
@@ -120,6 +121,7 @@
;; Works
(
defsystem
"fishpack-test-hwscrt"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -132,6 +134,7 @@
;; Works
(
defsystem
"fishpack-test-hwscyl"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -144,6 +147,7 @@
;; Works
(
defsystem
"fishpack-test-hwsplr"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -156,6 +160,7 @@
;; Works
(
defsystem
"fishpack-test-hwsssp"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -168,6 +173,7 @@
;; Works
(
defsystem
"fishpack-test-hwscsp"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -180,6 +186,7 @@
;; Works
(
defsystem
"fishpack-test-hstcrt"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -192,6 +199,7 @@
;; Works
(
defsystem
"fishpack-test-hstplr"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -204,6 +212,7 @@
;; Works
(
defsystem
"fishpack-test-hstcyl"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -216,6 +225,7 @@
;; Works
(
defsystem
"fishpack-test-hstssp"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -230,6 +240,7 @@
;; Works
(
defsystem
"fishpack-test-hstcsp"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
@@ -242,6 +253,7 @@
;; Works
(
defsystem
"fishpack-test-sepx4"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"fishpack"
)
:components
...
...
packages/hompack.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"hompack"
:description
"F2CL conversion of HOMPACK: Solution of non-linear systems of equations by homotopy methods."
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"HOMPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
:relaxed-array-decls
t
)
:depends-on
(
"blas-hompack"
)
:components
...
...
@@ -94,6 +95,7 @@
;; Results are identical.
(
defsystem
"hompack/test-mainf"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"HOMPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
:relaxed-array-decls
t
)
:depends-on
(
"hompack"
)
:components
((
:file
"hompack/mainf"
:f2cl-options
(
:declare-common
t
)))
...
...
@@ -110,6 +112,7 @@
(
defsystem
"hompack/test-mainp"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"HOMPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
:relaxed-array-decls
t
)
:depends-on
(
"hompack"
)
:components
((
:file
"hompack/mainp"
:f2cl-options
(
:declare-common
t
)))
...
...
@@ -119,6 +122,7 @@
(
defsystem
"hompack/test-mains"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"HOMPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
:relaxed-array-decls
t
)
:depends-on
(
"hompack"
)
:components
((
:file
"hompack/mains"
:f2cl-options
(
:declare-common
t
)))
...
...
packages/lapack.asd
View file @
8b81a6f0
...
...
@@ -7,6 +7,7 @@
(
defsystem
"lapack/real"
:description
"LAPACK routines for real double-float matrices"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"LAPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:depends-on
(
"blas-real"
"lapack/package"
)
:components
...
...
@@ -201,6 +202,7 @@
(
defsystem
"lapack/complex"
:description
"LAPACK routines for complex double-float matrices"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"LAPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:depends-on
(
"blas-complex"
"lapack/real"
)
:components
...
...
packages/minpack.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"minpack"
:description
"F2CL conversion of MINPACK: Solutions to non-linear equations and least-squares problems"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"MINPACK"
:keep-lisp-file
t
:array-slicing
t
:array-type
:array
:relaxed-array-decls
nil
)
:components
((
:cl-source-file
"minpack/package"
)
...
...
@@ -49,6 +50,7 @@
(
defsystem
"minpack-tests-lmdif"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"MINPACK"
:keep-lisp-file
t
:array-slicing
t
:array-type
:array
:relaxed-array-decls
nil
)
:pathname
"minpack/"
:depends-on
(
"minpack"
)
...
...
@@ -76,6 +78,7 @@
(
defsystem
"minpack-tests-hybrd"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"MINPACK"
:keep-lisp-file
t
:array-slicing
t
:array-type
:array
:relaxed-array-decls
nil
)
:pathname
"minpack/"
:depends-on
(
"minpack"
)
...
...
packages/odepack.asd
View file @
8b81a6f0
...
...
@@ -7,6 +7,7 @@
(
defsystem
"odepack"
:description
"F2CL conversion of ODEPACK: Initial value solver for ODEs"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -166,6 +167,7 @@
(
defsystem
"odepack/blas-util"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/fortran/"
...
...
@@ -206,6 +208,7 @@
(
defsystem
"odepack/lsode"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/fortran/"
...
...
@@ -234,6 +237,7 @@
(
defsystem
"odepack/lsoda"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/fortran"
...
...
@@ -266,6 +270,7 @@
(
defsystem
"odepack/lsodar"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/fortran"
...
...
@@ -315,6 +320,7 @@
;; Output matches Fortran code.
(
defsystem
"odepack/lsode-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -335,6 +341,7 @@
;; f2cl doesn't know how to handle that yet.
(defsystem "odepack/lsodes-demo"
:class f2cl-system
:default-component-class :fortran-file
:f2cl-options (:package "ODEPACK" :array-slicing t :array-type :array :common-as-array t
:relaxed-array-decls nil)
:depends-on ("odepack")
...
...
@@ -347,6 +354,7 @@
;; Output matches Fortran code.
(
defsystem
"odepack/lsoda-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -367,6 +375,7 @@
;; Output matches Fortran code.
(
defsystem
"odepack/lsodar-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -396,6 +405,7 @@
;; Compare this to demo-lsodpk.out
(
defsystem
"odepack/lsodpk-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -427,6 +437,7 @@
;; This seems to work.
(
defsystem
"odepack/lsodkr-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:pathname
"odepack/"
...
...
@@ -439,6 +450,7 @@
;; This runs and the expected output seems ok.
(
defsystem
"odepack/lsodi-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:depends-on
(
"odepack"
)
...
...
@@ -463,6 +475,7 @@
(
defsystem
"odepack/lsoibt-demo"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"ODEPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:relaxed-array-decls
nil
)
:depends-on
(
"odepack"
)
...
...
@@ -495,6 +508,7 @@
;; gonna work in Lisp!
(defsystem "odepack/lsodis-demo"
:class f2cl-system
:default-component-class :fortran-file
:f2cl-options (:package "ODEPACK" :array-slicing t :array-type :array :common-as-array t
:relaxed-array-decls nil :declare-common t)
:depends-on ("odepack")
...
...
packages/quadpack.asd
View file @
8b81a6f0
...
...
@@ -68,6 +68,7 @@
(
defsystem
"quadpack"
:description
"F2CL conversion of QUADPACK: Adaptive numerical integration"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"QUADPACK"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
)
:depends-on
(
"quadpack/mach-par"
)
:pathname
"quadpack/"
...
...
packages/toms419.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"toms419"
:description
"F2CL conversion of TOMS 419: Zeroes of a complex polynomial"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS419"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
:relaxed-array-decls
t
)
:pathname
"toms/419/"
:components
...
...
@@ -38,6 +39,7 @@
(
defsystem
"toms419/test"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS419"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
:relaxed-array-decls
t
)
:pathname
"toms/419/"
:depends-on
(
"toms419"
)
...
...
packages/toms715.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"toms715"
:description
"F2CL conversion of TOMS 715: Numerical Evaluation of Special Functions"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS715"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
)
:pathname
"toms/715/"
:components
...
...
@@ -59,6 +60,7 @@
(
defsystem
"toms715/tests"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS715"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
)
:depends-on
(
"toms715"
)
:pathname
"toms/715"
...
...
packages/toms717.asd
View file @
8b81a6f0
...
...
@@ -9,6 +9,7 @@
(
defsystem
"toms717"
:description
"F2CL conversion of TOMS 717: Max- and quasi-likelihood estimation in non-linear regression"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS717"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
:relaxed-array-decls
t
)
:pathname
"toms/717/"
:components
...
...
@@ -134,6 +135,7 @@
(
defsystem
"toms717/tests"
:class
f2cl-system
:default-component-class
:fortran-file
:f2cl-options
(
:package
"TOMS717"
:array-slicing
t
:array-type
:array
:keep-lisp-file
t
:relaxed-array-decls
t
)
:pathname
"toms/"
:depends-on
(
"toms717"
)
...
...
src/f2cl-asdf.l
→
src/f2cl-asdf.l
isp
View file @
8b81a6f0
...
...
@@ -4,9 +4,22 @@
(
in-package
:f2cl-asdf
)
;; Source files for f2cl itself.
(
defclass
cl-source-file.l
(
cl-source-file
)
((
type
:initform
"l"
))
(
:documentation
"Component class for a Common Lisp source file using type \"l\""
))
(
setf
(
find-class
'asdf::cl-source-file.l
)
(
find-class
'cl-source-file.l
))
(
defclass
f2cl-system
(
system
)
((
f2cl-options
:initarg
:f2cl-options
:type
list
:reader
f2cl-options
)
;; Note that the below only works on ASDF 3.3 and later:
;; a bug in the reset-system protocol prevents usefully overriding
;; the :initform (or :default-initargs) of slots defined by class SYSTEM.
;; Therefore, until everyone uses ASDF 3.3 (say in 2019?),
;; all f2cl-system's must explicitly use:
;; :default-component-class fortran-file
(
asdf/component:default-component-class
:initform
'fortran-file
)))
(
defclass
fortran-file
(
cl-source-file
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment