[Beowulf] Problem using PGI compiler to link BLACS with mpich

Brian R. Smith brs at rc.usf.edu
Mon May 8 10:25:12 PDT 2006


Ivan,

1) Just FYI, but building Blacs + ScaLAPACK yourself usually (YMMV)
yields less performance than using a vendor supplied library like ACML
or MKL (at least from my experience).  Those versions from netlib are
considered reference versions and are not tuned to your particular
architecture (though the PGI compiler will do _some_ of the work for
you).  BTW, what kind of bugs are you referring to?  I'm curious because
we link against ACML for some of our codes and I haven't noticed
anything strange yet.

2) Your error comes from not linking against your MPI libraries since
you specified to use pgf77 as your linker in Bmake.inc.    

The particular line that failed should compile cleanly if you replace
'pgf77' with 'mpif77'.  Try changing the F77 variable in Bmake.inc to
'mpif77'.


-Brian

--
Brian R. Smith
Research Computing
University of South Florida
4202 E Fowler Avenue, LIB608
http://rc.usf.edu



On Thu, 2006-05-04 at 14:32 -0300, Ivan Silvestre Paganini Marin wrote:
> Hello everybody at Beowulf: this is a rather silly question, but it
> giving me a long lasting headache, so maybe someone here can help me. I
> am trying to compile my scalapack application without using the ACML
> 3.1.0, that has some bugs and problems with compilers, besides some
> other problems. So, I am trying to compile from source my libraries.
> mpich 1.2.7 compiles with no problem with
> +++++++++++++++
> env CFLAGS="-fast" CXXFLAGS="-fast" FFLAGS="-fast" F90FLAGS="-fast"
> LDFLAGS="-fast" \
>  OPTFLAGS="-fast"  CC="pgcc" CXX="pgCC" F90="pgf90"  FC="pgf77"
> CPP="pgCC -E"
> +++++++++++++++
> from PGI guide, and
> ++++++++++++
> /configure --enable-f77 --enable-f90 --prefix=/usr/local/mpich-1.2.7
> --enable-g --enable-debug --enable-dlast -rsh=ssh
> ++++++++++++
> to configure. The tests ran ok. Then I try to compile BLACS from source
> with the attached Bmake.inc, and when I try to run the BLACS tests, I
> got this:
> ++++++++++++
> root at monge:/usr/local/BLACS-pgi/TESTING# make
> pgf77  -o /usr/local/BLACS-pgi/TESTING/EXE/xFbtest_MPI-LINUX-0
> blacstest.o btprim_MPI.o
> tools.o /usr/local/BLACS-pgi/LIB/blacsF77init.a /usr/local/BLACS-pgi/LIB/blacs.a /usr/local/BLACS-pgi/LIB/blacsF77init.a /usr/local/mpich-1.2.7//lib//libmpich.a 
> btprim_MPI.o: In function `btsetup_':btprim_MPI.f:(.text+0x1c):
> undefined reference to `mpi_initialized_'
> :btprim_MPI.f:(.text+0x2f): undefined reference to `mpi_init_'
> :btprim_MPI.f:(.text+0x60): undefined reference to `mpi_comm_dup_'
> btprim_MPI.o: In function `ibtmyproc_':btprim_MPI.f:(.text+0xa7):
> undefined reference to `mpi_comm_rank_'
> btprim_MPI.o: In function `ibtnprocs_':btprim_MPI.f:(.text+0xe7):
> undefined reference to `mpi_comm_size_'
> btprim_MPI.o: In function `btsend_':btprim_MPI.f:(.text+0x1ef):
> undefined reference to `mpi_send_'
> :btprim_MPI.f:(.text+0x255): undefined reference to `mpi_send_'
> btprim_MPI.o: In function `btrecv_':btprim_MPI.f:(.text+0x328):
> undefined reference to `mpi_recv_'
> btprim_MPI.o: In function `ibtsizeof_':btprim_MPI.f:(.text+0x376):
> undefined reference to `mpi_initialized_'
> :btprim_MPI.f:(.text+0x38c): undefined reference to `mpi_init_'
> +++++++++++
> what is clearly a name mangling problem, but I was not able to solve
> it. 
> So I am not sure that the libraries are compiled correctly or are
> working, and I will not dare to go further to compiling scalapack
> without checking that BLACS is ok. 
> 
> Any ideas?
> 
> Thank you very much!
> 
> Ivan Marin
> Laboratório de Fïsica Computacional
> Instituto de Física de São Carlos
> Universidade de São Paulo
> 
> 
> 
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf




More information about the Beowulf mailing list