scalapack链接缺少_gfortran_transfer_xxxx的问题



  • 使用这条命令链接scalapack时,mpif90 -hybrid source.o -o test ./libscalapack.a -lxMath_manycore -lgfortran(libscalapack.a来源于路径/usr/sw-mpp/apps/share/lib/
    ,有如下报错:

    mpif90 -hybrid source.o -o test ./libscalapack.a -lxMath_manycore -lgfortran
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_character_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_character_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    ./libscalapack.a(pxerbla.o): In function `pxerbla_': undefined reference to `_gfortran_transfer_integer_write'
    collect2: ld returned 1 exit status
    

    使用nm /usr/sw-mpp/swcc/sw5gcc-binary/lib | grep gfortran_trasnfer的结果如下,

    $ nm libgfortran.a | grep _gfortran_transfer
    0000000000003264 T slave__gfortran_transfer_array
    00000000000030fc T slave__gfortran_transfer_character
    00000000000031a0 T slave__gfortran_transfer_complex
    0000000000002ef0 T slave__gfortran_transfer_integer
    0000000000003058 T slave__gfortran_transfer_logical
    0000000000002f94 T slave__gfortran_transfer_real
    

    可见,libgfortran.a的确并未包含上面缺失的函数。

    所以,想请教一下大家,这个问题该怎样解决?是1) 需要更换编译器,还是2) 有额外的fortran库包含这些函数,或者是3) 我使用的libscalapack.a的版本不对?

    感谢各位同行以及技术支持的老师们。



  • 应该是-lfortran -lffio不是-lgfortran
    最近比较忙回复不及时请见谅。


登录后回复