| 1 | ;;; -*- Mode: lisp -*- |
|---|
| 2 | ;;; |
|---|
| 3 | ;;; $Id$ |
|---|
| 4 | ;;; |
|---|
| 5 | |
|---|
| 6 | ;; Need f2cl to be loaded before we can even read this file. |
|---|
| 7 | (eval-when (:compile-toplevel :load-toplevel :execute) |
|---|
| 8 | (asdf:load-system :f2cl)) |
|---|
| 9 | |
|---|
| 10 | (defpackage toms715-system |
|---|
| 11 | (:use #:cl #:asdf)) |
|---|
| 12 | |
|---|
| 13 | (in-package #:toms715-system) |
|---|
| 14 | |
|---|
| 15 | ;; Defsystem for d1mach and i1mach |
|---|
| 16 | (defsystem mach-par |
|---|
| 17 | :components |
|---|
| 18 | ((:file "d1mach") |
|---|
| 19 | (:file "i1mach"))) |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | (defclass toms715-fortran-file (cl-source-file) |
|---|
| 23 | () |
|---|
| 24 | (:default-initargs :type "f")) |
|---|
| 25 | |
|---|
| 26 | (defun fortran-compile (op c &key (array-slicing t) (array-type :array) package) |
|---|
| 27 | (let ((file (component-pathname c))) |
|---|
| 28 | (f2cl:f2cl-compile file |
|---|
| 29 | :output-file (first (output-files op c)) |
|---|
| 30 | :array-slicing array-slicing |
|---|
| 31 | :array-type array-type |
|---|
| 32 | :package package))) |
|---|
| 33 | |
|---|
| 34 | (defmethod perform ((op compile-op) (c toms715-fortran-file)) |
|---|
| 35 | (fortran-compile op c :package "TOMS715")) |
|---|
| 36 | |
|---|
| 37 | (defmethod perform ((op load-op) (c toms715-fortran-file)) |
|---|
| 38 | (load (first (input-files op c)))) |
|---|
| 39 | |
|---|
| 40 | (defsystem machar |
|---|
| 41 | :components |
|---|
| 42 | ((:file "machar"))) |
|---|
| 43 | |
|---|
| 44 | (defsystem toms715 |
|---|
| 45 | :depends-on ("machar") |
|---|
| 46 | :pathname "toms/" |
|---|
| 47 | :components |
|---|
| 48 | ((:module package |
|---|
| 49 | :pathname "715/" |
|---|
| 50 | :components |
|---|
| 51 | ((:file "package"))) |
|---|
| 52 | (:module "715" |
|---|
| 53 | :depends-on ("package") |
|---|
| 54 | :default-component-class toms715-fortran-file |
|---|
| 55 | :components |
|---|
| 56 | ( |
|---|
| 57 | (:file "anorm") |
|---|
| 58 | (:file "besei0" :depends-on ("calci0")) |
|---|
| 59 | (:file "besei1" :depends-on ("calci1")) |
|---|
| 60 | (:file "besek0" :depends-on ("calck0")) |
|---|
| 61 | (:file "besek1" :depends-on ("calck1")) |
|---|
| 62 | (:file "besi0" :depends-on ("calci0")) |
|---|
| 63 | (:file "besi1" :depends-on ("calci1")) |
|---|
| 64 | (:file "besj0" :depends-on ("caljy0")) |
|---|
| 65 | (:file "besj1" :depends-on ("caljy1")) |
|---|
| 66 | (:file "besk0" :depends-on ("calck0")) |
|---|
| 67 | (:file "besk1" :depends-on ("calck1")) |
|---|
| 68 | (:file "besy0" :depends-on ("caljy0")) |
|---|
| 69 | (:file "besy1" :depends-on ("caljy1")) |
|---|
| 70 | (:file "calcei") |
|---|
| 71 | (:file "calci0") |
|---|
| 72 | (:file "calci1") |
|---|
| 73 | (:file "calck0") |
|---|
| 74 | (:file "calck1") |
|---|
| 75 | (:file "calerf") |
|---|
| 76 | (:file "caljy0") |
|---|
| 77 | (:file "caljy1") |
|---|
| 78 | (:file "daw") |
|---|
| 79 | (:file "derf") |
|---|
| 80 | (:file "derfc") |
|---|
| 81 | (:file "derfcx") |
|---|
| 82 | (:file "dgamma") |
|---|
| 83 | (:file "dlgama") |
|---|
| 84 | (:file "dsubn") |
|---|
| 85 | (:file "ei") |
|---|
| 86 | (:file "eone") |
|---|
| 87 | (:file "expei") |
|---|
| 88 | (:file "psi") |
|---|
| 89 | (:file "ren") |
|---|
| 90 | (:file "ribesl") |
|---|
| 91 | (:file "rjbesl") |
|---|
| 92 | (:file "rkbesl") |
|---|
| 93 | (:file "rybesl") |
|---|
| 94 | )))) |
|---|
| 95 | |
|---|
| 96 | (defmethod perform ((op test-op) (c (eql (find-system :toms715)))) |
|---|
| 97 | (oos 'test-op "toms715-tests")) |
|---|
| 98 | |
|---|
| 99 | (defsystem toms715-tests |
|---|
| 100 | :depends-on ("toms715") |
|---|
| 101 | :pathname "toms/" |
|---|
| 102 | :components |
|---|
| 103 | ((:module "715" |
|---|
| 104 | :default-component-class toms715-fortran-file |
|---|
| 105 | :components |
|---|
| 106 | ( |
|---|
| 107 | (:file "algtst") |
|---|
| 108 | (:file "anrtst") |
|---|
| 109 | (:file "dawtst") |
|---|
| 110 | (:file "eitest") |
|---|
| 111 | (:file "erftst") |
|---|
| 112 | (:file "gamtst") |
|---|
| 113 | (:file "i0test") |
|---|
| 114 | (:file "i1test") |
|---|
| 115 | (:file "j0test") |
|---|
| 116 | (:file "j1test") |
|---|
| 117 | (:file "k0test") |
|---|
| 118 | (:file "k1test") |
|---|
| 119 | (:file "psitst") |
|---|
| 120 | (:file "ritest") |
|---|
| 121 | (:file "rjtest") |
|---|
| 122 | (:file "rktest") |
|---|
| 123 | (:file "rytest") |
|---|
| 124 | (:file "y0test") |
|---|
| 125 | (:file "y1test") |
|---|
| 126 | )))) |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | (defmethod perform ((op test-op) (c (eql (find-system "toms715-tests")))) |
|---|
| 130 | (dolist (test '(algtst |
|---|
| 131 | anrtst |
|---|
| 132 | dawtst |
|---|
| 133 | eitest |
|---|
| 134 | erftst |
|---|
| 135 | gamtst |
|---|
| 136 | i0test |
|---|
| 137 | i1test |
|---|
| 138 | j0test |
|---|
| 139 | j1test |
|---|
| 140 | k0test |
|---|
| 141 | k1test |
|---|
| 142 | psitst |
|---|
| 143 | ritest |
|---|
| 144 | rjtest |
|---|
| 145 | rktest |
|---|
| 146 | rytest |
|---|
| 147 | y0test |
|---|
| 148 | y1test)) |
|---|
| 149 | (let ((f2cl-lib::*stop-signals-error-p* nil)) |
|---|
| 150 | ;; What do we really want here? Some tests are expected to |
|---|
| 151 | ;; signal errors and we do. But we don't want asdf to stop the |
|---|
| 152 | ;; tests. So we just ignore all errors and expect the user to |
|---|
| 153 | ;; look through the results to see if they make sense. |
|---|
| 154 | (ignore-errors (funcall (find-symbol test "TOMS715")))))) |
|---|