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

Undefined symbol - lapack math libs
Hi,
I have an application which uses math/matrix solving lib like blas,
lapack. When i build the binary using forte7 , it passes. But when i
change the compiler to forte8, i get 2 undefined symbol errors :

Undefined                       first referenced
symbol                             in file
zgetrf_
../../output/SunOS_32/lib/forte8/opt/libsmx.a(smxlapack.o)
zgetrs_
../../output/SunOS_32/lib/forte8/opt/libsmx.a(smxlapack.o)

Any clue as what could be the reason ? Any options i need to provide
to
the linker or the library which contains these functions?

Regards, ~Pervinder

Report this thread to moderator Post Follow-up to this message
Old Post
pervinder
08-31-04 01:58 PM


Re: Undefined symbol - lapack math libs
pervinder@gmail.com (pervinder) wrote in message news:<909863a4.0408310003.7eb52d6c@posting
.google.com>...
> Hi,
> I have an application which uses math/matrix solving lib like blas,
> lapack. When i build the binary using forte7 , it passes. But when i
> change the compiler to forte8, i get 2 undefined symbol errors :
>
> Undefined                       first referenced
>  symbol                             in file
> zgetrf_
> ../../output/SunOS_32/lib/forte8/opt/libsmx.a(smxlapack.o)
> zgetrs_
> ../../output/SunOS_32/lib/forte8/opt/libsmx.a(smxlapack.o)
>
> Any clue as what could be the reason ? Any options i need to provide
> to
> the linker or the library which contains these functions?

Those two routines are part of LAPACK.  The pair of them are used
to solve systems of simultaneous linear equations.  Which
implementation of LAPACK are you using?

Sincerely,
Bob Corbett

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Corbett
09-01-04 08:58 AM


Re: Undefined symbol - lapack math libs
Hello Bob,

Its in c and LAPACK routine (version 3.0)
I found that zgetrf_ and zgetrs_ are defined in the zgetrf/zgetrs.c files
I do not unbderstand the behavior as why its not working with forte8 ?
Thanks for your help.

-Pervinder

robert.corbett@sun.com (Robert Corbett) wrote in message news:<cb977dbc.0408312034.52260faa
@posting.google.com>...
> pervinder@gmail.com (pervinder) wrote in message news:<909863a4.0408310003
.7eb52d6c@posting.google.com>... 
>
> Those two routines are part of LAPACK.  The pair of them are used
> to solve systems of simultaneous linear equations.  Which
> implementation of LAPACK are you using?
>
>                                          Sincerely,
>                                          Bob Corbett

Report this thread to moderator Post Follow-up to this message
Old Post
pervinder
09-03-04 08:57 AM


Re: Undefined symbol - lapack math libs
pervinder wrote:

(regarding undefined external symbols in compiling LAPACK)

> Its in c and LAPACK routine (version 3.0)
> I found that zgetrf_ and zgetrs_ are defined in the zgetrf/zgetrs.c files
> I do not unbderstand the behavior as why its not working with forte8 ?
> Thanks for your help.


Mixing Fortran and C is compiler dependent.  They may have changed
the calling methods between versions.

Some Fortran and/or C compilers add prefix or suffix underscore
onto the names generated in the object files.  It might be that
they changed that between versions.

-- glen


Report this thread to moderator Post Follow-up to this message
Old Post
glen herrmannsfeldt
09-03-04 08:57 AM


Re: Undefined symbol - lapack math libs
Hi Glen,
Problem got resolved on Sun. But now the HP-UX is giving errors for
blas and lapack math related stuff.

dgetrs_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
dsytrs_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
zgetrf_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
zgemm_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
dgesvd_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
zgetrs_ (first referenced in
../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
dlamch (first referenced in
../../output/tarkits/HPUX_32/acc352/dbg/cadmosPub/pub/lib/32bit/liblapack++
.a(lautil.o))
(code)

Regards, ~Pervinder

glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote in message news:<7MUZc.18640$3l3.2981@attb
i_s03>...
> pervinder wrote:
>
> (regarding undefined external symbols in compiling LAPACK)
> 
>
>
> Mixing Fortran and C is compiler dependent.  They may have changed
> the calling methods between versions.
>
> Some Fortran and/or C compilers add prefix or suffix underscore
> onto the names generated in the object files.  It might be that
> they changed that between versions.
>
> -- glen

Report this thread to moderator Post Follow-up to this message
Old Post
pervinder
09-22-04 02:09 PM


Re: Undefined symbol - lapack math libs
pervinder wrote:
>
> Hi Glen,
> Problem got resolved on Sun. But now the HP-UX is giving errors for
> blas and lapack math related stuff.
>
>    dgetrs_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    dsytrs_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    zgetrf_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    zgemm_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    dgesvd_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    zgetrs_ (first referenced in
> ../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code)
>    dlamch (first referenced in
> ../../output/tarkits/HPUX_32/acc352/dbg/cadmosPub/pub/lib/32bit/liblapack+
+.a(lautil.o))
> (code)
>

Hello Pervinder,

you will have to distinguish these two platforms in the C/C++ code:
The Fortran compiler on HPUX does not usually (*) add the trailing
underscore, whereas those on most other UNIX/Linux platforms do.

(*) There is an option to make do so IIRC

Regards,

Arjen

Report this thread to moderator Post Follow-up to this message
Old Post
Arjen Markus
09-22-04 02:09 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 04:58 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.