Re: WRAPIT with LAPACK

From: Xiaoyi Sun <xiaoyirf_at_nyahnyahspammersnyahnyah>
Date: Sat, 7 Oct 2006 21:44:00 -0500

Hi Dennis

The reason I resort to LAPACK is a follow up from ncl-talk question about
CEOF.
http://www.ncl.ucar.edu/Support/talk_archives/all/1149.html

My real target is to wrap a subroutine that calls cheev. When I did that,
the error is

ncl 0> external abc "./SUB_eof_2Dvector_r2c.so"
warning:An error occurred loading the external file ./ceof_cmplx.so, file
not loaded
rtld: 0712-001 Symbol @cgemv was referenced
      from module ./SUB_eof_2Dvector_r2c.so(), but a runtime definition
      of the symbol was not found.
rtld: 0712-002 fatal error: exiting.

However, I have no problem to link to the library in the pure fortran
program.

On 10/7/06, Dennis Shea <shea_at_ucar.edu> wrote:
>
> > I am trying to wrap a f90 subroutine that calls lapack library.
> > The WRAPIT part compiles very well, but when I run the ncl script, I got
> the
> > error:
> >
> >> ncl
> > Copyright (C) 1995-2004 - All Rights Reserved
> > University Corporation for Atmospheric Research
> > NCAR Command Language Version 4.2.0.a032
> > The use of this software is governed by a License Agreement.
> > See http://ngwww.ucar.edu/ncl/ for more details.
> > ncl 0> external eof "./eof_scalar.so"
> > warning:An error occurred loading the external file ./eof_scalar.so,
> file
> > not loaded
> > rtld: 0712-001 Symbol @sgemv was referenced
> > from module ./eof_scalar.so(), but a runtime definition
> > of the symbol was not found.
> > rtld: 0712-002 fatal error: exiting.
> > ncl 1>
> >
> >
> > Here is
> > 1) the link for the f90 subroutine:
> > http://www.cgd.ucar.edu/cas/software/eof_scalar.html
> >
> > 2) the WRAPPER:
> > C NCLFORTSTART
> > SUBROUTINE eof_scalar( ucM, ucN, ucFd, ucE, ucL_N1, ucC )
> > INTEGER ucM,ucN
> > REAL ucFd(ucM,ucN),ucE(ucM,ucN),ucL_N1(ucN),ucC(ucN,ucN)
> > C NCLEND
> >
> > 3) the compile process
> >> WRAPIT -L /usr/common/usg/LAPACK/3.0 -l lapack -l essl eof_scalar.stub
> > eof_scalar.f90
> >
> > WRAPIT Version: 041106
> > COMPILING eof_scalar.f90
> > ** eof_scalar === End of Compilation 1 ===
> > 1501-510 Compilation successful for file eof_scalar.f90.
> > LINKING
> > END WRAPIT
> >
> >
> > I am running AIX with the compile xlf90
> > When I try to locate @sgemv, here is what I get:
> >
> >> grep @sgemv *
> > eof_scalar.so:NhlPError
> > eof_scalar.so:?
> >
> =============================================================
>
> [1] I can not get to an AIX compiler right now.
> However, the message
>
> rtld: 0712-001 Symbol @sgemv was referenced
> from module ./eof_scalar.so(), but a runtime definition
> of the symbol was not found.
>
> indicates that you have not loaded all the required libraries.
>
> [2] Is there a reason you are not using NCL's EOF routines?
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/eofunc.shtml
> http://www.ncl.ucar.edu/Document/Functions/Built-in/eofunc_ts.shtml
>
>
> good luck
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Oct 07 2006 - 20:44:00 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 09 2006 - 09:24:50 MDT