Octave + BLAS + ACML和很多混乱

时间:2014-05-04 23:26:01

标签: octave gfortran blas

我尝试编译Octave并获得了关于gfortran与BLAS不兼容的流行消息。我检查了config.log文件并提取了失败的测试程序,以单独测试它。确实,测试失败了。现在,这让人感到困惑 - 至少对我而言:

  1. 测试程序(在底部添加)未编译(在configure中),编译器选项强制gfortran进入64位默认模式,内部使用的整数声明为简单整数(不是* 8) )。所以,如果这必须使用64位整数模式,我应该制作一个64位整数默认的gfortran版本(我读到所有fortrans默认都应该使用整数*。

  2. 我用64位整数测试gfortran,声明一个整数* 8,然后打印那个整数的huge() - 它确实打印了64位大数字,所以,至少“手动”,gfortran似乎确定。

  3. 尝试使用--enable-64编译八度音符--with-blas = acml_mp --with-lapack = acml_mp并获取: “BLAS似乎不支持64位整数”

  4. libgfortran似乎与blas无关(使用ldd检查)。他们为什么要打架?我是否需要重新编译libgfortran?

  5. 我宁愿知道为什么会发生这种情况,而不仅仅是一个快速的食谱(虽然这也是受欢迎的),所以指向一些适用文档的指针会有所帮助!

    这是测试程序 - 我不能同意libblas(指向libacml):

       program main
    
    c  Compile with:
    c  fortran -o testblas -ff2c -ff2c   testblas.f -lblas -lm -ffixed-line-length-none
    
       integer n,nn(3)
       real s,a(1),b(1),sdot
       b(1) = 1.0
       a(1) = 1.0
       print *, "Generate -2**32 + 1, if possible, to check if gfortran is 32/64 bit"
       print *, "If N >= 0, we are on 32 bits"                                       
       n = 2
       n = -4 ** (n ** 30)
       n = n + 1
       print*, "N=", n
       if (n >= 0) goto 1
       print *, "This means we are on 64-bit integers. Check whether the BLAS is, too."
       s = sdot(n,a,1,b,1)
       print *, "S should be <> 0: "
       if (s .ne. 0.0) stop 1
    1  continue
       print*, "We may be on 32-bit integers, and the BLAS on 64 bits. This is almost bound"
       print*, "to have already failed, but just in case, we'll check."
       nn(1) = -1
       nn(2) = 1
       nn(3) = -1
       s = sdot(nn(2),a,1,b,1)
       print*, "BLAS, if 32-bit, will make s 1, and all is ok: s=", s
       if (s .ne. 1.0) stop 1                                        
    
       end
    

    这里的输出是:

    Generate -2**32 + 1, if possible, to check if gfortran is 32/64 bit
     If N >= 0, we are on 32 bits
     N=           1
     We may be on 32-bit integers, and the BLAS on 64 bits. This is almost bound
     to have already failed, but just in case, we'll check.
     BLAS, if 32-bit, will make s 1, and all is ok: s=   0.00000000    
    STOP 1
    

0 个答案:

没有答案