Re: help: WRAPIT

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 12 2013 - 10:34:32 MDT

Hi Sha,

>From the error, it looks like the routine is not called "area_wgt_avg_4D" in your Fortran 90 program. Or, perhaps, there's an issue with the underscores. We've seen some cases where if you have underscores in the name of the subroutine, the compiler appends an extra underscores when it compiles it. However, the latest version of WRAPIT compiles with -fno-second-underscore when you use gfortran, but I don't know if ifort has a similar option.

What does the following report:

nm area_wgt_avg_4D.so

Also, what is the subroutine name in your area_wgt_avg_4D.stub and area_wgt_avg_4D.f90 files?

--Mary

On Mar 11, 2013, at 4:00 PM, Sha Feng wrote:

> Hi there,
>
>
>
> When I am trying to call a fortran subroutine when running a ncl script, the error information appears below.
>
> +++++++++
>
> Copyright (C) 1995-2012 - All Rights Reserved
>
> University Corporation for Atmospheric Research
>
> NCAR Command Language Version 6.1.0
>
> The use of this software is governed by a License Agreement.
>
> See http://www.ncl.ucar.edu/ for more details.
>
> fatal:syntax error: procedure area_wgt_avg_4D is not defined in package SMOOTHING_4D
>
>
>
> fatal:error at line 121 in file A2_create_LSF_d03_smoothing.ncl
>
>
>
> fatal:Syntax Error in block, block not executed
>
> fatal:error at line 775 in file A2_create_LSF_d03_smoothing.ncl
>
> ++++++++
>
>
>
> In the ncl script, the related lines are listed below:
>
>
>
> ==============
>
>
>
> external SMOOTHING_4D "./area_wgt_avg_4D.so"
>
>
>
> SMOOTHING_4D::area_wgt_avg_4D(u_p,dim(0),dim(1),dimu(2),dimu(3),dx,dx,u_p@_FillValue,len,u_L)
>
>
>
> ==============
>
>
>
> Below is the output for run WRAPIT to create area_wgt_avg_4D.so file.
>
>
>
> +++++++++++
>
> $ WRAPIT -in -m64 area_wgt_avg_4D.stub area_wgt_avg_4D.f90
>
>
> WRAPIT Version: 120209
>
> /opt/intel/bin/ifort
>
> /opt/intel/bin/ifort
>
> COMPILING area_wgt_avg_4D.f90
>
> LINKING
>
> END WRAPIT
>
> +++++++++++
>
>
>
> Does anyone have clues to fix this issue?
>
>
>
> Thanks,
>
> Sha
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 12 08:34:44 2013

This archive was generated by hypermail 2.1.8 : Wed Mar 13 2013 - 14:19:38 MDT