[SciPy-dev] compilation with fort77

Thomas Tanner tanner@gmx...
Fri Jan 22 14:06:36 CST 2010


Hello,

I'm trying to port scipy 0.7.1 to the Maemo platform (Linux/ARM).
There is no Fortran compiler for this platform so I have to use
fort77 (and f2c) to compile numpy and scipy.
However, f2c does not seem to be 100% Fortran77 compatible (or may scipy
is not?). I get (only :) two compilation errors.
The first one is a trivial type conversion and fixed by my attached patch.
the full build output can be found at
https://garage.maemo.org/builder/fremantle/python-scipy_0.7.1-1maemo1/armel.build.log.OK.txt

I don't know how to fix the second error:

compiling Fortran sources
Fortran f77 compiler: /usr/bin/f77 -g -Wall -fno-second-underscore -fPIC
-O2 -funroll-loops
compile options: '-Ibuild/src.linux-armv5tel-2.5
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5 -c'
f77:f77: scipy/stats/mvndst.f
   mvnun:
Error on line 76: Declaration error for rho: adjustable dimension on
non-argument
Error on line 76: Declaration error for infin: adjustable dimension on
non-argument
Error on line 76: Declaration error for stdev: adjustable dimension on
non-argument
Error on line 76: Declaration error for nlower: adjustable dimension on
non-argument
Error on line 76: Declaration error for nupper: adjustable dimension on
non-argument
Error on line 24: wr_ardecls:  nonconstant array size
Error on line 24: wr_ardecls:  nonconstant array size
Error on line 24: wr_ardecls:  nonconstant array size
Error on line 24: wr_ardecls:  nonconstant array size
Error on line 24: wr_ardecls:  nonconstant array size
   mvndst:
   mvndfn:
       entry    mvndnt:
   mvnlms:
   covsrt:
   dkswap:
   rcswp:
   dkbvrc:
   dksmrc:
   mvnphi:
   phinvs:
   bvnmvn:
   bvu:
   mvnuni:

the problem is that fort77 cannot deal with those variable sized
input arguments:

      SUBROUTINE mvnun(d, n, lower, upper, means, covar, maxpts,
     &                   abseps, releps, value, inform)
...
      integer n, d, infin(d), maxpts, inform, tmpinf
      double precision lower(d), upper(d), releps, abseps,
     &                 error, value, stdev(d), rho(d*(d-1)/2),
     &                 covar(d,d),
     &                 nlower(d), nupper(d), means(d,n), tmpval
      integer i, j

Could some Fortran expert please help me to make it fort77 compatible?
Thanks for your help!

best regards,
-- 
Thomas Tanner ------
email: tanner@gmx.de
GnuPG: 1024/5924D4DD


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: my.diff
Url: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100122/802fc5e2/attachment.pl 


More information about the SciPy-Dev mailing list