Re: WRAPIT script for Fortran 90 code

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun, 26 Jul 2009 21:42:10 -0600 (MDT)

This error looks like there was a problem creating the *.so file.

  - What kind of system is this on? (uname -a)

  - What version of NCL do you have? (ncl -V)

  - Exactly how are you running WRAPIT?

  - Can you run WRAPIT with the "-d" option and send me the full
    output?

  - Would you try this with an F77 example and let me know
    what happens?

    http://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml#Example_1

Thanks,

--Mary

On Sun, 26 Jul 2009, Changlin Chen wrote:

> Hi:
> I using the WRAPIT script for Fortran 90 code.
> I follow the manuals in http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclExtend.shtml.
>
> Create file "cquad.f90":
> ************************************
> subroutine cquad(a,b,c,nq,x,quad)
> implicit none
> integer, intent(in) ::nq
> real, intent(in) ::a,b,c,x(nq)
> real, intent(out) ::quad(nq)
> integer ::i
> quad = a*x**2+b*x+c
> return
> end subroutine cquad:
> ***************************************
> Create a separate file, called "cquad90.stub" :
> **********************************
> C NCLFORTSTART
> subroutine cquad(a,b,c,nq,x,quad)
> real a,b,c
> integer nq
> dimension x(nq),quad(nq)
> C NCLEND
> ******************************************
> And then run the ncl file test.ncl:
> ******************************************
> external EX01 "./cquad90.so"
> begin
> ;
> ; Calculate three values of a quadratic equation
> ;
> nump = 3
> x = (/ -1., 0.0, 1.0 /)
> qval = new(nump,float)
> EX01::cquad(-1., 2., 3., nump, x, qval) ; Call the NCL version of
> ; your Fortran subroutine.
> print("Polynomial value = " + qval) ; Should be (/0,3,4/)
> ;
> ; Calculate an arc length.
> ;
> xc = (/ 0., 1., 2. /)
> yc = (/ 0., 1., 0. /)
> arclen = EX01::arcln(nump,xc,yc) ; Call the NCL version of
> ; your Fortran function.
> print("Arc length = " + arclen) ; should be 2.82843
> end
> ******************************************
>
> An error occur:
> warning:An error occurred loading the external file ./cquad90.so, file not loaded
> ./cquad90.so: undefined symbol: NclGetArgValue
> warning:error at line 4 in file test.ncl
>
> So what's the problem? Thanks!
>
>
> Clchen
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 26 2009 - 21:42:10 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 29 2009 - 09:07:41 MDT