Re: [netcdfgroup] netcdf linking

Andre,

You say that you are compiling your application program with pgf90,
yet you have posted the output from a gfortran command.  This problem
is not related to the Netcdf library.  You really need to have control
over your local compile environment.  Please ask your local fortran
consultants for help.

The first error shown, Unclassifiable statement, is because the
include file netcdf.inc uses fortran 77 style comments with "c" at the
start of the line.  This is incompatible with the -ffree-form compiler
option, at least with gfortran.  Free form uses exclamation points at
the start of comment lines, not "c".

Furthermore, this copy of netcdf.inc is not from the Netcdf 4.1.3
distribution!  It looks like either a modified copy in which
exclamation points at the start of comment lines were replaced with
the letter "c", or possibly a copy from an older Netcdf release
(speculation).  Ironically, the original netcdf.inc in 4.1.3 would
probably work correctly with this particular gfortran command.

It is very possible that a large number of "unclassifiable statement"
errors caused the include file to be aborted in the middle.  This
would explain the later symbol errors.  So I recommend that you first
get your compile command under control, then revert to the original
include file from the Netcdf distribution.

Please reply to the user list only!

--Dave

On Wed, May 15, 2013 at 5:10 PM, Andre Pattantyus <akp4221@xxxxxxxxxx> wrote:
> Hello,
>
> I have been trying to compile the Hysplit dispersion model in parallel on my
> cluster. This required netcdf among other things and it seems to fail when
> linking to netcdf libraries and include files towards the end. I found a
> post on this forum that got me a little further down the road but I am still
> getting similar errors. I'm not sure if it is a netcdf problem anymore or an
> I/O API issue but if it is then it is likely related to netcdf anyway. This
> is unclear to me.
>
> I am compiling with pgi 10.2, mpich2 v 1.4.1, and netcdf-4.1.3. Below is
> where my log file starts to show errors. First thing I notice is that it is
> calling gfortran when I am compiling with pgf90, this appears to be due to
> I/O API from what I have read here.
>
>
>
> ***/share/huina/akp4221/hysplit/trunk/cmaq
> rm -f ../exec/traj2api
> rm -f ../exec/conc2api
> rm -f ../exec/mcip2arl
> rm -f ../exec/conc2cdf
> gfortran    -o ../exec/conc2cdf -fconvert=big-endian -frecord-marker=4
> -ffree-form -I/usr/local/include  conc2cdf.f -L/usr/local/lib -lnetcdf
> -L../library -lhysplit
>  In file netcdf.inc:1
>
>      Included at conc2cdf.f:43
>
> c
> 1
> Error: Unclassifiable statement at (1)
>  In file netcdf.inc:2
>
>      Included at conc2cdf.f:43
>
> c     Functions in the FORTRAN interface
> 1
> Error: Unclassifiable statement at (1)
>  In file netcdf.inc:29
>
>      Included at conc2cdf.f:43
>
> c
> 1
>
> These statements go on for some time and then starts looking like this which
> is somewhat similar to what I saw before I changed my netcdf linking option.
>
>  In file conc2cdf.f:158
>
>   kret=NF_PUT_ATT_TEXT(ncid, NF_GLOBAL, 'title', 34, 'HYSPLIT Model
> Concentrati
>                                      1
> Error: Symbol 'nf_global' at (1) has no IMPLICIT type
>  In file conc2cdf.f:154
>
>   kret=NF_CREATE(OUTFILE, NF_CLOBBER, ncid)
>                                    1
> Error: Symbol 'nf_clobber' at (1) has no IMPLICIT type
>  In file conc2cdf.f:204
>
>   kret=NF_DEF_VAR(ncid, 'time', NF_DOUBLE , 1, condim(4), idetim)
>                                         1
> Error: Symbol 'nf_double' at (1) has no IMPLICIT type
> .............
> make: *** [conc2cdf] Error 1
>
> Can someone please let me know if this is an I/O API issue and how to fix
> it?
> Mahalo!
>
> -Andre
>
>
> --
> Andre Pattantyus
> Graduate Student Research Assistant
> Department of Meteorology
> University of Hawaii at Manoa
> 2525 Correa Rd, HIG 350
> Honolulu, HI 96822
> Phone: (845) 264-3582
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: