Reputation: 1727
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?
How to Run Example Program Using MPI
Upvotes: 0
Views: 837
Reputation: 3612
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 :
$ mpif77 --showme
gfortran -I/usr/lib/openmpi/include -pthread -L/usr/lib -L/usr/lib/openmpi/lib -lmpi_f77 -lmpi -ldl -lhwloc
$ mpif90 --showme
gfortran -I/usr/lib/openmpi/include -pthread -L/usr/lib -L/usr/lib/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -ldl -lhwloc
The only difference is -lmpi_f90
Upvotes: 1