Hi Balaji, > I am new to netCDF and trying to install it on my MAC OS X. I started with > installing Zlib1.2.3 first, then hdf5-1.8.4 and finally netCDF4.1.1. While > trying the last option in my MAC terminal, I got the following error. > > " > . > . > . > > *** testing 4D example file in classic format...Sorry! Unexpected result, > tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 1215 > Sorry! Unexpected result, tst_vars.c, line: 1216 > 6 failures > *** testing 4D example file in 64-bit offset format...Sorry! Unexpected > result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 1220 > Sorry! Unexpected result, tst_vars.c, line: 1221 > 6 failures > *** testing 4D example file in netCDF-4/HDF5 format...Sorry! Unexpected > result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 1225 > Sorry! Unexpected result, tst_vars.c, line: 1226 > 6 failures > *** testing 4D example file in netCDF-4/HDF5 format with classic model > rules...Sorry! Unexpected result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 188 > Sorry! Unexpected result, tst_vars.c, line: 190 > Sorry! Unexpected result, tst_vars.c, line: 1230 > Sorry! Unexpected result, tst_vars.c, line: 1231 > 6 failures > 24 errors detected! Sorry! > FAIL: tst_vars > > . > . > . > . > . > *** Tests successful! > PASS: tst_endian_fill > ================================================ > 1 of 54 tests failed > Please report to address@hidden > ================================================ > make[2]: *** [check-TESTS] Error 1 > make[1]: *** [check-am] Error 2 > make: *** [check-recursive] Error 1 > > " The netCDF-4.1.1 software builds OK here on Mac OS X, for a number of different configure settings. We are using Mac OS X 10.6.4 on an i386 architecture (the output of running "arch"). Later Mac laptops use the 64-bit x86_64 architecture. The version of cc that's included with the latest Mac XCode tools builds for a 64-bit x86_64 architecture by default, so we build for the 32-bit i386 architecture when invoked with either CFLAGS=-m32 or CFLAGS="-arch i386". You may not have to do this, depending on your architecture and version of cc. Also some users have reported that With gcc version 4.5.0 rather than the version of cc that's included with Mac OS XCode Tools, they had to use CFLAGS="-O0" to turn off optimization so it would not fail arithmetic tests with longs and doubles. However, this doesn't seem to be a problem with the /usr/bin/cc that comes with XCode Tools. For Fortran, I've used either the g95 compiler or the gfortran compiler, because I don't have access to a commercial compiler such as the Intel Fortran compiler you're using. The g95 compiler by default builds for the 32-bit i386 architecture (so it's consistent with the "cc -m32" invocation of the C compiler). It also builds objects for x86_64 with the -m64 option. The gfortran compiler makes 64-bit x86_64 objects by default, so should work with cc without the -m32 flag. So here's two example builds that work OK for me on a new netCDF 4.1.1 distribution, each followed by "make check install" CC=cc CFLAGS='-g -m32' CXX=c++ CXXFLAGS='-g -m32' FC=g95 \ FCFLAGS='-g -m32' F77=g95 FFLAGS='-g -O2' \ ./configure --enable-netcdf-4 --with-hdf5=<HDF5_INSTALL_DIRECTORY> CC=cc CFLAGS='-g -m32' CXX=g++ CXXFLAGS='-g -m32' FC='gfortran -m32' \ FCFLAGS='-g' F77='gfortran -m32' FFLAGS='-g -O2' \ CPPFLAGS='-DNDEBUG -DgFortran' LDFLAGS=-m32 \ ./configure --enable-netcdf-4 --with-hdf5=<HDF5_INSTALL_DIRECTORY> > Assuming this needs fortran and C++ compiler, I installed intel Fortran and > C++ compiler before beginning installation of Zlib.Pls let me know if you > need any additional details from me to help me in completing my installation. If you still have problems, a problem report should include enough information to reproduce the problem, which often requires the information listed here: http://www.unidata.ucar.edu/netcdf/docs/netcdf-install/Reporting-Problems.html You only need a Fortran or C++ compiler if you have use for the netCDF Fortran or C++ library interfaces. If you only need the C interface (for example if you are building the netCDF library becasue it is required by another program that only uses the C interface), then there is no need to get a Fortran compiler or C++ compiler. Also, you only need to install zlib and hdf5 if you will be making use of netCDF-4 features, such as compression or features of the enhanced netCDF data model. If you are getting netCDF in order to read netCDF-3 data or to use with other software that only requires netCDF-3, then you do not need to install zlib or hdf5 first and you can configure with the --disable-netcdf-4 option. I'll assume you have already determined that you need the features of netCDF-4. > > For installing Zlib, Hdf5 and netCDF, I used the following syntax. > Zlib - > ./configure --prefix=/home/ed/local > make check install > HDF5- > ./configure --with-zlib=/home/ed/local --prefix=/home/ed/local > --disable-shared > make check install > > Setting environment variables > * To build for Mac OS with the Intel Fortran Compiler and the Intel C++ > Compiler on an Intel 64 system, export the following environment variables: > > $ export CC=icc > $ export CXX=icpc > $ export CFLAGS='-O3 -xT -ip -no-prec-div -m64' > $ export CXXFLAGS='-O3 -xT -ip -no-prec-div -m64' > > $ export F77=ifort > $ export FFLAGS='-O3 -xT -ip -no-prec-div -m64' With Intel compilers on Mac OS X, another user has reported success with the following: CC="icc" FC="ifort" CFLAGS='-O3 -xN -ip -no-prec-div -static' FFLAGS='-O3 -xN -ip -no-prec-div -static' --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: WPY-755710 Department: Support netCDF Priority: High 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.