[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #FTZ-975139]: Help NetCDF compilation or installation


> Hello!
> I'm sorry to bother with some installation/compilation problems, but I
> came to a point where I think I need some help.

Not a problem; I will try to help as best I can.
> I actually use Cygwin on Windows 7 and installed with the Cygwin packages
> the NetCDF and also the HDF5 files. I updated also my gcc and fortran
> compiler (Have now Gfortran 4.8.3).

> After that I wanted to install a program called 'GOTM'
> (http://www.gotm.net/) but got always an error which I already discussed
> with the creators of the code. The error that occured is thought that the
> gfortran compiler and the NetCDF are not working correctly together. They
> said that I would have to compile the whole source code with my installed
> compiler so that it works. The error was (translated from german): "The
> MODULE 'netcdf.mod' can not be read as it was created by a different
> Version of GNU Fortran".

I am surprised that the netcdf-c and netcdf-fortran libraries installed from 
the cygwin package manager did not work.  We should be able to work around it 

> So I installed NetCDF manually on Cygwin (as i thought than it would be
> compiled automatically with my actual compiler), but it still doesn't
> work. I've installed NetCDF without the HDF5, because HDF5 crashes when
> it's installed at the line of: Testing big.exe, when I do the make check.
> I also don't know how to install netcdf-fortran without HDF5.

I assume you are installing netcdf-c without either hdf5 or dap; assuming this 
is true, you would use the following options. Note that I am using a directory 
specific to my environment; you will need to change the paths appropriately for 

$ ./configure --disable-netcdf-4 --disable-dap --prefix=/home/WardF/local
$ make
$ make install

For netcdf-fortran, you would then compile and install it as follows:

$ CFLAGS="-I/home/WardF/local/include" LDFLAGS="-L/home/WardF/local/lib" 
./configure --prefix=/home/WardF/local
$ make
$ make install

I've set up a test cygwin system and, at this point, have downloaded and have 
tried to build GOTM, with no luck.  I know that my libnetcdf and libnetcdff (C 
and fortran libraries, respectively) built properly because they each passed 
'make check'.

If you attempt to repeat the steps as I've outlined above, does everything work 
and install properly for you?

Can you provide information re: how you are trying to build GOTM, after 
installing netcdf C and Fortran? I can try to replicate that on my system to 
further diagnose this.

Thanks, have a good day,


> How can I compile the source code with my actual Gfortran compiler so that
> it works (on Cygwin)? Or should I install an older gfortran compiler, if
> yes which version? Is there another way maybe to fix this, or do I
> something wrong or miss a point. I followed the netcdf-install.txt and
> also the
> http://www.unidata.ucar.edu/software/netcdf/docs/build_default.html
> I also send you my test-suite log attached to this mail. So I had HDF5 on
> Cygwin, as you can download and install it on Cygwin via package, but as I
> tried to install HDF5 1.8.12, it crashed always at make check.
> I appreciate any help or suggestions!
> Best regards,
> Gabor Kiss

Ticket Details
Ticket ID: FTZ-975139
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.