LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: ravindra_04 (ravindra_04_at_[hidden])
Date: 2005-04-13 12:39:22


thanks damien....
i m able to compile it.. after changing CDEFS definition i changed it to -DAdd_ ....
now i will try to run the example codes.....
thanks again
ravi

damien_at_[hidden] wrote:
Two things jump out at me here.

1) Your CDEFS definition in SLMake.inc doesn't line up with INTFACE in
your BLACS. You should have -DAdd_ for both with the Intel fortran
compiler (they should be the same setting for whatever fortran compiler
you use). Unfortunately BLACs calls this macro INTFACE and SCALAPACK
calls it CDEFS, but it's the same thing. This is likely the cause of your
link errors, SCALAPACK is looking for pb_topset_ for example, and the
library symbol is pb_topset, without the underscore. They're not the same
symbol.

2) You're using the BLAS_Linux library in SCALAPACK. You'd be much
better off using either the GOTO BLAS,
http://www.cs.utexas.edu/users/flame/goto/ or the ATLAS library,
http://math-atlas.sourceforge.net/. BLAS_Linux is pretty slow. BUT:
Don't try ATLAS or GOTO until you have your current problem linking and
working. I use ATLAS myself. If you use ATLAS, read the docs carefully.

Damien

> i m using gcc compiler --> for c and intel fortran -->
> intel_fc_80.....other information if desired..
> kernal version 2.6.9-1.667smp, fedora-3, intel P4 3.6 GHz
>
> the Bmake.inc is as
> #=============================================================================
> #====================== 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 = /usr/local/include/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
> 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/LAM
> MPIdev =
> MPIplat =
> MPILIBdir =
> MPIINCdir = $(MPIdir)/include
> MPILIB =
>
> # -------------------------------------
> # 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)
> SYSINC =
> #
> ---------------------------------------------------------------------------
> # 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 = -DAdd_
>
> #
> ------------------------------------------------------------------------
> # 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 = -DNoMpiBuff
>
> # -----------------------------------------------------------------------
> # 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
> TRANSCOMM = -DUseMpi2
> #
> # 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 = f77
> F77 = mpif77
> F77NO_OPTFLAGS = -fp_port
> F77FLAGS = $(F77NO_OPTFLAGS)
> F77LOADER = $(F77)
> F77LOADFLAGS =
> CC = mpicc
> 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
> ===============================
> #=============================================================================
>
> and SLmake.inc files is as ......
>
> ############################################################################
> #
> # Program: ScaLAPACK
> #
> # Module: SLmake.inc
> #
> # Purpose: Top-level Definitions
> #
> # Creation date: February 15, 2000
> #
> # Modified:
> #
> # Send bug reports, comments or suggestions to scalapack_at_[hidden]
> #
> ############################################################################
> #
> SHELL = /bin/sh
> #
> # The complete path to the top level of ScaLAPACK directory, usually
> # $(HOME)/SCALAPACK
> #
> home = /usr/local/include/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 = /usr/local/include/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 =
> BLACSFINIT = $(BLACSdir)/blacsF77init_MPI-$(PLAT)-$(BLACSDBGLVL).a
> BLACSCINIT = $(BLACSdir)/blacsCinit_MPI-$(PLAT)-$(BLACSDBGLVL).a
> BLACSLIB = $(BLACSdir)/blacs_MPI-$(PLAT)-$(BLACSDBGLVL).a
> TESTINGdir = /usr/local/include/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 = /usr/local/include/SCALAPACK/PBLAS
> SRCdir = /usr/local/include/SCALAPACK/SRC
> TESTdir = /usr/local/include/SCALAPACK/TESTING
> PBLASTSTdir = $(TESTINGdir)
> TOOLSdir = /usr/local/include/SCALAPACK/TOOLS
> REDISTdir = /usr/local/include/SCALAPACK/REDIST
> REDISTTSTdir = $(TESTINGdir)
> #
> # The fortran and C compilers, loaders, and their flags
> #
> F77 = mpif77
> CC = mpicc
> NOOPT =
> F77FLAGS = $(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 = /usr/local/include/SCALAPACK/libscalapack.a
> BLASLIB = /usr/local/include/BLAS/blas_LINUX.a
> #
> PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB)
> PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
> RLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(CBLACSLIB) $(BLASLIB)
> $(SMPLIB)
> LIBS = $(PBLIBS)
>
> the files are there as u asked for.....
> tia .................ravi
>
>
> damien_at_[hidden] wrote:
> Post your Bmake.inc and SLmake.inc files. This should be easy to fix.
> What C/C++ compiler are you using?
>
> Damien
>
>>
>> i m using intel fortran compiler for my fortran codes when i m trying to
>> run the test code using following commands
>>
>> mpif77 example1.f \
>>> /usr/local/include/libscalapack.a \
>>> /usr/local/include/blacsF77init_MPI-LINUX-0.a \
>>> /usr/local/include/blacsCinit_MPI-LINUX-0.a \
>>> /usr/local/include/blacs_MPI-LINUX-0.a \
>>> /usr/local/include/blas_LINUX.a
>>
>> i m getting the following error....
>>
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x1ae): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topget_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x1d0): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topget_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x1f2): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topget_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x214): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topset_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x236): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topset_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x258): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topset_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x892): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topset_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x8b4): In function
>> `pdgetrf_':
>> : undefined reference to `pb_topset_'
>> /usr/local/include/libscalapack.a(pdgetrf.o)(.text+0x8d6): more
>> undefined
>> references to `pb_topset_' follow
>> /usr/local/include/libscalapack.a(pdgetf2.o)(.text+0x1fb): In function
>> `pdgetf2_':
>> : undefined reference to `pb_topget_'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_setup_.o)(.text+0x5): In
>> function `blacs_setup_':
>> : undefined reference to `Cblacs_pinfo'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_get_.o)(.text+0x128): In
>> function `blacs_get_':
>> : undefined reference to `Cblacs_pinfo'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_get_.o)(.text+0x13d): In
>> function `blacs_get_':
>> : undefined reference to `Cblacs_pinfo'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_gridmap_.o)(.text+0x2ac):
>> In
>> function `blacs_gridmap_':
>> : undefined reference to `Cblacs_pinfo'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x13e): In
>> function `Cblacs_get':
>> : undefined reference to `Cblacs_pinfo'
>> /usr/local/include/blacs_MPI-LINUX-0.a(blacs_get_.C)(.text+0x167): more
>> undefined references to `Cblacs_pinfo' follow
>> mpif77: No such file or directory
>>
>> i tried to look for pb_topget.* and pb_topset.* but i could not find
>> it...where and how can i get these......please suggest some suitable
>> measure to come out of this.....
>> thanks in advance...
>> ravi
>>
>> Get Your Private, Free E-mail from Indiatimes at
>> http://email.indiatimes.com
>>
>> Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
>>
>> Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to
>> http://airsahara.indiatimes.com and Bid Now!
>>
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>
>
> Get Your Private, Free E-mail from Indiatimes at
> http://email.indiatimes.com
>
> Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
>
> Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to
> http://airsahara.indiatimes.com and Bid Now!
>
>

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now!