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
a0352cc7
Commit
a0352cc7
authored
Mar 29, 2017
by
Raymond Toy
Browse files
Merge branch 'asdf3' into 'master'
Make it build with ASDF 3.3 See merge request
!1
parents
d0997e7b
83d4d3de
Changes
19
Hide whitespace changes
Inline
Side-by-side
debian/f2cl.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
(
in-package
:asdf
)
(
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
:components
((
:file
"f2cl0"
)
(
defsystem
"f2cl"
:default-component-class
cl-source-file.l
:components
((
:file
"f2cl-asdf"
)
(
:file
"f2cl0"
)
(
:file
"f2cl1"
:depends-on
(
"f2cl0"
))
(
:file
"f2cl2"
:depends-on
(
"f2cl1"
))
(
:file
"f2cl3"
:depends-on
(
"f2cl2"
))
...
...
@@ -14,7 +18,3 @@
(
:file
"f2cl7"
:depends-on
(
"f2cl6"
))
(
:file
"f2cl8"
:depends-on
(
"f2cl7"
))
(
:file
"macros"
:depends-on
(
"f2cl8"
))))
(
defmethod
source-file-type
((
c
cl-source-file
)
(
s
(
eql
(
find-system
:f2cl
))))
"l"
)
f2cl.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
;; f2cl asd file
(
defpackage
#:f2cl-asd
(
:use
:cl
:asdf
))
(
in-package
#:f2cl-asd
)
(
defclass
f2cl-cl-source-file
(
asdf:cl-source-file
)
())
(
defmethod
source-file-type
((
f
f2cl-cl-source-file
)
(
m
module
))
"l"
)
(
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
:description
"F2CL: Fortran to Lisp converter"
:components
((
:module
src
:default-component-class
f2cl-
cl-source-file
((
:module
"
src
"
:default-component-class
cl-source-file
.l
:serial
t
:components
((
:file
"f2cl0"
)
((
:file
"f2cl-asdf"
)
(
:file
"f2cl0"
)
(
:file
"f2cl1"
)
(
:file
"f2cl2"
)
(
:file
"f2cl3"
)
...
...
packages/blas-complex.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
(
require
:f2cl
)
(
load-system
:f2cl
)
(
defpackage
blas-complex-system
(
:use
#:cl
#:asdf
))
(
in-package
:f2cl-asdf
)
(
in-package
#:blas-complex-system
)
(
defclass
blas-complex-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
package
declare-common
)
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
package
:relaxed-array-decls
t
:declare-common
declare-common
)))
(
defmethod
perform
((
op
compile-op
)
(
c
blas-complex-fortran-file
))
(
fortran-compile
op
c
:package
"BLAS"
))
(
defmethod
perform
((
op
load-op
)
(
c
blas-complex-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
(
defsystem
blas-complex
(
defsystem
"blas-complex"
:description
"BLAS routines for complex double-float matrices"
:class
f2cl-system
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:array-type
:array
:relaxed-array-decls
t
)
:depends-on
(
"blas-real"
)
:components
((
:module
"blas"
:pathname
"blas/"
:default-component-class
blas-complex-fortran-file
:components
((
:file
"zaxpy"
)
(
:file
"zcopy"
)
...
...
packages/blas-hompack.asd
View file @
a0352cc7
...
...
@@ -2,46 +2,20 @@
;;;
;; Need f2cl to be loaded before we can even read this file.
(
eval-when
(
:compile-toplevel
:load-toplevel
:execute
)
(
asdf:load-system
:f2cl
))
(
load-system
"f2cl"
)
(
defpackage
blas-hompack-system
(
:use
#:cl
#:asdf
))
(
in-package
:f2cl-asdf
)
(
in-package
#:blas-hompack-system
)
(
defclass
blas-hompack-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
package
declare-common
)
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
package
:relaxed-array-decls
nil
:declare-common
declare-common
)))
(
defmethod
perform
((
op
compile-op
)
(
c
blas-hompack-fortran-file
))
(
fortran-compile
op
c
:package
"BLAS"
))
(
defmethod
perform
((
op
load-op
)
(
c
blas-hompack-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
(
defsystem
blas-hompack
(
defsystem
"blas-hompack"
:class
f2cl-system
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:array-type
:array
:relaxed-array-decls
nil
)
:depends-on
(
"blas-package"
)
:pathname
"blas"
;; These are the ones needed for HOMPACK
:components
(
;; These are the ones needed for HOMPACK
(
:module
"blas"
:default-component-class
blas-hompack-fortran-file
:components
((
:file
"daxpy"
)
(
:file
"dcopy"
)
(
:file
"ddot"
)
(
:file
"dnrm2"
)
(
:file
"dscal"
)
(
:file
"idamax"
)))))
\ No newline at end of file
((
:file
"daxpy"
)
(
:file
"dcopy"
)
(
:file
"ddot"
)
(
:file
"dnrm2"
)
(
:file
"dscal"
)
(
:file
"idamax"
)))
packages/blas-package.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
;;;
(
asdf:
defsystem
blas-package
(
defsystem
"
blas-package
"
:description
"Package definition for BLAS"
:components
((
:module
"blas"
...
...
packages/blas-real.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
(
require
:
f2cl
)
(
load-system
"
f2cl
"
)
(
defpackage
blas-real-system
(
:use
#:cl
#:asdf
))
(
in-package
:f2cl-asdf
)
(
in-package
#:blas-real-system
)
(
defclass
blas-real-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
package
declare-common
)
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
package
:relaxed-array-decls
t
:declare-common
declare-common
)))
(
defmethod
perform
((
op
compile-op
)
(
c
blas-real-fortran-file
))
(
fortran-compile
op
c
:package
"BLAS"
))
(
defmethod
perform
((
op
load-op
)
(
c
blas-real-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
(
defsystem
blas-real
(
defsystem
"blas-real"
:description
"BLAS routines for real double-float matrices"
:class
f2cl-system
:f2cl-options
(
:package
"BLAS"
:array-slicing
t
:relaxed-array-decls
t
:array-type
:array
)
:depends-on
(
"blas-hompack"
)
:components
((
:module
"blas"
:default-component-class
blas-real-fortran-file
:components
(
;; Here are the rest of the BLAS routines
(
:file
"dasum"
)
...
...
packages/blas.asd
View file @
a0352cc7
;;; -*- Mode: lisp -*-
(
defpackage
blas-system
(
:use
#:cl
#:asdf
))
(
in-package
#:blas-system
)
(
defclass
blas-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
;;
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
(
relaxed-array-decls
t
)
(
package
"BLAS"
))
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
package
:relaxed-array-decls
relaxed-array-decls
)))
(
defmethod
perform
((
op
compile-op
)
(
c
blas-fortran-file
))
(
fortran-compile
op
c
))
(
defmethod
perform
((
op
load-op
)
(
c
blas-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
#+
nil
(
defsystem
blas-package
:description
"Package definition for BLAS"
:components
((
:module
"blas"
:components
((
:file
"blas-package"
)))))
#+
nil
(
defsystem
blas-hompack
:description
"BLAS routines needed by HOMPACK"
:depends-on
(
"blas-package"
)
:components
((
:module
"blas-hompack"
:pathname
"blas/"
:default-component-class
blas-fortran-file
:components
(
;; These are the ones needed for HOMPACK
(
:file
"daxpy"
)
(
:file
"dcopy"
)
(
:file
"ddot"
)
(
:file
"dnrm2"
)
(
:file
"dscal"
)
(
:file
"idamax"
)))))
#+
nil
(
defsystem
blas-real
:description
"BLAS routines for real double-float matrices"
:depends-on
(
"blas-hompack"
)
:components
((
:module
"blas"
:default-component-class
blas-fortran-file
:components
(
;; Here are the rest of the BLAS routines
(
:file
"dasum"
)
(
:file
"dcabs1"
)
(
:file
"dgbmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dgemm"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dgemv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dger"
:depends-on
(
"xerbla"
))
(
:file
"drot"
)
(
:file
"drotg"
)
(
:file
"dsbmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dspmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dspr"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dspr2"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dswap"
)
(
:file
"dsymm"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dsymv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dsyr"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dsyr2"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dsyr2k"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dsyrk"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtbmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtbsv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtpmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtpsv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtrmm"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtrmv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtrsm"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dtrsv"
:depends-on
(
"lsame"
"xerbla"
))
(
:file
"dzasum"
:depends-on
(
"dcabs1"
))
(
:file
"dznrm2"
)
(
:file
"icamax"
)
(
:file
"isamax"
)
(
:file
"izamax"
:depends-on
(
"dcabs1"
))
(
:file
"lsame"
)
(
:file
"xerbla"
)))))
#+
nil
(
defsystem
blas-complex
:description
"BLAS routines for complex double-float matrices"
:depends-on
(
"blas-real"
)
:components
((
:module
"blas"
:pathname
"blas/"
:default-component-class
blas-fortran-file
:components
((
:file
"zaxpy"
)
(
:file
"zcopy"
)
(
:file
"zdotc"
)
(
:file
"zdotu"
)
(
:file
"zdscal"
)
(
:file
"zgbmv"
)
(
:file
"zgemm"
)
(
:file
"zgemv"
)
(
:file
"zgerc"
)
(
:file
"zgeru"
)
(
:file
"zhbmv"
)
(
:file
"zhemm"
)
(
:file
"zhemv"
)
(
:file
"zher"
)
(
:file
"zher2"
)
(
:file
"zher2k"
)
(
:file
"zherk"
)
(
:file
"zhpmv"
)
(
:file
"zhpr"
)
(
:file
"zhpr2"
)
(
:file
"zrotg"
)
(
:file
"zscal"
)
(
:file
"zswap"
)
(
:file
"zsymm"
)
(
:file
"zsyr2k"
)
(
:file
"zsyrk"
)
(
:file
"ztbmv"
)
(
:file
"ztbsv"
)
(
:file
"ztpmv"
)
(
:file
"ztpsv"
)
(
:file
"ztrmm"
)
(
:file
"ztrmv"
)
(
:file
"ztrsm"
)
(
:file
"ztrsv"
)))))
(
defsystem
blas
(
defsystem
"blas"
:description
"BLAS (Basic Linear Algebra Subprograms) for double-float matrices."
:pathname
"blas/"
:depends-on
(
"blas-package"
"blas-real"
"blas-complex"
))
...
...
packages/colnew.asd
View file @
a0352cc7
;;; -*- Mode: lisp; Package: CL-USER -*-
;; Need f2cl to be loaded before we can even read this file.
(
eval-when
(
:compile-toplevel
:load-toplevel
:execute
)
(
asdf:load-system
:f2cl
))
(
defpackage
colnew-system
(
:use
#:cl
#:asdf
))
(
in-package
#:colnew-system
)
(
defclass
colnew-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
(
package
"COLNEW"
)
declare-common
(
common-as-array
t
))
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:keep-lisp-file
t
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
package
:declare-common
declare-common
:common-as-array
common-as-array
)))
(
defmethod
perform
((
op
compile-op
)
(
c
colnew-fortran-file
))
(
fortran-compile
op
c
:package
"COLNEW"
))
(
defmethod
perform
((
op
load-op
)
(
c
colnew-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
(
load-system
:f2cl
)
(
in-package
:f2cl-asdf
)
;; Defsystem for colnew.
(
defsystem
colnew
(
defsystem
"
colnew
"
:description
"F2CL conversion of COLNEW: Solution of boundary-value problems for ODEs"
:class
f2cl-system
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:components
((
:module
package
:pathname
"colnew"
:components
((
:file
"package"
)))
((
:
cl-source-
file
"package"
)))
(
:module
"colnew"
:depends-on
(
"package"
)
:default-component-class
colnew-fortran-file
:components
(
;; Linpack routines needed by colnew
...
...
@@ -61,9 +32,7 @@
;; Simple compatibility to define all of the needed
;; common blocks in one place.
(
:file
"compat"
:perform
(
compile-op
:around
(
op
c
)
(
fortran-compile
op
c
:declare-common
t
:common-as-array
t
)))
:f2cl-options
(
:declare-common
t
:common-as-array
t
))
;; COLNEW itself, broken down into one subroutine per
;; file.
(
:file
"colnew"
...
...
@@ -102,23 +71,20 @@
(
:file
"sbblok"
:depends-on
(
"subfor"
"subbak"
))
(
:file
"subfor"
)
(
:file
"subbak"
)))))
(
defmethod
perform
((
op
test-op
)
(
c
(
eql
(
find-system
"colnew"
))))
(
oos
'test-op
"colnew-test-1"
)
(
oos
'test-op
"colnew-test-2"
)
(
oos
'test-op
"colnew-test-3"
))
(
:file
"subbak"
))))
: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
;; Run (*main*). Appears to work since the error tolerance is satisfied.
(
defsystem
"colnew-test-1"
:class
f2cl-system
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
:components
((
:module
problem-1
:default-component-class
colnew-fortran-file
:components
((
:file
"prob1"
:depends-on
(
"fsub"
"dfsub"
"gsub"
"dgsub"
"exact"
))
...
...
@@ -126,53 +92,44 @@
(
:file
"gsub"
)
(
:file
"dfsub"
)
(
:file
"dgsub"
)
(
:file
"exact"
)))))
(
defmethod
perform
((
op
test-op
)
(
c
(
eql
(
find-system
"colnew-test-1"
))))
(
funcall
(
intern
"PROB1"
(
find-package
'
#:colnew
))))
(
:file
"exact"
))))
:perform
(
test-op
(
o
c
)
(
symbol-call
:colnew
:prob1
)))
;; Test problem 2 from TOMS 569. Appears to work.
(
defsystem
colnew-test-2
(
defsystem
"colnew-test-2"
:class
f2cl-system
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
:components
((
:module
problem-2
:default-component-class
colnew-fortran-file
:components
((
:file
"prob2"
:perform
(
compile-op
:around
(
op
c
)
(
fortran-compile
op
c
:declare-common
t
:common-as-array
t
))
:f2cl-options
(
:declare-common
t
:common-as-array
t
)
:depends-on
(
"fsub"
"dfsub"
"gsub"
"dgsub"
"solutn"
))
(
:file
"fsub"
)
(
:file
"gsub"
)
(
:file
"dfsub"
)
(
:file
"dgsub"
)
(
:file
"solutn"
)))))
(
defmethod
perform
((
op
test-op
)
(
c
(
eql
(
find-system
"colnew-test-2"
))))
(
funcall
(
intern
"PROB2"
(
find-package
'
#:colnew
))))
(
:file
"solutn"
))))
:perform
(
test-op
(
o
c
)
(
symbol-call
:colnew
:prob2
)))
;; Test problem 3 from TOMS 569.
(
defsystem
colnew-test-3
(
defsystem
"colnew-test-3"
:class
f2cl-system
:f2cl-options
(
:package
"COLNEW"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:depends-on
(
"colnew"
)
:pathname
"colnew/"
:components
((
:module
problem-3
:default-component-class
colnew-fortran-file
:components
((
:file
"prob3"
:perform
(
compile-op
:around
(
op
c
)
(
fortran-compile
op
c
:declare-common
t
:common-as-array
t
))
((
:file
"prob3"
:f2cl-options
(
:declare-common
t
:common-as-array
t
)
:depends-on
(
"fsub"
"dfsub"
"gsub"
"dgsub"
"solutn"
))
(
:file
"fsub"
)
(
:file
"gsub"
)
(
:file
"dfsub"
)
(
:file
"dgsub"
)
(
:file
"solutn"
)))))
(
defmethod
perform
((
op
test-op
)
(
c
(
eql
(
find-system
"colnew-test-3"
))))
(
funcall
(
intern
"PROB3"
(
find-package
'
#:colnew
))))
(
:file
"solutn"
))))
:perform
(
test-op
(
o
c
)
(
symbol-call
:colnew
:PROB3
)))
packages/fishpack.asd
View file @
a0352cc7
...
...
@@ -5,45 +5,20 @@
;;;
;; Need f2cl to be loaded before we can even read this file.
(
eval-when
(
:compile-toplevel
:load-toplevel
:execute
)
(
asdf:load-system
:f2cl
))
(
load-system
"f2cl"
)
(
defpackage
#:fishpack-asd
(
:use
:cl
:asdf
))
(
in-package
:f2cl-asdf
)
(
in-package
:fishpack-asd
)
(
defclass
fishpack-fortran-file
(
cl-source-file
)
()
(
:default-initargs
:type
"f"
))
(
defun
fortran-compile
(
op
c
&key
(
array-slicing
t
)
(
array-type
:array
)
package
declare-common
)
(
let
((
file
(
component-pathname
c
)))
(
f2cl:f2cl-compile
file
:keep-lisp-file
t
:output-file
(
first
(
output-files
op
c
))
:array-slicing
array-slicing
:array-type
array-type
:package
"FISHPACK"
:declare-common
declare-common
)))
(
defmethod
perform
((
op
compile-op
)
(
c
fishpack-fortran-file
))
(
fortran-compile
op
c
:package
"MINPACK"
))
(
defmethod
perform
((
op
load-op
)
(
c
fishpack-fortran-file
))
(
load
(
first
(
input-files
op
c
))))
(
defsystem
fishpack
(
defsystem
"fishpack"
:description
"F2CL conversion of FISHPACK: Solution of separable elliptic PDEs"
:class
f2cl-system
:f2cl-options
(
:package
"FISHPACK"
:array-slicing
t
:array-type
:array
:common-as-array
t
:keep-lisp-file
t
)
:components
((
:module
package
((
:module
"
package
"
:pathname
"fishpack"
:components
((
:file
"package"
)))
(
:module
fishpack
:default-component-class
fishpack-fortran-file
((
:cl-source-file
"package"
)))
(
:module
"fishpack"
:components
((
:file
"pimach"
)
(
:file
"merge"
)
...
...
@@ -78,9 +53,7 @@
(
:file
"ortho4"
)
(
:file
"minso4"
)
(
:file
"defe4"
:depends-on
(
"dx4"
"dy4"
))
(
:file
"dx4"
:perform
(
compile-op
:around
(
op
c
)