当我做:
mpif77 example1.f -L scalapack/scalapack-1.8.0/ -lscalapack -L scalapack/blacs/BLACS/LIB -l:blacsF77init_MPI-LINUX-0.a -l:blacs_MPI-LINUX-0.a -l:blacsF77init_MPI-LINUX-0.a -L scalapack/blas/BLAS/ -l:blas_LINUX.a -L scalapack/lapack/ -llapack -L/cm/shared/apps/gcc/4.4.6/lib64/ -lgfortran
我得到:
scalapack//blas_LINUX.a(xerbla.o): In function `xerbla_':
xerbla.f:(.text+0x66): undefined reference to `_gfortran_transfer_character_write'
xerbla.f:(.text+0x76): undefined reference to `_gfortran_transfer_integer_write'
collect2: ld returned 1 exit status
这可能与库链接的顺序有关吗?