When I do:
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
I get:
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
Could it be something with the order in which the libraries are linked?
It linking error. These dependences usually come when using different fortran compilers for libraries and executables (f77, f90). Try to use
mpif90
to compile your example.You can test using :
The only difference is
-lmpi_f90