Commit ad3778b6 authored by rtoy's avatar rtoy
Browse files

o Clean up asdf methods and specify default component class.

o Add a lot of routines that need to be compiled but were not.
o Add defsystems for all of the tests that work.
parent 2531974d
......@@ -9,38 +9,262 @@
(in-package :fishpack-asd)
(defclass fortran-source-file (source-file) ())
(defmethod source-file-type ((c fortran-source-file) (s module)) "f")
(defclass fishpack-fortran-file (cl-source-file)
()
(:default-initargs :type "f"))
(defmethod output-files ((o operation) (c fortran-source-file))
(list (make-pathname :name (component-name c)
:type #+cmu "x86f" #-cmu "fasl"
:defaults (component-pathname c))))
(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 "FISHPACK"
:declare-common declare-common
)))
(defmethod perform ((o compile-op) (c fortran-source-file))
(f2cl:f2cl-compile (make-pathname :name (component-name c)
:defaults (component-pathname c)) ))
(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))))
(defmethod perform ((o load-op) (c fortran-source-file))
(load (car (output-files o c))))
(defsystem fishpack
:components
((:fortran-source-file "pimach")
(:fortran-source-file "merge")
(:fortran-source-file "cosgen"
:depends-on ("pimach"))
(:fortran-source-file "genbun"
:depends-on ("pimach" "poisd2" "poisp2" "poisn2"))
(:fortran-source-file "tri3")
(:fortran-source-file "trix")
(:fortran-source-file "hwscrt"
:depends-on ("trix" "tri3" "pimach"))
(:fortran-source-file "poisd2"
:depends-on ("cosgen" "trix" "merge"))
(:fortran-source-file "poisn2"
:depends-on ("cosgen" "trix" "tri3" "merge"))
(:fortran-source-file "poisp2"
:depends-on ("cosgen" "trix" "tri3" "merge"
"poisd2"))))
((:module package
:pathname "fishpack"
:components
((:file "package")))
(:module fishpack
:default-component-class fishpack-fortran-file
:components
((:file "pimach")
(:file "merge")
(:file "cosgen"
:depends-on ("pimach"))
(:file "genbun"
:depends-on ("pimach" "poisd2" "poisp2" "poisn2"))
(:file "tri3")
(:file "trix")
(:file "hwscrt"
:depends-on ("trix" "tri3" "pimach"))
(:file "hwscyl")
(:file "hwsplr")
(:file "hwsssp")
(:file "hwsss1")
(:file "hwscsp" :depends-on ("hwscs1"))
(:file "hwscs1" :depends-on ("epmach" "blktri" "store"))
(:file "hstcrt" :depends-on ("poistg"))
(:file "poistg" :depends-on ("postg2"))
(:file "postg2")
(:file "hstplr")
(:file "hstcyl")
(:file "hstssp")
(:file "hstcsp" :depends-on ("hstcs1"))
(:file "hstcs1")
(:file "sepx4" :depends-on ("chkpr4" "speli4"))
(:file "chkpr4")
(:file "speli4"
:depends-on ("chksn4" "tris4" "ortho4" "minso4" "defe4"))
(:file "chksn4")
(:file "tris4")
(:file "ortho4")
(:file "minso4")
(:file "defe4" :depends-on ("dx4" "dy4")
:perform (compile-op :around (op c)
(fortran-compile op c :declare-common t)))
(:file "dx4")
(:file "dy4")
(:file "epmach"
:depends-on ("store")
:perform (compile-op :around (op c)
(fortran-compile op c :declare-common t)))
(:file "blktri"
:depends-on ("compb" "blktr1" "prodp" "cprodp")
:perform (compile-op :around (op c)
(fortran-compile op c :declare-common t)))
;; WARNING: compb passes an array of single-floats to
;; PPADD, but PPADD is expecting an array of COMPLEX
;; numbers. None of the test programs trigger this, so
;; it might not be a problem, but it is something to
;; watch out for. F2cl does not handle this case.
(:file "compb"
:depends-on ("indxb" "tevls" "ppadd"))
(:file "blktr1"
:depends-on ("indxa" "indxb" "indxc"))
(:file "store")
(:file "indxa")
(:file "indxb")
(:file "indxc")
(:file "tevls")
(:file "ppadd"
:depends-on ("psgf" "bsrh" "ppsgf"))
(:file "psgf")
(:file "bsrh")
(:file "ppsgf")
(:file "poisd2"
:depends-on ("cosgen" "trix" "merge"))
(:file "poisn2"
:depends-on ("cosgen" "trix" "tri3" "merge"))
(:file "poisp2"
:depends-on ("cosgen" "trix" "tri3" "merge"
"poisd2"))
(:file "prod")
(:file "cprod")
(:file "cprodp")
(:file "ppspf")
(:file "prodp")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack"))))
(oos 'test-op "fishpack-test-hwscrt"))
;; Some tests of Fishpack.
;;
;; The results won't match the results printed for the NCAR Control
;; Data 7600, but they should be close.
;; Works
(defsystem fishpack-test-hwscrt
:depends-on ("fishpack")
:components
((:module hwscrt
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthwscrt")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hwscrt"))))
(funcall (find-symbol "THWSCRT" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hwscyl
:depends-on ("fishpack")
:components
((:module hwscyl
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthwscyl")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hwscyl"))))
(funcall (find-symbol "THWSCYL" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hwsplr
:depends-on ("fishpack")
:components
((:module hwsplr
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthwsplr")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hwsplr"))))
(funcall (find-symbol "THWSPLR" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hwsssp
:depends-on ("fishpack")
:components
((:module hwsssp
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthwsssp")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hwsssp"))))
(funcall (find-symbol "THWSSSP" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hwscsp
:depends-on ("fishpack")
:components
((:module hwscsp
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthwscsp")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hwscsp"))))
(funcall (find-symbol "THWSCSP" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hstcrt
:depends-on ("fishpack")
:components
((:module hstcrt
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthstcrt")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hstcrt"))))
(funcall (find-symbol "THSTCRT" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hstplr
:depends-on ("fishpack")
:components
((:module hstplr
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthstplr")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hstplr"))))
(funcall (find-symbol "THSTPLR" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hstcyl
:depends-on ("fishpack")
:components
((:module hstcyl
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthstcyl")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hstcyl"))))
(funcall (find-symbol "THSTCYL" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hstssp
:depends-on ("fishpack")
:components
((:module hstssp
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthstssp")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hstssp"))))
(funcall (find-symbol "THSTSSP" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-hstcsp
:depends-on ("fishpack")
:components
((:module hstcsp
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tsthstcsp")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-hstcsp"))))
(funcall (find-symbol "THSTCSP" (find-package '#:fishpack))))
;; Works
(defsystem fishpack-test-sepx4
:depends-on ("fishpack")
:components
((:module sepx4
:pathname "fishpack/ex/"
:default-component-class fishpack-fortran-file
:components
((:file "tstsepx4" :depends-on ("cofx4"))
(:file "cofx4")))))
(defmethod perform ((op test-op) (c (eql (find-system "fishpack-test-sepx4"))))
(funcall (find-symbol "TSEPX4" (find-package '#:fishpack))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment