The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

Problem installing SCALAPACK

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

Problem installing SCALAPACK

Postby Jax777 » Mon Oct 09, 2006 12:26 pm

Hi all,
I wanted to install SCALAPACK and i have installed all the necessary packages for installing it ( MPI,BLACS, LAPACK). All were successfully installed and now i was trying to install SCALAPACK.

From the SCALAPACK directory i executed the command "make" it was successful.
But there was an error when i am trying to execute the command "make exe"
This is the error that is being displayed at the terminal
[root@athena SCALAPACK]$ make exe
( cd /root/scalapack/SCALAPACK/PBLAS/TESTING; make single double complex complex16 )
make[1]: Entering directory `/root/scalapack/SCALAPACK/PBLAS/TESTING'
rm -f PB_Cwarn.c PB_Cwarn.o
ln -s /root/scalapack/SCALAPACK/PBLAS/SRC/PTOOLS/PB_Cwarn.c PB_Cwarn.c
/opt/MPICH2/bin/mpicc -c -O4 -Df77IsF2C -DNO_IEEE -DTestingPblas PB_Cwarn.c
rm -f PB_Cabort.c PB_Cabort.o
ln -s /root/scalapack/SCALAPACK/PBLAS/SRC/PTOOLS/PB_Cabort.c PB_Cabort.c
/opt/MPICH2/bin/mpicc -c -O4 -Df77IsF2C -DNO_IEEE -DTestingPblas PB_Cabort.c
/opt/MPICH2/bin/mpif77 -o /root/scalapack/SCALAPACK/TESTING/xspblas1tst psblas1tst.o psblastst.o slamch.o pblastst.o PB_Cwarn.o PB_Cabort.o /root/scalapack/SCALAPACK/libscalapack.a /root/scalapack/BLACS/LIB/blacsF77init_MPI-LINUX-0.a /root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a /root/scalapack/BLACS/LIB/blacsF77init_MPI-LINUX-0.a /usr/lib/libblas.a /opt/MPICH2/lib/libmpich.a
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(isamax.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sasum.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(saxpy.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(scopy.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sdot.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sgemm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sgemv.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sger.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sscal.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(sswap.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssymm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssymv.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssyr.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssyr2.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssyr2k.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(ssyrk.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(strmm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(strmv.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(strsm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(strsv.o)' is incompatible with i386:x86-64 output
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgesd2d_.o)(.text+0x2d): In function `sgesd2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgerv2d_.o)(.text+0x37): In function `sgerv2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igebs2d_.o)(.text+0xc6): In function `igebs2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgebs2d_.o)(.text+0xc6): In function `sgebs2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igebr2d_.o)(.text+0xd6): In function `igebr2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgebr2d_.o)(.text+0xd6): In function `sgebr2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igsum2d_.o)(.text+0x147): In function `igsum2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igsum2d_.o)(.text+0x156): In function `igsum2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igsum2d_.o)(.text+0x3bb): In function `igsum2d_':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igsum2d_.o)(.text+0x4a8): In function `igsum2d_':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igamx2d_.o)(.text+0x230): In function `igamx2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igamx2d_.o)(.text+0x23c): In function `igamx2d_':
: undefined reference to `lam_mpi_unsigned_short'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igamx2d_.o)(.text+0x46b): In function `igamx2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igamx2d_.o)(.text+0x479): In function `igamx2d_':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.o)(.text+0x22c): In function `sgamx2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.o)(.text+0x238): In function `sgamx2d_':
: undefined reference to `lam_mpi_unsigned_short'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.o)(.text+0x47e): In function `sgamx2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.o)(.text+0x48c): In function `sgamx2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamn2d_.o)(.text+0x22c): In function `sgamn2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamn2d_.o)(.text+0x238): In function `sgamn2d_':
: undefined reference to `lam_mpi_unsigned_short'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamn2d_.o)(.text+0x47e): In function `sgamn2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamn2d_.o)(.text+0x48c): In function `sgamn2d_':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.o)(.text+0xa3): In function `blacs_get__':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_gridmap_.o)(.text+0x2bb): In function `blacs_gridmap__':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_gridmap_.o)(.text+0x2e0): In function `blacs_gridmap__':
: undefined reference to `lam_mpi_double'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgesd2d_.C)(.text+0x38): In function `Csgesd2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgerv2d_.C)(.text+0x38): In function `Csgerv2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igebs2d_.C)(.text+0xb4): In function `Cigebs2d':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgebs2d_.C)(.text+0xb4): In function `Csgebs2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(igebr2d_.C)(.text+0xb6): In function `Cigebr2d':
: undefined reference to `lam_mpi_int'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgebr2d_.C)(.text+0xb6): In function `Csgebr2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x138): In function `Csgsum2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x144): In function `Csgsum2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x3be): In function `Csgsum2d':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x494): In function `Csgsum2d':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x20a): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x216): In function `Csgamx2d':
: undefined reference to `lam_mpi_unsigned_short'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x451): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x45f): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x7e): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0xa8): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x19e): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(Csys2blacs_handle_.C)(.text+0x66): In function `Csys2blacs_handle':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(Csys2blacs_handle_.C)(.text+0xb5): In function `Csys2blacs_handle':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_BlacsAbort.o)(.text+0x1e): more undefined references to `lam_mpi_comm_world' follow
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_Pack.o)(.text+0x63): In function `BI_Pack':
: undefined reference to `lam_mpi_packed'
collect2: ld returned 1 exit status
make[1]: *** [/root/scalapack/SCALAPACK/TESTING/xspblas1tst] Error 1
make[1]: Leaving directory `/root/scalapack/SCALAPACK/PBLAS/TESTING'
make: *** [pblasexe] Error 2
[root@athena SCALAPACK]$

I thought it was a problem in the SCALAPACK/PBLAS/TESTING directory and i executed the command "make" in that directory. But there was a error

[root@athena TESTING]$ make
rm -f PB_Cwarn.c PB_Cwarn.o
ln -s /root/scalapack/SCALAPACK/PBLAS/SRC/PTOOLS/PB_Cwarn.c PB_Cwarn.c
mpicc -c -O4 -Df77IsF2C -DNO_IEEE -DUsingMpiBlacs -DTestingPblas PB_Cwarn.c
rm -f PB_Cabort.c PB_Cabort.o
ln -s /root/scalapack/SCALAPACK/PBLAS/SRC/PTOOLS/PB_Cabort.c PB_Cabort.c
mpicc -c -O4 -Df77IsF2C -DNO_IEEE -DUsingMpiBlacs -DTestingPblas PB_Cabort.c
mpif77 -o /root/scalapack/SCALAPACK/TESTING/xspblas1tst psblas1tst.o psblastst.o slamch.o pblastst.o PB_Cwarn.o PB_Cabort.o /root/scalapack/SCALAPACK/libscalapack.a /root/BLACS/LIB/blacsF77init_MPI-LINUX-0.a /root/BLACS/LIB/blacs_MPI-LINUX-0.a /root/BLACS/LIB/blacsF77init_MPI-LINUX-0.a /usr/lib/libblas.a /opt/MPICH2/lib/libmpich.a
g77: /root/BLACS/LIB/blacsF77init_MPI-LINUX-0.a: No such file or directory
g77: /root/BLACS/LIB/blacs_MPI-LINUX-0.a: No such file or directory
g77: /root/BLACS/LIB/blacsF77init_MPI-LINUX-0.a: No such file or directory
make: *** [/root/scalapack/SCALAPACK/TESTING/xspblas1tst] Error 1

edited the file SLmake.inc and executed the command "make" from SCALAPACK/PBLACS/TESTING directory....but there was an undefined reference error and i could'nt figure out the reason for the error.

/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x3be): In function `Csgsum2d':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgsum2d_.C)(.text+0x494): In function `Csgsum2d':
: undefined reference to `lam_mpi_sum'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x20a): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x216): In function `Csgamx2d':
: undefined reference to `lam_mpi_unsigned_short'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x451): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgamx2d_.C)(.text+0x45f): In function `Csgamx2d':
: undefined reference to `lam_mpi_float'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x7e): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0xa8): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x19e): In function `Cblacs_get':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(Csys2blacs_handle_.C)(.text+0x66): In function `Csys2blacs_handle':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(Csys2blacs_handle_.C)(.text+0xb5): In function `Csys2blacs_handle':
: undefined reference to `lam_mpi_comm_world'
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_BlacsAbort.o)(.text+0x1e): more undefined references to `lam_mpi_comm_world' follow
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_Pack.o)(.text+0x63): In function `BI_Pack':
: undefined reference to `lam_mpi_packed'
collect2: ld returned 1 exit status
make: *** [/root/scalapack/SCALAPACK/TESTING/xspblas1tst] Error 1
[root@athena TESTING]$

I would be glad if anyone could help me out in solving this problem.

Thank you,
Jagadish
Jax777
 
Posts: 12
Joined: Mon Sep 25, 2006 1:29 pm

Postby Julie » Mon Oct 09, 2006 12:41 pm

Hi Jagadish ,

You seems to have several problems:
- The first is the blas library you are using,
/usr/bin/ld: warning: i386 architecture of input file `/usr/lib/libblas.a(isamax.o)' is incompatible with i386:x86-64 output

You need to install a new one for your 64 bits machine

-the second problem seems to come from the fact that you want to use MPICH2 for ScaLAPACK but for BLACS you are using LAM-MPI. You need to use the same MPI implementation for both library
/root/scalapack/BLACS/LIB/blacs_MPI-LINUX-0.a(sgesd2d_.o)(.text+0x2d): In function `sgesd2d_': : undefined reference to `lam_mpi_float'

It may come from the fact that you are using mpicc/mpif77 in your Bmake that may point on LAM and not MPICH2.
Use the same FLAGS than ScaLAPACK:
/opt/MPICH2/bin/mpif77
and
/opt/MPICH2/bin/mpicc


My advice is to clean everything, check all the flags you are using to make sure you are pointing on the good MPI implementation LAM or MPICH2 but not a mix of them...

Sincerely
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby Jax777 » Mon Oct 09, 2006 1:03 pm

Thanks Julie, I guess i have made the required modifications to use the MPICH2 version. Here is my SLmake.inc file which i have edited but still the same error persists.

############################################################################
#
# Program: ScaLAPACK
#
# Module: SLmake.inc
#
# Purpose: Top-level Definitions
#
# Creation date: February 15, 2000
#
# Modified:
#
# Send bug reports, comments or suggestions to scalapack@cs.utk.edu
#
############################################################################
#
SHELL = /bin/sh
#
# The complete path to the top level of ScaLAPACK directory, usually
# $(HOME)/SCALAPACK
#
home = /root/scalapack/SCALAPACK
#
# The platform identifier to suffix to the end of library names
#
PLAT = LINUX
#
# BLACS setup. All version need the debug level (0 or 1),
# and the directory where the BLACS libraries are
#
BLACSDBGLVL = 0
BLACSdir = /root/scalapack/BLACS/LIB
#
# MPI setup; tailor to your system if using MPIBLACS
# Will need to comment out these 6 lines if using PVM
#
#USEMPI = -DUsingMpiBlacs
SMPLIB = /opt/MPICH2/lib/libmpich.a
BLACSFINIT = $(BLACSdir)/blacsF77init_MPI-$(PLAT)-$(BLACSDBGLVL).a
BLACSCINIT = $(BLACSdir)/blacsCinit_MPI-$(PLAT)-$(BLACSDBGLVL).a
BLACSLIB = $(BLACSdir)/blacs_MPI-$(PLAT)-$(BLACSDBGLVL).a
TESTINGdir = $(home)/TESTING

#
# PVMBLACS setup, uncomment next 6 lines if using PVM
#
#USEMPI =
#SMPLIB = $(PVM_ROOT)/lib/$(PLAT)/libpvm3.a
#BLACSFINIT =
#BLACSCINIT =
#BLACSLIB = $(BLACSdir)/blacs_PVM-$(PLAT)-$(BLACSDBGLVL).a
#TESTINGdir = $(HOME)/pvm3/bin/$(PLAT)

CBLACSLIB = $(BLACSCINIT) $(BLACSLIB) $(BLACSCINIT)
FBLACSLIB = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT)

#
# The directories to find the various pieces of ScaLapack
#
PBLASdir = $(home)/PBLAS
SRCdir = $(home)/SRC
TESTdir = $(home)/TESTING
PBLASTSTdir = $(TESTINGdir)
TOOLSdir = $(home)/TOOLS
REDISTdir = $(home)/REDIST
REDISTTSTdir = $(TESTINGdir)
#
# The fortran and C compilers, loaders, and their flags
#
F77 = /opt/MPICH2/bin/mpif77
CC = /opt/MPICH2/bin/mpicc
NOOPT =
F77FLAGS = -funroll-all-loops -O3 $(NOOPT)
DRVOPTS = $(F77FLAGS)
CCFLAGS = -O4
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
F77LOADFLAGS =
CCLOADFLAGS =
#
# C preprocessor defs for compilation
# (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C)
#
CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI)
#
# The archiver and the flag(s) to use when building archive (library)
# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo
#
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
#
# The name of the libraries to be created/linked to
#
SCALAPACKLIB = $(home)/libscalapack.a
BLASLIB = /usr/lib/libblas.a
#
PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
RLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(CBLACSLIB) $(BLASLIB) $(SMPLIB)
LIBS = $(PBLIBS)


can you please let me know what other changes do i need to make to eliminate that error.


Thank you,
Jagadish
Jax777
 
Posts: 12
Joined: Mon Sep 25, 2006 1:29 pm

Postby Julie » Mon Oct 09, 2006 1:11 pm

Re-read carefully my previous post....you need to change your BMAKE from BLACS and do in the BLACS a
Code: Select all
make clean what=mpi
and
Code: Select all
make mpi
.

It is your BLACS that is not correct.

You are still using a blas library that is not compatible with your machine...you need to INSTALL a NEW blas on your machine.
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby Jax777 » Mon Oct 09, 2006 2:29 pm

Thank you once again! I have edited the file Bmake.inc and BLACS/TESTING/Makefile and tried to run the command "make all" from BLACS/ folder. But there seems to be this "undefined reference" problem.

/root/scalapack/BLACS//LIB/blacsF77init_MPI-LINUX-1.a(Cblacs_pinfo.o)(.text+0x85): In function `Cblacs_pinfo':
: undefined reference to `BI_F77_MPI_CONSTANTS'
/root/scalapack/BLACS//LIB/blacsF77init_MPI-LINUX-1.a(Cblacs_pinfo.o)(.text+0x9f): In function `Cblacs_pinfo':
: undefined reference to `BI_F77_MPI_CONSTANTS'
/root/scalapack/BLACS//LIB/blacsF77init_MPI-LINUX-1.a(Cblacs_pinfo.o)(.text+0xd8): In function `Cblacs_pinfo':
: undefined reference to `BI_F77_MPI_CONSTANTS'
/root/scalapack/BLACS//LIB/blacsF77init_MPI-LINUX-1.a(Cblacs_pinfo.o)(.text+0xf2): In function `Cblacs_pinfo':
: undefined reference to `BI_F77_MPI_CONSTANTS'
collect2: ld returned 1 exit status
make: *** [/root/scalapack/BLACS//TESTING/EXE/xFbtest_MPI-LINUX-1] Error 1
[root@athena TESTING]$


The Bmake.inc and BLACS/TESTING/Makefile are as follows.

#=============================================================================
#====================== SECTION 1: PATHS AND LIBRARIES =======================
#=============================================================================
# The following macros specify the name and location of libraries required by
# the BLACS and its tester.
#=============================================================================

# --------------------------------------
# Make sure we've got a consistent shell
# --------------------------------------
SHELL = /bin/sh

# -----------------------------
# The top level BLACS directory
# -----------------------------
# BTOPdir = $(HOME)/BLACS

BTOPdir=/root/scalapack/BLACS/



# ---------------------------------------------------------------------------
# The communication library your BLACS have been written for.
# Known choices (and the machines they run on) are:
#
# COMMLIB MACHINE
# ....... ..............................................................
# CMMD Thinking Machine's CM-5
# MPI Wide variety of systems
# MPL IBM's SP series (SP1 and SP2)
# NX Intel's supercomputer series (iPSC2, iPSC/860, DELTA, PARAGON)
# PVM Most unix machines; See PVM User's Guide for details
# ---------------------------------------------------------------------------
COMMLIB = MPI

# -------------------------------------------------------------
# The platform identifier to suffix to the end of library names
# -------------------------------------------------------------
PLAT = LINUX

# ----------------------------------------------------------
# Name and location of the BLACS library. See section 2 for
# details on BLACS debug level (BLACSDBGLVL).
# ----------------------------------------------------------
BLACSdir = $(BTOPdir)/LIB
# BLACSDBGLVL = 0
BLACSDBGLVL = 1
BLACSFINIT = $(BLACSdir)/blacsF77init_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
BLACSCINIT = $(BLACSdir)/blacsCinit_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
BLACSLIB = $(BLACSdir)/blacs_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a

# -------------------------------------
# Name and location of the MPI library.
# -------------------------------------
# MPIdir = /usr/local/mpi
MPIdir = /opt/MPICH2
MPIdev = ch_p4
MPIplat = LINUX
MPILIBdir = $(MPIdir)/lib/$(MPIplat)/$(MPIdev)


MPIINCdir = $(MPIdir)/include
# MPILIB = $(MPILIBdir)/libmpi.a


MPILIB=/opt/MPICH2/lib/libmpich.a


# -------------------------------------
# All libraries required by the tester.
# -------------------------------------
BTLIBS = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT) $(MPILIB)

# ----------------------------------------------------------------
# The directory to put the installation help routines' executables
# ----------------------------------------------------------------
INSTdir = $(BTOPdir)/INSTALL/EXE

# ------------------------------------------------
# The name and location of the tester's executable
# ------------------------------------------------
TESTdir = $(BTOPdir)/TESTING/EXE
FTESTexe = $(TESTdir)/xFbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL)
CTESTexe = $(TESTdir)/xCbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL)
#=============================================================================
#=============================== End SECTION 1 ===============================
#=============================================================================


#=============================================================================
#========================= SECTION 2: BLACS INTERNALS ========================
#=============================================================================
# The following macro definitions set preprocessor values for the BLACS.
# The file Bconfig.h sets these values if they are not set by the makefile.
# User's compiling only the tester can skip this entire section.
# NOTE: The MPI defaults have been set for MPICH.
#=============================================================================

# -----------------------------------------------------------------------
# The directory to find the required communication library include files,
# if they are required by your system.
# -----------------------------------------------------------------------
SYSINC = -I$(MPIINCdir)

# ---------------------------------------------------------------------------
# The Fortran 77 to C interface to be used. If you are unsure of the correct
# setting for your platform, compile and run BLACS/INSTALL/xintface.
# Choices are: Add_, NoChange, UpCase, or f77IsF2C.
# ---------------------------------------------------------------------------
INTFACE = -Df77IsF2C

# ------------------------------------------------------------------------
# Allows the user to vary the topologies that the BLACS default topologies
# (TOP = ' ') correspond to. If you wish to use a particular topology
# (as opposed to letting the BLACS make the choice), uncomment the
# following macros, and replace the character in single quotes with the
# topology of your choice.
# ------------------------------------------------------------------------
# DEFBSTOP = -DDefBSTop="'1'"
# DEFCOMBTOP = -DDefCombTop="'1'"

# -------------------------------------------------------------------
# If your MPI_Send is locally-blocking, substitute the following line
# for the empty macro definition below.
# SENDIS = -DSndIsLocBlk
# -------------------------------------------------------------------
SENDIS =

# --------------------------------------------------------------------
# If your MPI handles packing of non-contiguous messages by copying to
# another buffer or sending extra bytes, better performance may be
# obtained by replacing the empty macro definition below with the
# macro definition on the following line.
# BUFF = -DNoMpiBuff
# --------------------------------------------------------------------
BUFF =

# -----------------------------------------------------------------------
# If you know something about your system, you may make it easier for the
# BLACS to translate between C and fortran communicators. If the empty
# macro defininition is left alone, this translation will cause the C
# BLACS to globally block for MPI_COMM_WORLD on calls to BLACS_GRIDINIT
# and BLACS_GRIDMAP. If you choose one of the options for translating
# the context, neither the C or fortran calls will globally block.
# If you are using MPICH, or a derivitive system, you can replace the
# empty macro definition below with the following (note that if you let
# MPICH do the translation between C and fortran, you must also indicate
# here if your system has pointers that are longer than integers. If so,
# define -DPOINTER_64_BITS=1.) For help on setting TRANSCOMM, you can
# run BLACS/INSTALL/xtc_CsameF77 and BLACS/INSTALL/xtc_UseMpich as
# explained in BLACS/INSTALL/README.
# TRANSCOMM = -DUseMpich
#
# If you know that your MPI uses the same handles for fortran and C
# communicators, you can replace the empty macro definition below with
# the macro definition on the following line.
# TRANSCOMM = -DCSameF77
# -----------------------------------------------------------------------
TRANSCOMM =

# --------------------------------------------------------------------------
# You may choose to have the BLACS internally call either the C or Fortran77
# interface to MPI by varying the following macro. If TRANSCOMM is left
# empty, the C interface BLACS_GRIDMAP/BLACS_GRIDINIT will globally-block if
# you choose to use the fortran internals, and the fortran interface will
# block if you choose to use the C internals. It is recommended that the
# user leave this macro definition blank, unless there is a strong reason
# to prefer one MPI interface over the other.
# WHATMPI = -DUseF77Mpi
# WHATMPI = -DUseCMpi
# --------------------------------------------------------------------------
WHATMPI =

# ---------------------------------------------------------------------------
# Some early versions of MPICH and its derivatives cannot handle user defined
# zero byte data types. If your system has this problem (compile and run
# BLACS/INSTALL/xsyserrors to check if unsure), replace the empty macro
# definition below with the macro definition on the following line.
SYSERRORS = -DZeroByteTypeBug
# ---------------------------------------------------------------------------
# SYSERRORS =

# ------------------------------------------------------------------
# These macros set the debug level for the BLACS. The fastest
# code is produced by BlacsDebugLvl 0. Higher levels provide
# more debug information at the cost of performance. Present levels
# of debug are:
# 0 : No debug information
# 1 : Mainly parameter checking.
# ------------------------------------------------------------------
DEBUGLVL = -DBlacsDebugLvl=$(BLACSDBGLVL)

# -------------------------------------------------------------------------
# All BLACS definitions needed for compile (DEFS1 contains definitions used
# by all BLACS versions).
# -------------------------------------------------------------------------
DEFS1 = -DSYSINC $(SYSINC) $(INTFACE) $(DEFBSTOP) $(DEFCOMBTOP) $(DEBUGLVL)
BLACSDEFS = $(DEFS1) $(SENDIS) $(BUFF) $(TRANSCOMM) $(WHATMPI) $(SYSERRORS)
#=============================================================================
#=============================== End SECTION 2 ===============================
#=============================================================================


#=============================================================================
#=========================== SECTION 3: COMPILERS ============================
#=============================================================================
# The following macros specify compilers, linker/loaders, the archiver,
# and their options. Some of the fortran files need to be compiled with no
# optimization. This is the F77NO_OPTFLAG. The usage of the remaining
# macros should be obvious from the names.
#=============================================================================
F77 = /opt/MPICH2/bin/mpif77
# F77 = f77

F77NO_OPTFLAGS =
F77FLAGS = $(F77NO_OPTFLAGS) -O
F77LOADER = $(F77)
F77LOADFLAGS =
CC = /opt/MPICH2/bin/mpicc
# CC = gcc
CCFLAGS = -O4
CCLOADER = $(CC)
CCLOADFLAGS =

# --------------------------------------------------------------------------
# The archiver and the flag(s) to use when building an archive (library).
# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo.
# --------------------------------------------------------------------------

ARCH = ar
ARCHFLAGS = r
RANLIB = ranlib

#=============================================================================
#=============================== End SECTION 3 ===============================
#=============================================================================


/BLACS/TESTING/Makefile

include ../Bmake.inc

# ---------------------------------------------------------------------
# The file tools.f contains some LAPACK routines that the tester calls.
# If you have ScaLAPACK, you may point to your tools library instead
# of compiling this file.
# ---------------------------------------------------------------------
tools = tools.o

exe : all
ctest : $(CTESTexe) dat
ftest : $(FTESTexe) dat
all : $(FTESTexe) $(CTESTexe) dat
dat : $(TESTdir)/bt.dat $(TESTdir)/sdrv.dat $(TESTdir)/bsbr.dat \
$(TESTdir)/comb.dat

obj = blacstest.o btprim_$(COMMLIB).o

$(CTESTexe): $(obj) $(tools)
$(CC) -c $(CCFLAGS) -DBTCINTFACE $(BLACSDEFS) Cbt.c
$(F77LOADER) $(F77LOADFLAGS) -o $@ $(obj) $(tools) Cbt.o $(BTLIBS)

$(FTESTexe): $(obj) $(tools)
$(F77LOADER) $(F77LOADFLAGS) -o $@ $(obj) $(tools) $(BTLIBS)

# --------------------------------------------------------------------
# The files tools.f and blacstest.f are compiled without optimization.
# Tools.f contains the LAPACK routines slamch and dlamch, which only
# operate correctly for low-levels of optimization. Blacstest.f is
# extremely large, and optimizing it takes a long time. More
# importantly, the sun's f77 compiler seems to produce errors in
# trying to optimize such a large file. We therefore insist that it
# also not be optimized.
# --------------------------------------------------------------------
tools.o : tools.f
# $(F77) $(F77NO_OPTFLAGS) -fno-globals -fno-f90 -fugly-complex -w -c $*.f
$(F77) $(F77NO_OPTFLAGS) -c $*.f
blacstest.o : blacstest.f
$(F77) $(F77NO_OPTFLAGS) -fno-globals -fno-f90 -fugly-complex -w -c $*.f

# $(F77) $(F77NO_OPTFLAGS) -c $*.f

$(TESTdir)/bt.dat : $(BTOPdir)/TESTING/bt.dat
cp $(BTOPdir)/TESTING/bt.dat $(TESTdir)/

$(TESTdir)/sdrv.dat : $(BTOPdir)/TESTING/sdrv.dat
cp $(BTOPdir)/TESTING/sdrv.dat $(TESTdir)/

$(TESTdir)/bsbr.dat : $(BTOPdir)/TESTING/bsbr.dat
cp $(BTOPdir)/TESTING/bsbr.dat $(TESTdir)/

$(TESTdir)/comb.dat : $(BTOPdir)/TESTING/comb.dat
cp $(BTOPdir)/TESTING/comb.dat $(TESTdir)/

btprim_MPI.o : btprim_MPI.f
make mpif.h
$(F77) -c $(F77FLAGS) $*.f

btprim_PVM.o : btprim_PVM.f
make fpvm3.h
$(F77) -c $(F77FLAGS) $*.f

mpif.h : $(MPIINCdir)/mpif.h
rm -f mpif.h
ln -s $(MPIINCdir)/mpif.h mpif.h

fpvm3.h : $(PVMINCdir)/fpvm3.h
rm -f fpvm3.h
ln -s $(PVMINCdir)/fpvm3.h fpvm3.h

clean :
rm -f $(obj) tools.o Cbt.o mpif.h fpvm3.h

.f.o: ; $(F77) -c $(F77FLAGS) $*.f


I would be glad if u can show me how to eliminate this error. I guess i have made the necessary changes to use the MPICH2 version of mpi.

Thank you,
Jagadish
Jax777
 
Posts: 12
Joined: Mon Sep 25, 2006 1:29 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 6 guests