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

20040310: building netCDF on 64-bit AMD Opteron



Bernard,

I just successfully built and tested version 3.5.1 of the netCDF package
on our Linux Opteron system:

    $ uname -a
    Linux oliver.unidata.ucar.edu 2.4.22-1.2135.nptlsmp #1 SMP Mon Dec 15 
15:45:38 EST 2003 x86_64 x86_64 x86_64 GNU/Linux

I used gcc(1) and g77(1):

    $ /usr/bin/gcc --version
    gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
    ...
    $ /usr/bin/f77 --version
    GNU Fortran (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
    ...

and the following configuration command:

   CC=/usr/bin/gcc CPPFLAGS='-DNDEBUG -Df2cFortran' CFLAGS='-O -m64' 
FC=/usr/bin/g77 FFLAGS='-O -Wno-globals' CXX= ./configure

Please investigate how your attempt or buld-environment differs from
mine.

Also, the output from your "make":

> Making `all' in directory 
> /home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/fortran
> 
> make[2]: Entering directory 
> `/home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/fortran'
> ar cru ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o 

doesn't have compilation commands before the ar(1) command.  Did you
need to execute the command "make distclean" and re-execute the
"configure" script before attempting the build?

Regards,
Steve Emmerson

>Date: Wed, 10 Mar 2004 17:54:08 +0100 (CET)
>From: Bernard Legras <address@hidden>
>Organization: Ecole Normale Superieure/Laboratoire de Meteorologie Dynamique
>To: Steve Emmerson <address@hidden>
>Subject: compiling netcdf on AMD Opteron 
>Keywords: 200403101654.i2AGsgrV021760
>
> Thanks for your help. Now I am trying to compile
> on an AMD Opteron with 64bit architecture.
> The code works fine if I compile for 32bit architecture
> but I got a large number of errors with the 64bit 
> default version. See below.
> I am using gcc with no option except -m64
> The Fortran compiler is g77, same results with pgf77 or pgf90.
> Is there a way to fix these problems as I wish to run codes
> compiled for the AMD64.

> @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
> @ Bernard Legras
> @ Laboratoire de Meteorologie Dynamique
> @ Ecole Normale Superieure
> @ 24 rue Lhomond
> @ F-75231 PARIS Cedex 05
> @ tel : (1) 44 32 22 28   fax : (1) 43 36 83 92
> @ E-mail : address@hidden
> @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
> 
...
> `/home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src'
> 
> Making `all' in directory 
> /home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/fortran
> 
> make[2]: Entering directory 
> `/home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/fortran'
> ar cru ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o 
...
> Making `test' in directory 
> /home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/nc_test
> 
> make[2]: Entering directory 
> `/home/priv/legras/install-mdk92-amd64/src/netcdf-3.5.1/src/nc_test'
> gcc -c -m64 -I../libsrc  -Df2cFortran nc_test.c
> gcc -c -m64 -I../libsrc  -Df2cFortran error.c
> gcc -c -m64 -I../libsrc  -Df2cFortran test_get.c
> gcc -c -m64 -I../libsrc  -Df2cFortran test_put.c
> gcc -c -m64 -I../libsrc  -Df2cFortran test_read.c
> gcc -c -m64 -I../libsrc  -Df2cFortran test_write.c
> gcc -c -m64 -I../libsrc  -Df2cFortran util.c
> gcc -o nc_test -m64  nc_test.o error.o test_get.o test_put.o test_read.o 
> test_write.o util.o -L../libsrc -lnetcdf -lm
> ./nc_test -c
> ./nc_test
> *** Testing nc_strerror ... ok
> *** Testing nc_open ... ok
> *** Testing nc_close ... ok
> *** Testing nc_inq ... ok
> *** Testing nc_inq_dimid ... ok
> *** Testing nc_inq_dim ... ok
> *** Testing nc_inq_dimlen ... ok
> *** Testing nc_inq_dimname ... ok
> *** Testing nc_inq_varid ... ok
> *** Testing nc_inq_var ... ok
> *** Testing nc_inq_natts ... ok
> *** Testing nc_inq_ndims ... ok
> *** Testing nc_inq_nvars ... ok
> *** Testing nc_inq_unlimdim ... ok
> *** Testing nc_inq_vardimid ... ok
> *** Testing nc_inq_varname ... ok
> *** Testing nc_inq_varnatts ... ok
> *** Testing nc_inq_varndims ... ok
> *** Testing nc_inq_vartype ... ok
> *** Testing nc_get_var_text ...  179 good comparisons. ok
> *** Testing nc_get_var_uchar ...  264 good comparisons. ok
> *** Testing nc_get_var_schar ...  269 good comparisons. ok
> *** Testing nc_get_var_short ...  682 good comparisons. ok
> *** Testing nc_get_var_int ...  1189 good comparisons. ok
> *** Testing nc_get_var_long ...
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>         FAILURE at line 1153 of test_get.c: value read not that expected
>  907 good comparisons.
...