Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

BLACS installation problem
When trying to install BLACS, I keep getting these "undefined reference
to..." messages. The problem seems to occur first when building
blacstest.o.

I've attached a typical .inc file.

I've also tried some other compilers. I get very similar results. Thanks
in advance.

Regards,

Håkan Lane
(Remove NO, SPAM and PLEASE for direct email)

 #=======================================
====================================
==
#====================== 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)/Libs/BLACS/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 = $(HOME)/Libs/MPICH/mpich-1.2.6
MPIdev =
MPIplat =
MPILIBdir = $(MPIdir)/lib
MPIINCdir = $(MPIdir)/include
MPILIB = $(MPILIBdir)/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 = -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 =

#
-----------------------------------------------------------------------
#  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 =
#
#  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            = disk/lic/intel/fortran/compiler70/ia32/bin/ifc
F77NO_OPTFLAGS =
F77FLAGS       = $(F77NO_OPTFLAGS) -O -w
F77LOADER      = $(F77)
F77LOADFLAGS   =
CC             = gcc
CCFLAGS        = -O2
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
===============================
 #=======================================
====================================
==

Report this thread to moderator Post Follow-up to this message
Old Post
Håkan Lane
11-17-04 01:57 PM


Re: BLACS installation problem
Håkan Lane wrote:
> When trying to install BLACS, I keep getting these "undefined reference
> to..." messages. The problem seems to occur first when building
> blacstest.o.
>
> I've attached a typical .inc file.
>
> I've also tried some other compilers. I get very similar results. Thanks
> in advance.
>
> Regards,
>
> Håkan Lane

Hi,
I tryied your Bmake.inc and it works fine for me. BTW you should have:
TRANSCOMM = -DCSameF77
if using mpich (I suggest you to use the small programs in BLACS/INSTALL
to set the variables in Bmake.inc).
Maybe the problem is with your mpich installation.
Which are the undefined references that you have?

--
-----------------------------------
Alfredo Buttari,
University  of Rome "Tor Vergata",
Dipartimento Informatica Sistemi e Produzione
Via del Politecnico 1 00133 Roma, Italy
URL: http://claudius.ce.uniroma2.it/~buttari.html

Report this thread to moderator Post Follow-up to this message
Old Post
Alfredo Buttari
11-17-04 08:59 PM


Re: BLACS installation problem
Alfredo,

Thanks for answering. It went better with this setting changed. It's
still not finishing the compilation.

Am I missing something else?

I've now tried with two different versons of mpich. I've pasted the
respective results below. I really appreciate your help.

Regards,

Håkan Lane
(Remove NO, SPAM and PLEASE for direct email)

Error messages with mpich 1.2.6:
btprim_MPI.o: In function `btsetup_':
btprim_MPI.o(.text+0x15): undefined reference to `mpi_initialized_'
btprim_MPI.o(.text+0x29): undefined reference to `mpi_init_'
btprim_MPI.o(.text+0x5b): undefined reference to `mpi_comm_dup_'
btprim_MPI.o: In function `ibtmyproc_':
btprim_MPI.o(.text+0x92): undefined reference to `mpi_comm_rank_'
btprim_MPI.o: In function `ibtnprocs_':
btprim_MPI.o(.text+0xcc): undefined reference to `mpi_comm_size_'
btprim_MPI.o: In function `btsend_':
btprim_MPI.o(.text+0x163): undefined reference to `mpi_send_'
btprim_MPI.o(.text+0x1e0): undefined reference to `mpi_send_'
btprim_MPI.o: In function `btrecv_':
btprim_MPI.o(.text+0x2b3): undefined reference to `mpi_recv_'
btprim_MPI.o: In function `ibtsizeof_':
btprim_MPI.o(.text+0x3b5): undefined reference to `mpi_type_size_'
btprim_MPI.o(.text+0x3f1): undefined reference to `mpi_type_size_'
btprim_MPI.o(.text+0x42d): undefined reference to `mpi_type_size_'
btprim_MPI.o(.text+0x466): undefined reference to `mpi_type_size_'
btprim_MPI.o(.text+0x49b): undefined reference to `mpi_type_size_'
btprim_MPI.o(.text+0x4d0): undefined reference to `mpi_initialized_'
btprim_MPI.o(.text+0x4e6): undefined reference to `mpi_init_'
btprim_MPI.o: In function `btmpierr_':
btprim_MPI.o(.text+0x57b): undefined reference to `mpi_abort_'
/home/haklan/Libs/BLACS/BLACS/LIB/blacsF77init_MPI-LINUX-0.a(Cblacs_pinfo.o)
:
In function `Cblacs_pinfo':
Cblacs_pinfo.o(.text+0x5e): undefined reference to
`bi_f77_get_constants_'
Cblacs_pinfo.o(.text+0x91): undefined reference to `mpi_init_'
/home/haklan/Libs/BLACS/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_BlacsAbort.o):
In function `BI_BlacsAbort':
BI_BlacsAbort.o(.text+0x23): undefined reference to `lam_mpi_comm_world'
/home/haklan/Libs/BLACS/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_Pack.o): In
function `BI_Pack':
BI_Pack.o(.text+0x3f): undefined reference to `lam_mpi_packed'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(pack_size.o): In
function `PMPI_Pack_size':
pack_size.o(.text+0x1cf): undefined reference to `MPIR_I_DCOMPLEX'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(initutil.o): In
function `MPIR_Init':
initutil.o(.text+0x233): undefined reference to
`MPIR_InitFortranDatatypes'
initutil.o(.text+0x8dd): undefined reference to `MPIR_InitFortran'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(finalize.o): In
function `PMPI_Finalize':
finalize.o(.text+0x1b1): undefined reference to `MPIR_Free_Fortran_dtes'
finalize.o(.text+0x250): undefined reference to
`MPIR_Free_Fortran_keyvals'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(attr_util.o): In
function `MPIR_Attr_copy_node':
attr_util.o(.text+0xda): undefined reference to `MPIR_F_TRUE'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(global_ops.o): In
function `MPIR_LAND':
global_ops.o(.text+0x21d4): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x21ec): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x21f3): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x2201): undefined reference to `MPIR_F_FALSE'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(global_ops.o): In
function `MPIR_LOR':
global_ops.o(.text+0x2d32): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x2d4a): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x2d53): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x2d61): undefined reference to `MPIR_F_FALSE'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(global_ops.o): In
function `MPIR_LXOR':
global_ops.o(.text+0x3abc): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x3ad4): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x3aec): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x3b04): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x3b0d): undefined reference to `MPIR_F_TRUE'
global_ops.o(.text+0x3b1b): undefined reference to `MPIR_F_FALSE'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(bswap2.o): In
function `MPID_Mem_XDR_Encode_Logical':
bswap2.o(.text+0x5eb): undefined reference to `MPIR_F_TRUE'
/home/haklan/Libs/MPICH/mpich-1.2.6/lib/libmpich.a(bswap2.o): In
function `MPID_Mem_XDR_Decode_Logical':
bswap2.o(.text+0x892): undefined reference to `MPIR_F_TRUE'
bswap2.o(.text+0x89c): undefined reference to `MPIR_F_FALSE'

Error messages with mpich1.2.5:
/home/haklan/Libs/BLACS/BLACS/LIB/blacsF77init_MPI-LINUX-0.a(Cblacs_pinfo.o)
:
In function `Cblacs_pinfo':
Cblacs_pinfo.o(.text+0x5e): undefined reference to
`bi_f77_get_constants_'
/home/haklan/Libs/BLACS/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_BlacsAbort.o):
In function `BI_BlacsAbort':
BI_BlacsAbort.o(.text+0x23): undefined reference to `lam_mpi_comm_world'
/home/haklan/Libs/BLACS/BLACS/LIB/blacs_MPI-LINUX-0.a(BI_Pack.o): In
function `BI_Pack':
BI_Pack.o(.text+0x3f): undefined reference to `lam_mpi_packed'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_MAXF':
global_ops.o(.text+0x399): undefined reference to `__mth_i_kcmp'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_MINF':
global_ops.o(.text+0x11a1): undefined reference to `__mth_i_kcmp'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_PROD':
global_ops.o(.text+0x30de): undefined reference to `__mth_i_kmul'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_LAND':
global_ops.o(.text+0x3eea): undefined reference to `__mth_i_kcmpz'
global_ops.o(.text+0x3f08): undefined reference to `__mth_i_kcmpz'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_LOR':
global_ops.o(.text+0x50ca): undefined reference to `__mth_i_kcmpz'
global_ops.o(.text+0x50e8): undefined reference to `__mth_i_kcmpz'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_LXOR':
global_ops.o(.text+0x62fc): undefined reference to `__mth_i_kcmpz'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o)(.text+0x631a):
more undefined references to `__mth_i_kcmpz' follow
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o): In function
`MPIR_MAXLOC':
global_ops.o(.text+0x7760): undefined reference to `__mth_i_kcmp'
global_ops.o(.text+0x77b3): undefined reference to `__mth_i_kcmp'
global_ops.o(.text+0x7c0b): undefined reference to `__mth_i_kcmp'
global_ops.o(.text+0x7c37): undefined reference to `__mth_i_kcmp'
global_ops.o(.text+0x7c99): undefined reference to `__mth_i_kcmp'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(global_ops.o)(.text+0x8350):
more undefined references to `__mth_i_kcmp' follow
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(farg.o): In function
`mpir_iargc_':
farg.o(.text+0x17): undefined reference to `iargc_'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(farg.o): In function
`mpir_getarg_':
farg.o(.text+0x4b): undefined reference to `getarg_'
/usr/local/mpich/1.2.5/pgi/lib/libmpich.a(debugutil.o): In function
`MPIR_Breakpoint':
/home/nixon/mpich-1.2.5/src/env/debugutil.c:113: undefined reference to
`__pgdbg_stub'
make[1]: ***
[/home/haklan/Libs/BLACS/BLACS/TESTING/EXE/xCbtest_MPI-LINUX-0] Error 1
make[1]: Leaving directory `/disk/home/haklan/Libs/BLACS/BLACS/TESTING'
make: *** [tester] Error 2

Alfredo Buttari wrote:
>
>
> Hi,
> I tryied your Bmake.inc and it works fine for me. BTW you should have:
> TRANSCOMM = -DCSameF77
> if using mpich (I suggest you to use the small programs in BLACS/INSTALL
>   to set the variables in Bmake.inc).
> Maybe the problem is with your mpich installation.
> Which are the undefined references that you have?
>
> --
> -----------------------------------
> Alfredo Buttari,
> University  of Rome "Tor Vergata",
> Dipartimento Informatica Sistemi e Produzione
> Via del Politecnico 1 00133 Roma, Italy
> URL: http://claudius.ce.uniroma2.it/~buttari.html

Report this thread to moderator Post Follow-up to this message
Old Post
Håkan Lane
11-17-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.