使用 gfortran 构建 libfeast 特征值求解器

问题描述 投票:0回答:0

我正在尝试使用 gfortran 构建 libfeast 且不使用 MKL(对于现有项目,在不使用 MKL 的情况下进行构建测试)。

构建命令

make F90=gfortran MKL=no MPI=openmpi feast

这给我 Fortran 错误

/tmp/FEAST/4.0/src/kernel/dzfeast.f90:917:82:

  650 |      call DGEMM('T','N',fpm(23),fpm(23),N,-DONE,work,N,q,N,DZERO,Aq,M0) ! projection
      |                                                                 2                 
......
  917 |      call DGEMM('N','N',N,fpm(25),fpm(23),DONE,work(1,1),N,Aq(1,fpm(24)),M0,DZERO,workc(1,fpm(24)),N)
      |                                                                                  1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
/tmp/FEAST/4.0/src/kernel/dzfeast.f90:944:87:

  839 |            call DLACPY( 'F', fpm(23), fpm(23),Bq, M0, Bqo, fpm(23) )
      |                                                      2                                 
......
  944 |      if ((fpm(5)==1).and.(loop==0))  call DLACPY( 'F', N, fpm(25),work(1,fpm(24)) , N, workc(1,fpm(24)), N )
      |                                                                                       1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).

默认情况下,构建使用 Intel ifort,我认为它更宽松。

我从来没有使用过 Fortran,所以虽然我几乎可以读出错误(我假设函数在 Fortran 中隐式声明并且需要一致的参数)

SO suggests a similar questionGfortran complex actual to real dummy argument.

最好的办法是使这个库可构建的补丁。

fortran gfortran libfeast
© www.soinside.com 2019 - 2024. All rights reserved.