Newsgroups: comp.parallel.mpi
From: Thomas Fuerle <fuerle@vipios.pri.univie.ac.at>
Subject: Re: Replacing hcc
Organization: Vienna University, Austria
Date: Wed, 11 Mar 1998 12:50:55 +0100
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="------------518647C7C1BA5E644DFBA414"
Message-ID: <35067A9E.ACAFD7B7@vipios.pri.univie.ac.at>


--------------518647C7C1BA5E644DFBA414
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Patrice Hamelin wrote:

> Hi,
>
>   I have an application that runs in XWindow with some parallel tasks
> in
>
> background.  I want to port that application to MPI with LAM 6.1 but I
>
> suspect hcc to cause an "Illegal Instruction" when a call to
> "XtVaAppInitialize()" is make.  So I'm trying to replace hcc with my
> gcc
>
> compiler.  Here are my two command lines to compile and link.
>
> gcc -c  -g -I/usr/dt/include -I/usr/openwin/include -I/u/avx/allium/h
> -I/u/uq/include -I/usr/local/lam/h postproc.c
> gcc -o postproc -R/usr/dt/lib:/usr/openwin/lib postproc.o
> -L/usr/dt/lib
> -lMrm -lXm -L/usr/openwin/lib -lXt -lX11 -ldl -lw -lgen -lm
> -L/u/uq/lib
> -llabo -L/usr/local/lam/lib -lmpi -ltrillium -lt -lsocket -lnsl
>
> And the result of linking is:
> Undefined                       first referenced
>  symbol                             in file
> tprintf
> /usr/local/lam/lib/libmpi.a(lamdeferr.o)
> ld: fatal: Symbol referencing errors. No output written to postproc
>
> Can somebody help me please.!!  :-(
> Thanks in advance.
>
> --
> --
> --------------------------------------------------------------------
>     _/_/_/_/  _/_/_/_/  _/_/_/_/  Patrice Hamelin ing.
>    _/_/_/_/  _/_/_/_/  _/_/_/_/   Universite du Quebec a
> Trois-Rivieres
>   _/_/_/_/  _/_/_/_/  _/_/_/_/    Ecole d'ingenierie,
>  _/_/_/_/  _/_/_/_/  _/_/_/_/     Departement de Genie Electrique.
> _/_/_/_/  _/_/_/_/  _/_/_/_/      C.P. 500, Local LP-2501
>                    _/_/_/_/       Trois-Rivieres, Quebec
>                   _/_/_/_/        Canada,  G9A 5H7
>                  _/_/_/_/         Tel: (819) 376-5011, ext. 3971
>                 _/_/_/_/          Fax: (819) 376-5219
> -----------------------------------------------------
> -----------------
>      http://ecoleing.uqtr.uquebec.ca/geniedoc/ge/biochamps
>      http://www.geocities.com/MotorCity/1517
>
> ----------------------------------------------------------------------


You just need an additional library called libtstdio.a in
/usr/local/lam/lib like

... -L/usr/local/lam/lib -lmpi -ltrillium -ltstdio -lt -lsocket -lnsl
...

then everything should work.

btw, if you are looking in which lib such a functions exists, use nm
libxxx.a

e.g.

> nm libmpi.a | grep tprintf
[17]    |         0|       0|NOTY |GLOB |0    |UNDEF  |tprintf
>

=> tprintf is undefined in libmpi.a

> nm libtstdio.a | grep tprintf
[10]    |         0|      56|FUNC |GLOB |0    |2      |tprintf
>

==> here we go, this is exactly the way I solved your problem


Best regards, Tom

--
Thomas Fuerle
mailto:fuerle@vipios.pri.univie.ac.at
http://vipios.pri.univie.ac.at
Institute for Applied Computer Science and Information Systems
University of  Vienna, Rathausstr. 19/4, A-1010 Vienna, Austria
Tel: +43 1 4277 38423


--------------518647C7C1BA5E644DFBA414
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Patrice Hamelin wrote:
<BLOCKQUOTE TYPE=CITE>Hi,

<P>&nbsp; I have an application that runs in XWindow with some parallel
tasks in

<P>background.&nbsp; I want to port that application to MPI with LAM 6.1
but I
<BR>suspect hcc to cause an "Illegal Instruction" when a call to
<BR>"XtVaAppInitialize()" is make.&nbsp; So I'm trying to replace hcc with
my gcc

<P>compiler.&nbsp; Here are my two command lines to compile and link.

<P>gcc -c&nbsp; -g -I/usr/dt/include -I/usr/openwin/include -I/u/avx/allium/h
<BR>-I/u/uq/include -I/usr/local/lam/h postproc.c
<BR>gcc -o postproc -R/usr/dt/lib:/usr/openwin/lib postproc.o -L/usr/dt/lib
<BR>-lMrm -lXm -L/usr/openwin/lib -lXt -lX11 -ldl -lw -lgen -lm -L/u/uq/lib
<BR>-llabo -L/usr/local/lam/lib -lmpi -ltrillium -lt -lsocket -lnsl

<P>And the result of linking is:
<BR>Undefined&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
first referenced
<BR>&nbsp;symbol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
in file
<BR>tprintf
<BR>/usr/local/lam/lib/libmpi.a(lamdeferr.o)
<BR>ld: fatal: Symbol referencing errors. No output written to postproc

<P>Can somebody help me please.!!&nbsp; :-(
<BR>Thanks in advance.

<P>--
<BR>-----------------------------------------------------------------------
<BR>&nbsp;&nbsp;&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp; Patrice
Hamelin ing.
<BR>&nbsp;&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp;&nbsp; Universite
du Quebec a Trois-Rivieres
<BR>&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp;&nbsp;&nbsp; Ecole
d'ingenierie,
<BR>&nbsp;_/_/_/_/&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;
Departement de Genie Electrique.
<BR>_/_/_/_/&nbsp; _/_/_/_/&nbsp; _/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
C.P. 500, Local LP-2501
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Trois-Rivieres, Quebec
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Canada,&nbsp; G9A 5H7
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel: (819) 376-5011,
ext. 3971
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_/_/_/_/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax: (819)
376-5219
<BR>-----------------------------------------------------------------------
<BR>&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="http://ecoleing.uqtr.uquebec.ca/geniedoc/ge/biochamps">http://ecoleing.uqtr.uquebec.ca/geniedoc/ge/biochamps</A>
<BR>&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="http://www.geocities.com/MotorCity/1517">http://www.geocities.com/MotorCity/1517</A>
<BR>-----------------------------------------------------------------------</BLOCKQUOTE>
&nbsp;
<BR>You just need an additional library called libtstdio.a in /usr/local/lam/lib
like

<P>... -L/usr/local/lam/lib -lmpi -ltrillium <FONT COLOR="#FF0000">-ltstdio
</FONT>-lt -lsocket -lnsl ...

<P>then everything should work.

<P>btw, if you are looking in which lib such a functions exists, use nm
libxxx.a

<P>e.g.

<P>> nm libmpi.a | grep tprintf
<BR>[17]&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0|NOTY |GLOB |0&nbsp;&nbsp;&nbsp;
|UNDEF&nbsp; |tprintf
<BR>>

<P>=> tprintf is undefined in libmpi.a

<P>> nm libtstdio.a | grep tprintf
<BR>[10]&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56|FUNC |GLOB |0&nbsp;&nbsp;&nbsp; |2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|tprintf
<BR>>

<P>==> here we go, this is exactly the way I solved your problem
<BR>&nbsp;

<P>Best regards, Tom

<P>--
<BR>Thomas Fuerle
<BR><A HREF="mailto:fuerle@vipios.pri.univie.ac.at">mailto:fuerle@vipios.pri.univie.ac.at</A>
<BR><A HREF="http://vipios.pri.univie.ac.at">http://vipios.pri.univie.ac.at</A>
<BR>Institute for Applied Computer Science and Information Systems
<BR>University of&nbsp; Vienna, Rathausstr. 19/4, A-1010 Vienna, Austria
<BR>Tel: +43 1 4277 38423
<BR>&nbsp;</HTML>

--------------518647C7C1BA5E644DFBA414--


