Undefined numroc_, etc in scalapack eigen appl on solaris

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

Undefined numroc_, etc in scalapack eigen appl on solaris

Postby sanjay » Mon Aug 29, 2005 10:39 am

When i make my makefile for scalapack eigen problem on sun solaries (sparc), i encountered with
syeig_main.o(.text+0x19c): In function `main':
: undefined reference to `numroc_'
syeig_main.o(.text+0x1d0): In function `main':
: undefined reference to `numroc_'
syeig.o(.text+0xe0): In function `symmetric_eigen__':
: undefined reference to `numroc_'
syeig.o(.text+0x160): In function `symmetric_eigen__':
: undefined reference to `descinit_'
syeig.o(.text+0x1d8): In function `symmetric_eigen__':
: undefined reference to `descinit_'
syeig.o(.text+0x268): In function `symmetric_eigen__':
: undefined reference to `pdsyev_'
collect2: ld returned 1 exit status
make: *** [syeig] Error 1

My make file looks like this

SCALAPACKLIB = /usr/local/SCALAPACK/lib/libscalapack.a \
/usr/local/ATLAS/lib/libf77blas.a \
/usr/local/ATLAS/lib/libatlas.a \
/usr/local/ATLAS/lib/liblapack.a

BLACSLIB = \
/usr/local/BLACS/LIB/blacsF77init_MPI-SUN4SOL2-0.a\
/usr/local/BLACS/LIB/blacs_MPI-SUN4SOL2-0.a \
/usr/local/BLACS/LIB/blacsCinit_MPI-SUN4SOL2-0.a

LIBS = $(SCALAPACKLIB) $(BLACSLIB)
#MPIF77 = /usr/bin/f77
MPIF77 = /usr/local/mpich-1.2.6/ch_p4/bin/mpif77
MPICC = /usr/local/mpich-1.2.6/ch_p4/bin/mpicc
CFLAGS = -Wall -pedantic -I/usr/local/mpich-1.2.6/ch_p4/include
LDFLAGS = -L/usr/local/mpich-1.2.6/ch_p4/lib -lmpich
all: syeig

syeig: syeig_main.o syeig.o
$(MPIF77) ${CFLAGS} -o $@ syeig_main.o syeig.o $(LIBS) ${LDFLAGS}

syeig_main.o: syeig_main.c
$(MPICC) $(CFLAGS) -o $@ -c syeig_main.c

syeig.o: syeig.f
$(MPIF77) $(CFLAGS) -o $@ -c syeig.f

Plz help me out

Advance thanx

sanjay
sanjay
 
Posts: 2
Joined: Mon Aug 29, 2005 10:14 am

Postby Julie » Mon Aug 29, 2005 1:44 pm

Sangay

The order of the library for the link process should be the following:
SCALAPACK, BLACS, LAPACK and BLAS

in your case I would suggest the following makefile:

Code: Select all
SCALAPACKLIB = /usr/local/SCALAPACK/lib/libscalapack.a

BLACSLIB = \
/usr/local/BLACS/LIB/blacsF77init_MPI-SUN4SOL2-0.a \
/usr/local/BLACS/LIB/blacsCinit_MPI-SUN4SOL2-0.a \
/usr/local/BLACS/LIB/blacs_MPI-SUN4SOL2-0.a
/usr/local/BLACS/LIB/blacsF77init_MPI-SUN4SOL2-0.a \
/usr/local/BLACS/LIB/blacsCinit_MPI-SUN4SOL2-0.a

BLASLIB= \
/usr/local/ATLAS/lib/libf77blas.a \
/usr/local/ATLAS/lib/libatlas.a

LAPACKLIB= \
 /usr/local/ATLAS/lib/liblapack.a

LIBS = $(SCALAPACKLIB) $(BLACSLIB) $(LAPACKLIB) $(BLASLIB) $(BLACSLIB)
#MPIF77 = /usr/bin/f77
MPIF77 = /usr/local/mpich-1.2.6/ch_p4/bin/mpif77
MPICC = /usr/local/mpich-1.2.6/ch_p4/bin/mpicc
CFLAGS = -Wall -pedantic -I/usr/local/mpich-1.2.6/ch_p4/include
LDFLAGS = -L/usr/local/mpich-1.2.6/ch_p4/lib -lmpich
all: syeig

syeig: syeig_main.o syeig.o
$(MPIF77) ${CFLAGS} -o $@ syeig_main.o syeig.o $(LIBS) ${LDFLAGS}

syeig_main.o: syeig_main.c
$(MPICC) $(CFLAGS) -o $@ -c syeig_main.c

syeig.o: syeig.f
$(MPIF77) $(CFLAGS) -o $@ -c syeig.f


let me know if it works.
Julie
[/quote]
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest