Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagepervinder@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
Post Follow-up to this messageHello 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
Post Follow-up to this messagepervinder 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
Post Follow-up to this messageHi 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
Post Follow-up to this messagepervinder 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.