I installed scalapack using the scalapack installer and let it download BLAS,BLACS,LAPACK,and SCALAPACK. I would like to get a code to compile and run before I try to link in any optimized libraries. The installation seemed to work as it should and I ended up with all the desired library files. However, I am trying to compile the following code:
integer :: m,n,ictxt,nprow,npcol,nb,myrow,mycol,ierr,rank
real :: re,im
complex :: j=(0,1)
complex,allocatable :: zs(:,:)
end program try
i know there's probably some mpi stuff missing ahead of sl_init but this should at least compile. However, i get the following errors:
/home/jkillian3/scalapack/lib/libscalapack.a(SL_init.o): In function `sl_init_':
SL_init.f:(.text+0x39): undefined reference to `blacs_pinfo_'
SL_init.f:(.text+0x55): undefined reference to `blacs_get_'
SL_init.f:(.text+0x70): undefined reference to `blacs_gridinit_'
SL_init.f:(.text+0xb5): undefined reference to `blacs_setup_'
collect2: ld returned 1 exit status
My compile command is:
mpif90 -o try try.f90 $splib/librefblas.a $splib/blacs.a $splib/blacsC.a $splib/blacsF77.a $splib/libreflapack.a $splib/libscalapack.a
mpif90 is calling gfortran and my MPI implementation is mpich2. Any ideas would be greatly appreciated. Thanks.