public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 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

* Re: Incorrect module file format in Fortran netCDF package
  2016-02-29 22:40 Incorrect module file format in Fortran netCDF package Mark Hadfield
@ 2016-03-01  5:35 ` Marco Atzeri
  0 siblings, 0 replies; 11+ messages in thread
From: Marco Atzeri @ 2016-03-01  5:35 UTC (permalink / raw)
  To: cygwin

On 29/02/2016 23:40, Mark Hadfield wrote:
> 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
>

I will update again.

Regards
Marco


--
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, 0 replies; 11+ messages in thread
From: Marco Atzeri @ 2015-01-21  9:02 UTC (permalink / raw)
  To: cygwin

On 1/21/2015 4:46 AM, Mark Hadfield wrote:
> 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.)
>

Hi Mark,
yes I am aware.
It is the inconvenient of using fortran module with a rolling
  distribution like cygwin. Any time the compiler major version
is updated, I need to rebuild netcdf-fortran
(that is the only package using fortran modules for what I know)

The 64 bit chain is ready, I am also upgrading to latest version

hdf5 		1.8.13-1 -> 1.8.14-1 (abi bump)
netcdf 		4.3.2-2  -> 4.3.3rc3-1
netcdf-cxx4	4.2.1-2	 -> 4.2.1-3
netcdf-fortran	4.2-4    -> 4.4.1-1

as soon the 32bit chain is completed, I will update all.
Possibly today or tomorrow

Regards
Marco




--
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
@ 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
       [not found]       ` <A4BDD8E3859F92478F09D5AACD6D79C0956EF4DC@welwexmb01.niwa.local>
@ 2013-10-07  1:46         ` marco atzeri
  0 siblings, 0 replies; 11+ messages in thread
From: marco atzeri @ 2013-10-07  1:46 UTC (permalink / raw)
  To: Mark Hadfield, cygwin

Il 10/6/2013 11:44 PM, Mark Hadfield ha scritto:
> Thanks, Marco. It all works fine now. I can delete my home-grown netCDF build.
>
> On a related topic, I intend to work with Charlie Zender and Pedro Vicente to get NCO (URL below) bundled as a Cygwin package.
>
> http://nco.sourceforge.net/
>
> But it will be a few weeks before I can devote some effort to this.
> --

Hi Mark,
last time I tried to port nco I noticed that there were
cross dependencies between the programs and the shared libs.

That makes building the package problematic on windows platform
were all symbols need to be declared at build phase.

Regards
Marco






--
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
  2013-10-04  9:57     ` marco atzeri
@ 2013-10-06 21:50       ` Mark Hadfield
       [not found]       ` <A4BDD8E3859F92478F09D5AACD6D79C0956EF4DC@welwexmb01.niwa.local>
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Hadfield @ 2013-10-06 21:50 UTC (permalink / raw)
  To: Cygwin Mailing List

Thanks, Marco. It all works fine now. I can delete my home-grown netCDF build.

On a related topic, I intend to work with Charlie Zender and Pedro Vicente to get NCO (URL below) bundled as a Cygwin package.

http://nco.sourceforge.net/

But it will be a few weeks before I can devote some effort to this.
--
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

* Re: Incorrect module file format in Fortran netCDF package
  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>
  0 siblings, 2 replies; 11+ messages in thread
From: marco atzeri @ 2013-10-04  9:57 UTC (permalink / raw)
  To: cygwin

Il 10/4/2013 10:57 AM, marco atzeri ha scritto:
> Il 10/4/2013 6:32 AM, Mark Hadfield ha scritto:
>> There's a second issue. In the output of "/usr/bin/nf-config --all"
>> (below) a -no-undefined option is printed. This is not a valid option
>> for gfortran.
>>
>> With these two issues fixed I can compile and link Fortran 90 programs
>> that use the netCDF Fortran interface.
>>
>> ---------------------------------------------
>> $ /usr/bin/nf-config --all
>>
>> This netCDF-Fortran 4.2 has been built with the following features:
>>
>>    --cc        -> gcc
>>    --cflags    ->  -I/usr/include
>>    --libs      -> -L/usr/lib -no-undefined -lnetcdf -lnetcdf
>>
>>    --fc        -> gfortran
>>    --fflags    -> -g -O2 -pipe  -I/usr/include
>>    --flibs     -> -L/usr/lib -lnetcdff -no-undefined -lnetcdf -lnetcdf
>>    --has-f90   -> yes
>>
>>    --has-nc2   -> yes
>>    --has-nc4   -> yes
>>
>>    --prefix    -> /usr
>>    --includedir-> /usr/include
>>    --version   -> netCDF-Fortran 4.2
>>
>>
>>
>>
>> Dr Mark Hadfield
>
> Noted.
> I will rebuild the package reusing the configuration used on
> cygwin 64 bit package.
>
>
> $ /usr/bin/nf-config --all
>
> This netCDF-Fortran 4.2 has been built with the following features:
>
>    --cc        -> gcc
>    --cflags    ->  -I/usr/include
>    --libs      -> -L/usr/lib  -lnetcdf -lnetcdf
>
>    --fc        -> gfortran
>    --fflags    -> -ggdb -O2 -pipe
> -fdebug-prefix-map=/pub/devel/netcdf/netcdf-fortran-4.2-2/build=/usr/src/debug/netcdf-fortran-4.2-2
> -fdebug-prefix-map=/pub/devel/netcdf/netcdf-fortran-4.2-2/src/netcdf-fortran-4.2=/usr/src/debug/netcdf-fortran-4.2-2
> -I/usr/include
>    --flibs     -> -L/usr/lib -lnetcdff  -lnetcdf -lnetcdf
>    --has-f90   -> yes
>
>    --has-nc2   -> yes
>    --has-nc4   -> yes
>
>    --prefix    -> /usr
>    --includedir-> /usr/include
>    --version   -> netCDF-Fortran 4.2
>
>
> Regards
> Marco
>
>


4.2-3 uploaded


--
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
  2013-10-04  4:32 ` Mark Hadfield
@ 2013-10-04  8:57   ` marco atzeri
  2013-10-04  9:57     ` marco atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: marco atzeri @ 2013-10-04  8:57 UTC (permalink / raw)
  To: cygwin

Il 10/4/2013 6:32 AM, Mark Hadfield ha scritto:
> There's a second issue. In the output of "/usr/bin/nf-config --all" (below) a -no-undefined option is printed. This is not a valid option for gfortran.
>
> With these two issues fixed I can compile and link Fortran 90 programs that use the netCDF Fortran interface.
>
> ---------------------------------------------
> $ /usr/bin/nf-config --all
>
> This netCDF-Fortran 4.2 has been built with the following features:
>
>    --cc        -> gcc
>    --cflags    ->  -I/usr/include
>    --libs      -> -L/usr/lib -no-undefined -lnetcdf -lnetcdf
>
>    --fc        -> gfortran
>    --fflags    -> -g -O2 -pipe  -I/usr/include
>    --flibs     -> -L/usr/lib -lnetcdff -no-undefined -lnetcdf -lnetcdf
>    --has-f90   -> yes
>
>    --has-nc2   -> yes
>    --has-nc4   -> yes
>
>    --prefix    -> /usr
>    --includedir-> /usr/include
>    --version   -> netCDF-Fortran 4.2
>
>
>
>
> Dr Mark Hadfield

Noted.
I will rebuild the package reusing the configuration used on
cygwin 64 bit package.


$ /usr/bin/nf-config --all

This netCDF-Fortran 4.2 has been built with the following features:

   --cc        -> gcc
   --cflags    ->  -I/usr/include
   --libs      -> -L/usr/lib  -lnetcdf -lnetcdf

   --fc        -> gfortran
   --fflags    -> -ggdb -O2 -pipe 
-fdebug-prefix-map=/pub/devel/netcdf/netcdf-fortran-4.2-2/build=/usr/src/debug/netcdf-fortran-4.2-2 
-fdebug-prefix-map=/pub/devel/netcdf/netcdf-fortran-4.2-2/src/netcdf-fortran-4.2=/usr/src/debug/netcdf-fortran-4.2-2 
-I/usr/include
   --flibs     -> -L/usr/lib -lnetcdff  -lnetcdf -lnetcdf
   --has-f90   -> yes

   --has-nc2   -> yes
   --has-nc4   -> yes

   --prefix    -> /usr
   --includedir-> /usr/include
   --version   -> netCDF-Fortran 4.2


Regards
Marco



--
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
  2013-10-04  4:11 Mark Hadfield
@ 2013-10-04  4:32 ` Mark Hadfield
  2013-10-04  8:57   ` marco atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Hadfield @ 2013-10-04  4:32 UTC (permalink / raw)
  To: Cygwin Mailing List

There's a second issue. In the output of "/usr/bin/nf-config --all" (below) a -no-undefined option is printed. This is not a valid option for gfortran.

With these two issues fixed I can compile and link Fortran 90 programs that use the netCDF Fortran interface.

---------------------------------------------
$ /usr/bin/nf-config --all

This netCDF-Fortran 4.2 has been built with the following features:

  --cc        -> gcc
  --cflags    ->  -I/usr/include
  --libs      -> -L/usr/lib -no-undefined -lnetcdf -lnetcdf

  --fc        -> gfortran
  --fflags    -> -g -O2 -pipe  -I/usr/include
  --flibs     -> -L/usr/lib -lnetcdff -no-undefined -lnetcdf -lnetcdf
  --has-f90   -> yes

  --has-nc2   -> yes
  --has-nc4   -> yes

  --prefix    -> /usr
  --includedir-> /usr/include
  --version   -> netCDF-Fortran 4.2




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

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 --
2016-02-29 22:40 Incorrect module file format in Fortran netCDF package Mark Hadfield
2016-03-01  5:35 ` Marco Atzeri
  -- strict thread matches above, loose matches on Subject: below --
2015-01-21  4:40 Mark Hadfield
2015-01-21  9:02 ` Marco Atzeri
2015-01-20 23:50 Mark Hadfield
2013-10-04  4:11 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

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