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

[netCDF #JKS-717625]: problem to install NETCDF-4.1.1 with PGI compiler



Omid,

> Thank you very much for your email. Please find attached the config.log.
> As you suggested, I have tried the more recent netCDF version(4.1.3), but the 
> same error occurred
> 
> The environmental setting are as follows:
> 
> export CC=pgCC

I think the environment variable setting above is a problem.  pgCC is
a C++ compiler, not a C compiler.

You should use

  export CC=pgcc

A C++ compiler will often work as a C compiler on small test programs,
but we haven't tested building the netCDF libraries from source with
just a C++ compiler.  There are some incompatible differences between
C++ and C.  By the way, "pgcpp" is another alias for the same C++
compiler as pgCC, so your setting for CXX is OK.

> export CXX=pgcpp
> export FC=pgf90
> export LD=pgf90

That's a peculiar setting for LD.  It may work, but we don't test with
that, and don't use any setting for LD.

> export CFLAGS="-O2"
> export FFLAGS="-O2 -Msignextend"

We use 

  CFLAGS="-O2 -Msignextend"

to match the FFLAGS setting.

> export CPPFLAGS="-DpgiFortran"
> 
> export OBJECT_MODE=64

If you don't have the HDF5 library installed and just need the classic
netCDF data model, the recomendations above should work.

If you have installed the HDF5 library and want to use the netCDF-4
features, such as compression and chunking, you will also need to
specify where to find the HDF5 library and include files.  In version
4.1.3, this uses the two env variables LDFLAGS and CPPFLAGS, for
example

  export LDFLAGS="-L/usr/local/hdf5-1.8.7/lib 
-L/usr/local/pgi/linux86-64/11.1/lib"
  export CPPFLAGS="-DpgiFortran -I//usr/local/hdf5-1.8.7/include"

You can see the results of our testing with the PGI compilers in
version 4.1.3, including example output from running configure and
make, here, by searching for "PGI" and clicking on the associated
link:

 http://www.unidata.ucar.edu/software/netcdf/builds/4_1_3/index.jsp 

--Russ


> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: Sat 9/10/2011 4:56 AM
> To: Omid Alizadeh Choobari
> Cc: address@hidden
> Subject: [netCDF #JKS-717625]: problem to install NETCDF-4.1.1 with PGI 
> compiler
> 
> Hi Omid,
> 
> > I am trying to install netcdf-4.1.1 with PGI compiler and followed the 
> > instructions in http://www.pgroup.com/resources/netcdf/netcdf40_pgi2010.htm 
> > website, but encountered the following error:
> >
> > checking if Fortran "byte" is C "signed char"... configure: error: Could 
> > not compile conftest.c
> 
> This indicates a failure of the Fortran compiler to correctly compile a test 
> program,
> as determined by the configure script.  There are several possible causes:
> 
> - Failure of the configure script to find and use the intended Fortran 
> compiler
> - Failure to configure your development environment for the intended Fortran
> compiler before running the configure script, for example not running a script
> for the compiler that might be needed to set environment variables
> 
> The best way to diagnose the problem is to look at the "config.log" file that 
> is
> generated when the configure script is run to determine:
> 
> - whether configure is actually using the intended PGI compiler, rather than
> gfortran or g95, for example
> - exactly what error message is produced when configure attempts to compile 
> the
> test program
> 
> You might be able to debug this yourself by looking through the config.log 
> file,
> which is usually best searched backwards from the end for the
> 
> checking if Fortran "byte" is C "signed char"... configure: error: Could not 
> compile conftest.c
> 
> message, and then looking at the detailed compiler output before that.  If 
> you can't
> figure it out from that, please send us the config.log file as well as the
> environment variables and options used to invoke the configure script.  You 
> might
> also try a more recent netCDF version, such as 4.1.3, as it has some 
> portability
> enhancements since 4.1.1.
> 
> --Russ
> 
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: JKS-717625
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 
> 
> 
> 
> 
> 
> This email may be confidential and subject to legal privilege, it may
> not reflect the views of the University of Canterbury, and it is not
> guaranteed to be virus free. If you are not an intended recipient,
> please notify the sender immediately and erase all copies of the message
> and any attachments.
> 
> Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
> information.
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: JKS-717625
Department: Support netCDF
Priority: Normal
Status: Closed