Re: WRAPIT/pgf90 problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 29 Mar 2007 14:53:07 -0600 (MDT)

On Thu, 29 Mar 2007, Qingtao Song wrote:

>
> 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
>

Dear Qingtao,

Just FYI: in the next release of NCL, WRAPIT will have -fPIC set by
default for gcc compilers. Right now, with the version you have, you
saw that you need to explicitly include -fPIC.

As for your problems with the PGI compilers, I'm not sure what's going
on. I googled this error message and came up with what looked like
an email discussion where somebody else had the same question (and
there was a response), but unfortunately the links were bad.

There may be an incompatibility between using a gcc-compiled version
of NCL that is trying to load a shared object created by a PGI
compiler.

So, for now, let's focus on trying to get it working using gcc.

Can you explain what you mean by WRF is not recognizing the
binary file? Also, what do you mean by "WPS compiled with pgf90"?
There *could* be a problem if you are taking this binary to a system
that has a different endianness from the machine you built it on.
The x86_64 system is a little endian machine. What system are you
moving this binary to?

--Mary

> ---
> 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
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 29 2007 - 14:53:07 MDT

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