quil-lang / magicl

Matrix Algebra proGrams In Common Lisp.
BSD 3-Clause "New" or "Revised" License
230 stars 44 forks source link

Type mismatch, #46

Open ijitai opened 5 years ago

ijitai commented 5 years ago

magicl faided in CCL64, OSX 10.14 CCL shows:

Error: Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO #x3020056B4CFD> with command ("gfortran" "-fPIC" "-c" "/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f" "-o" "/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.o") exited with error code 71 While executing: UIOP/RUN-PROGRAM::%CHECK-RESULT, in process Listener(4). Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. If continued: IGNORE-ERROR-STATUS Type :? for other options.

So I try this

gfortran -fPIC -c /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f -o /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.o

and I get

gfortran -fPIC -c /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f -o /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.o /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:294:72:

      call DNCHBV(mx,sgn*t_step,wsp(ih),mh,wsp(iexph),wsp(ifree+mx))
                                                                    1

Warning: Type mismatch in argument 'wsp' at (1); passed REAL(8) to COMPLEX(8) [-Wargument-mismatch] /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1580:15:

   do ip = 1,ndeg
                                                                    2
      theta(ndeg+ip) = CONJG( theta(ip) )
           1

Warning: Array reference at (1) out of bounds (8 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1580:15:

   do ip = 1,ndeg
                                                                    2
      theta(ndeg+ip) = CONJG( theta(ip) )
           1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1581:15: /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1579:72:

   do ip = 1,ndeg
                                                                    2

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1581:15:

      alpha(ndeg+ip) = CONJG( alpha(ip) )
           1

Warning: Array reference at (1) out of bounds (8 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1581:15:

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1579:72:

   do ip = 1,ndeg
                                                                    2

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1581:15:

      alpha(ndeg+ip) = CONJG( alpha(ip) )
           1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1591:15:

   do ip = 1,2*ndeg
                                                                    2
      alpha(ip) = 0.5d0*alpha(ip)
           1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1591:33:

   do ip = 1,2*ndeg
                                                                    2
      alpha(ip) = 0.5d0*alpha(ip)
                             1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1598:60:

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1590:72:

   do ip = 1,2*ndeg
                                                                    2

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1598:60:

         wsp(ih+(j-1)*m+j-1) = wsp(ih+(j-1)*m+j-1)-theta(ip)
                                                        1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1625:32:

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1590:72:

   do ip = 1,2*ndeg
                                                                    2

/Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1625:32:

         y(j) = y(j) + alpha(ip)*wsp(iy+j-1)
                            1

Warning: Array reference at (1) out of bounds (14 > 7) in loop beginning at (2) /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:1901:72:

      call DNCHBV(mx,sgn*t_step,wsp(ih),mh,wsp(iexph),wsp(ifree+mx))
                                                                    1

Warning: Type mismatch in argument 'wsp' at (1); passed REAL(8) to COMPLEX(8) [-Wargument-mismatch] /Users/user1/quicklisp/local-projects/magicl/transcendental/expokit.f:2283:72:

      call DNCHBV(mx,sgn*t_step,wsp(ih),mh,wsp(iexph),wsp(ifree+mx))
                                                                    1

Warning: Type mismatch in argument 'wsp' at (1); passed REAL(8) to COMPLEX(8) [-Wargument-mismatch]

any advice?

stylewarning commented 5 years ago

Interesting, thanks for the report.

gwwatkin commented 4 years ago

Same problem here on up to date Arch Linux. gfortran version:

GNU Fortran (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
stylewarning commented 3 years ago

Looks like the R folks fixed expokit here: https://github.com/nmatzke/rexpokit/commit/41ff4e976b414ddf0f4c8e5cd31adb5469d84975