using wrapit and the fortran - ncl interface on solaris

From: James D. Scott (James.D.Scott AT XXXXXX)
Date: Tue Jun 03 2003 - 10:32:47 MDT


I am trying to incorporate a fortran (77) subroutine into ncl for
the first time and I am having trouble. I'm trying something very
simple for starters. I suspect I am not creating the .so file properly
on our Solaris system. Does anyone have an idea what might be wrong?
-Thanks,
  Jamie Scott

->Here is what my fortran code looks like (test.f):

! NCLFORTSTART
       subroutine test(x,y,z,a)
       real x,y,z,a
! NCLFORTEND
       a=x+y+z
       return
       end
>_______________

->Here is what my ncl code looks like: (test.ncl)

load "/home/jds/ncl/lib/gsn_code.ncl"
load "/home/jds/ncl/lib/gsn_csm.ncl"
load "/home/jds/ncl/lib/contributed.ncl"

x=1
y=2
z=3
a = new(1,float)

external subs "/home/jds/ncl/test.so"
begin
subs::test(x,y,z,a)
print(a)
end
>________________________

->Wrapit says there is a syntax error while parsing, but still creates a .so file:

sr1{jds} 133: ./WRAPIT.csh -d test.f

WRAPIT Version: 030422
OPERATING SYSTEM: SunOS
A syntax error occurred while parsing:
COMPILING test.f
SHARED OBJECT NAME (SharedObj): test.so
LINKER SUFFIX (ld_suffux): WRAPIT.o test.o -o test.so

LINKING
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.273
END WRAPIT
>________________

->Then ncl says it can't find Init() in the external file:

sr1{jds} 132: ncl < test.ncl
  Copyright (C) 1995-2003 - All Rights Reserved
  University Corporation for Atmospheric Research
  NCAR Command Language Version 4.2.0.a028
  The use of this software is governed by a License Agreement.
  See http://ngwww.ucar.edu/ncl/ for more details.
warning:Could not find Init() in external file /home/jds/ncl/test.so, file not loaded
fatal:syntax error: line 13 before or near :
subs:
----^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed

-- 
****************************************************************
* Jamie Scott                                                  *
* NOAA Climate Diagnostics Center                              *
* R/CDC1                          (303) 497-6257               *
* 325 Broadway                    James.D.Scott@noaa.gov       *
* Boulder, CO 80305-3328          http://www.cdc.noaa.gov/~jds *
****************************************************************

_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Tue Jun 03 2003 - 13:37:56 MDT