AnsweredAssumed Answered

make check of netcdf fortran 4.2 fails

Question asked by jiriwiesner on Mar 1, 2013
Latest reply on Mar 1, 2013 by jiriwiesner

Dear Developers,

I have just discovered the x86 Open64 and Open64 compilers and I came like them instantly. I've been trying to compile NetCDF libraries, since I use those in my programs. The C netcdf library version 4.2.1.1 compiles well, checks pass - no problem there. The Fortran part, netcdf-fortran-4.2, compiles without error, but the checks of the Fortran 77 API fail for both NetCDF-2 and NetCDF-3 formats:

 

*** testing nf_put_att_double ...

*** testing nf_copy_att ...

*** testing nf_rename_att ...

*** testing nf_del_att ...

*** testing nf_set_fill ...

*** testing nf_set_default_format ...

/bin/bash: line 5:  5679 Illegal instruction     ${dir}$tst

FAIL: nf_test

 

*** Copying file with fill values.

*** SUCCESS!

PASS: create_fills.sh

 

  *** Testing netCDF v2 api for F77.

  *** SUCCESS!

PASS: tst_f77_v2

 

*** Testing netCDF-2 Fortran 77 API.

*** testing nccre ...

*** testing ncddef ...

*** testing ncvdef ...

*** testing ncapt, ncaptc ...

*** testing ncclos ...

*** testing ncvpt1 ...

*** testing ncvgt1 ...

*** testing ncvpt ...

*** testing ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq ...

*** testing ncvgt, ncvgtc ...

*** testing ncagt, ncagtc ...

*** testing ncredf, ncdren, ncvren, ncaren, ncendf ...

*** testing ncacpy ...

*** testing ncadel ...

*** testing fill values ...

/bin/bash: line 5:  5741 Illegal instruction     ${dir}$tst

FAIL: ftest

 

*** Testing netCDF-3 Fortran 90 API.

*** SUCCESS!

PASS: tst_f90

================================================

2 of 5 tests failed

Please report to support-netcdf@unidata.ucar.edu

================================================

make[2]: *** [check-TESTS] Error 1

make[2]: Leaving directory `/home/comp/src/nc42_opencc45/netcdf-fortran-4.2/nf_test'

make[1]: *** [check-am] Error 2

make[1]: Leaving directory `/home/comp/src/nc42_opencc45/netcdf-fortran-4.2/nf_test'

make: *** [check-recursive] Error 1

 

 

I tried to investigate the situation with the help of gdb:

 

wiesner@iakchos:/home/comp/src/nc42_opencc45/netcdf-fortran-4.2/nf_test$ gdb .libs/lt-nf_test

GNU gdb (GDB) 7.0.1-debian

Copyright (C) 2009 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from /home/comp/src/nc42_opencc45/netcdf-fortran-4.2/nf_test/.libs/lt-nf_test...done.

(gdb) run

Starting program: /home/comp/src/nc42_opencc45/netcdf-fortran-4.2/nf_test/.libs/lt-nf_test

 

*** Testing netCDF-3 Fortran 77 API.

NetCDF version: 4.2.1.1 of Mar  1 2013 22:02:39 $

*** testing nf_strerror ...

*** testing nf_open ...

*** testing nf_close ...

*** testing nf_inq ...

*** testing nf_inq_dimid ...

*** testing nf_inq_dim ...

*** testing nf_inq_dimlen ...

*** testing nf_inq_dimname ...

*** testing nf_inq_varid ...

...skipped...

*** testing nf_put_att_int ...

*** testing nf_put_att_real ...

*** testing nf_put_att_double ...

*** testing nf_copy_att ...

*** testing nf_rename_att ...

*** testing nf_del_att ...

*** testing nf_set_fill ...

*** testing nf_set_default_format ...

 

Program received signal SIGILL, Illegal instruction.

0x00007ffff6e02feb in findmatch () at /local/home/qa/nightly_build_avx/sandbox/open64/osprey/libf/fio/opn.c:487

487     /local/home/qa/nightly_build_avx/sandbox/open64/osprey/libf/fio/opn.c: No such file or directory.

        in /local/home/qa/nightly_build_avx/sandbox/open64/osprey/libf/fio/opn.c

Current language:  auto

The current source language is "auto; currently asm".

(gdb) bt

#0  0x00007ffff6e02feb in findmatch () at /local/home/qa/nightly_build_avx/sandbox/open64/osprey/libf/fio/opn.c:487

#1  0x00007ffff6e02454 in _OPEN () at /local/home/qa/nightly_build_avx/sandbox/open64/osprey/libf/fio/opn.c:254

#2  0x000000000044b6d5 in nf_get_file_version (path=Cannot access memory at address 0x65e900

) at test_write.F:1425

#3  0x000000000044b43d in test_nf_set_default_format () at test_write.F:1400

#4  0x0000000000440988 in test (name=Cannot access memory at address 0x454e60

) at nf_test.F:20

#5  0x0000000000441acd in MAIN__ () at nf_test.F:381

(gdb) up

#2  0x000000000044b6d5 in nf_get_file_version (path=Cannot access memory at address 0x65e900

) at test_write.F:1425

1425             elseif (ver .eq. 2) then

(gdb) print ver

$1 = 32767

 

"ver" is an integer, btw. I have used "-O0" to disable optimizations, but the line numbers still seem to be incorrect. It seems to me that it is a compiler issue, mainly because binaries compiled with the Open64 5.0 release pass the check. I have use the latest version of x86 Open64 - version 4.5.2, which alse fails to pass the checks of NetCDF version 3.6.3 at the very same point. The older x86 Open64 release, 4.2.5.2, works well and the checks pass.

 

Other details:

NetCDF configure command:

  ./configure --disable-netcdf-4 --disable-dap --prefix=/usr/local/nc42_opencc50 CC=/usr/local/open64-5.0/bin/opencc

NetCDF fortran configure command:

  ./configure --prefix=/usr/local/nc42_opencc45 CC=/usr/local/x86_open64-4.5.2/bin/opencc FC=/usr/local/x86_open64-4.5.2/bin/openf95 F77=/usr/local/x86_open64-4.5.2/bin/openf95 CPPFLAGS=-I/usr/local/nc42_opencc45/include LDFLAGS=-L/usr/local/nc42_opencc45/lib CFLAGS="-g -O0" FFLAGS="-g -O0" FCFLAGS="-g -O0"

 

I'd be very glad if someone shed some light on this issue.

Thank you,

Jiri

Outcomes