WRAPIT/pgf90 problem

From: Qingtao Song <qsong_at_nyahnyahspammersnyahnyah>
Date: Thu, 29 Mar 2007 11:00:35 -0700 (PDT)

Hi,

I met a problem with either WRAPIT or pgf90 on my Linux RHEL4 x86_64.
Both the NCL and NCARG are in their latest version. The pgf90 version is
6.11.

The Fortran subroutine is to write a binary file that is called from
NCL. I have listed below a few steps that illustrate how I encountered
the problem:

-----step 1------------
[qsong_at_wallaroo ncl_for]$ WRAPIT -pg write_dd_qsong.f

WRAPIT Version: 090806
/home/server/local/apps/pgicdk-rhel4/linux86-64/current/bin/pgf90
COMPILING write_dd_qsong.f
LINKING
/usr/bin/ld: WRAPIT.o: relocation R_X86_64_32 against `a local symbol'
can not be used when making a shared object; recompile with -fPIC
WRAPIT.o: could not read symbols: Bad value
END WRAPIT

---step 2--------------
Then it is OK after -fPIC is added

[qsong_at_wallaroo ncl_for]$ WRAPIT -pg -fPIC write_dd_qsong.f

WRAPIT Version: 090806
/home/server/local/apps/pgicdk-rhel4/linux86-64/current/bin/pgf90
COMPILING write_dd_qsong.f
LINKING
END WRAPIT

---step 3-------------
ncl create_SST_bumps_5x5.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.
fatal:Syntax Error in block, block not executed
PGFIO-F-201/OPEN/unit=15/illegal value for specifier.
   File name = qsong.dat
   In source file write_dd_qsong.f, at line number 46

this is line 46: open(unit=15,file='qsong.dat', form='unformatted')
----end of step 3-----------

The FORTRAN subroutine itself works well. The problem looks like an I/O
error, but it is likely that WRAPIT did not do the right job. If wrapped
with g77, my ncl script did output a binary file but the binary file
could not be unrecognized by WRF (maybe due to endianess problem or
the WPS compiled with pgf90).

Thanks for your help,

Qingtao

---
Qingtao Song
   College of Oceanic and Atmospheric Sciences
    Oregon State University   - Phone: 541.737.6396
     104 COAS Admin Bldg      -   Fax: 541.737.2064
      Corvallis, OR 97331     - Email: qsong_at_coas.oregonstate.edu
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 29 2007 - 12:00:35 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 01 2007 - 11:52:47 MDT