Help - : undefined reference to `sl_init_'

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

Help - : undefined reference to `sl_init_'

Postby Siggy421 » Wed Apr 22, 2009 9:41 pm

Okay, im trying to compile a scalapack program, with fortran. Ive got to machines one with prebuilt scalapck libaries one with scalapack libary i compiled from source. I get the same error on both machines. So i was assumign its my code, but i seriously can not work this out.

Code: Select all
PROGRAM SCALAPACK_H
   IMPLICIT NONE

   !Global varriables - i.e common across all processors
   
   !Local Varriables - i.e common only to the local processor
   INTEGER :: ICTXT, NPRow, NPCol, MyRow, MyCol
   INTEGER, DIMENSION(1:9) :: DESCA, DESCZ
   INTEGER :: MB, NB, N, M, RSRC, CSRC, MXLLDA, LDX, LDY
   INTEGER :: r, j, k, l, i, LWORK, LRWORK, INFO
   COMPLEX, DIMENSION(:,:), ALLOCATABLE :: AA

   REAL, DIMENSION(:), ALLOCATABLE :: W
   COMPLEX, DIMENSION(:), ALLOCATABLE :: Work, RWork
   COMPLEX, DIMENSION(1) :: Dummy
   !EXTERNAL FUNCTIONS
   EXTERNAL SL_INIT, BLACS_GRIDINFO, DESCINIT, PCHEEV, MATI_BCdis, BLACS_GRIDEXIT, BLACS_EXIT


   !*******************************************************************************************************
   !Assignable values which affect processors and distribution
   NPRow = 2
   NPCol = 4
   NB = 2
   MB = NB
   RSRC = 0
   CSRC = 0

   !Initiate the process grid, using asigned values for the grid
   CALL SL_INIT( ICTXT, NPRow, NPCol )


Im using the following compiler call, ive removed address from libaries to make it shorter, but it shows the ones im linking

> gfortran -C -o ScalpckH ScalpckH.f95 -L libscalapack.a libblacs.a libblacsCinit.a libblacsF77init.a libblas.a libpmpich.a

Anybody got any suggestions would be great

Regards Mark
Siggy421
 
Posts: 1
Joined: Wed Apr 22, 2009 9:36 pm

Re: Help - : undefined reference to `sl_init_'

Postby miggety » Tue Aug 17, 2010 5:56 pm

Hey Mark, I'm encountering the same problem. Did you find a way to resolve this?

Thanks,

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

Re: Help - : undefined reference to `sl_init_'

Postby jteg68 » Wed Aug 18, 2010 1:32 am

Hi,

this is a linker problem, not a problem with the code.

Make sure the library really is in the path. Use -L to point to your directory with your own libscalapack.

Use the correct command line. When linking with libXXX.a you specify -lXXX. 'man ld' for more details.
For a openmpi scalapack it can be as short as:
gfortran ScalpckH.f95 -lscalapack-openmpi

/Jörgen
jteg68
 
Posts: 9
Joined: Wed Sep 02, 2009 8:18 am


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests