Re: @sgemv: WRAPIT error from linking to LAPACK

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 9 Oct 2006 08:49:13 -0600 (MDT)

Xiaoyi,

I see Dennis has been working with you on this problem. I just wanted
to let you know that I downloaded the eof_scalar.f90 file, and ran a
similar WRAPIT command that you listed below, and didn't have any
problems loading the file:

% WRAPIT -L /usr/local/lib64/r4i4 -l lapack -l essl eof_scalar.stub eof_scalar.f90

WRAPIT Version: 090806
COMPILING eof_scalar.f90
** eof_scalar === End of Compilation 1 ===
1501-510 Compilation successful for file eof_scalar.f90.
LINKING
END WRAPIT

% ncl
  Copyright (C) 1995-2006 - All Rights Reserved
  University Corporation for Atmospheric Research
  NCAR Command Language Version 4.2.0.a034
  The use of this software is governed by a License Agreement.
  See http://www.ncl.ucar.edu/ for more details.
ncl 0> external eof "./eof_scalar.so"
ncl 1>

The SGEMV symbol should be defined in the libessl.a library:

bs1201en[43] nm /usr/lib/libessl.a | grep -i sgemv
.esvsgemv T 7144700
.sgemv T 429128
.sgemv_ T 3820652
_&sgemv$ d 12672 8
_&sgemv$ d 302708 4
esvsgemv D 297128 12
sgemv D 301052 12
sgemv.f f -
sgemv_ D 287036 12

Do you see something like this?

Also, you need to make sure you are linking to 64-bit versions
of the lapack and essl libraries.

--Mary

On Fri, 6 Oct 2006, Xiaoyi Sun wrote:

> Hi folks,
>
> 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:?
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 09 2006 - 08:49:13 MDT

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