undefined references when linking scalapack

Open discussion regarding features, bugs, issues, vendors, etc.

undefined references when linking scalapack

Postby jkillian3 » Thu Dec 03, 2009 7:56 pm

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:

program try
implicit none
include 'mpif.h'
integer :: m,n,ictxt,nprow,npcol,nb,myrow,mycol,ierr,rank
real :: re,im
complex :: j=(0,1)
complex,allocatable :: zs(:,:)

call sl_init(ictxt,nprow,npcol)
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:
splib=/home/jkillian3/scalapack/lib
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.

Tyler
jkillian3
 
Posts: 1
Joined: Thu Dec 03, 2009 7:48 pm

Re: undefined references when linking scalapack

Postby miggety » Tue Aug 17, 2010 11:21 am

did you ever resolve this issue? I am having the same problem.

Mike
miggety
 
Posts: 7
Joined: Sun Mar 07, 2010 12:38 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron