public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Incorrect module file format in Fortran netCDF package
@ 2013-10-04  4:11 Mark Hadfield
  2013-10-04  4:32 ` Mark Hadfield
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Hadfield @ 2013-10-04  4:11 UTC (permalink / raw)
  To: Cygwin Mailing List

The Cygwin package x86/libnetcdf-fortran-devel-4.2-2 includes two Fortran module files

usr/include/NETCDF.mod
usr/include/TYPESIZES.mod

both dated 20 June 2012. According to the first line in each file (they are text files) the Gfortran format module version is '4'.

The current Cygwin gcc-fortran package is at version 4.7.3, which requires module version '9'. When I try to compile Fortran source code that USEs (in the Fortran sense) either of the above files I get a message like this:

      USE netcdf
          1
Fatal Error: Wrong module version '4' (expected '9') for file 'NETCDF.mod' opened at (1)

To fix this, the package needs to be rebuilt with a recent version of Gfortran.


Dr Mark Hadfield
Scientist, Marine Physics
NIWA
301 Evans Bay Parade
Private Bag 14 901
Wellington, New Zealand
Tel: +64 4 386 0363
www.niwa.co.nz
NIWA - Enhancing the benefit of New Zealand's natural resources.

--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Incorrect module file format in Fortran netCDF package
@ 2015-01-20 23:50 Mark Hadfield
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Hadfield @ 2015-01-20 23:50 UTC (permalink / raw)
  To: Cygwin

I think I'm seeing a repeat of this bug:

https://www.cygwin.com/ml/cygwin/2013-10/msg00026.html

When I try to compile Fortran source code that USEs (in the Fortran
sense) the netcdf module I get a message like this:

/usr/bin/gfortran -c -frepack-arrays -O3 -ffast-math roms_export.f90
mod_netcdf.f90:19.10:

      USE netcdf
          1

Fatal Error: Cannot read module file 'netcdf.mod' opened at (1),
because it was created by a different version of GNU Fortran

The file it's trying to read is /usr/include/netcdf.mod, dated 15
November 2014. The header line (it's a plain text file) identifies it
as GFORTRAN module version '10'. A module file that I just created
with the current Gfortran (GCC 4.9.2) is a gzipped text file and the
header line identifies it as GFORTRAN module version '12'.

So I conclude that netcdf-gfortran package needs to be rebuilt with
the current Gfortran.


Mark Hadfield
51 Volga St
Wellington 6023, NZ

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Incorrect module file format in Fortran netCDF package
@ 2015-01-21  4:40 Mark Hadfield
  2015-01-21  9:02 ` Marco Atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Hadfield @ 2015-01-21  4:40 UTC (permalink / raw)
  To: Cygwin

Following up my previous message, this from
https://gcc.gnu.org/wiki/GFortran/News#gfortran_4.9.1 indicates that
the problem is due to the GCC upgrade from 4.8 to 4.9:

Module files: The version of the module files (.mod) has been
incremented; additionally, module files are now compressed. Fortran
MODULEs compiled by earlier GCC versions have to be recompiled, when
they are USEd by files compiled with GCC 4.9, because GCC 4.9 is not
able to read .mod file of earlier GCC versions; attempting to do so
gives an error message. Note: The ABI of the produced assembler data
itself has not changed: object files and libraries are fully
compatible to older versions. (Except for the next items.)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Incorrect module file format in Fortran netCDF package
@ 2016-02-29 22:40 Mark Hadfield
  2016-03-01  5:35 ` Marco Atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Hadfield @ 2016-02-29 22:40 UTC (permalink / raw)
  To: Cygwin

The recent GCC update has apparently introduced a new module file
format for Gfortran, but the netCDF Fortran-90 module file has not yet
been updated, as on previous occasions

https://www.cygwin.com/ml/cygwin/2015-01/msg00281.html
https://www.cygwin.com/ml/cygwin/2013-10/msg00026.html

Mark Hadfield
51 Volga St
Wellington 6023, NZ

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-03-01  5:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04  4:11 Incorrect module file format in Fortran netCDF package Mark Hadfield
2013-10-04  4:32 ` Mark Hadfield
2013-10-04  8:57   ` marco atzeri
2013-10-04  9:57     ` marco atzeri
2013-10-06 21:50       ` Mark Hadfield
     [not found]       ` <A4BDD8E3859F92478F09D5AACD6D79C0956EF4DC@welwexmb01.niwa.local>
2013-10-07  1:46         ` marco atzeri
2015-01-20 23:50 Mark Hadfield
2015-01-21  4:40 Mark Hadfield
2015-01-21  9:02 ` Marco Atzeri
2016-02-29 22:40 Mark Hadfield
2016-03-01  5:35 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).