Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncdump failure on intel oneapi compiler #2959

Open
edwardhartnett opened this issue Aug 5, 2024 · 8 comments
Open

ncdump failure on intel oneapi compiler #2959

edwardhartnett opened this issue Aug 5, 2024 · 8 comments

Comments

@edwardhartnett
Copy link
Contributor

This is with the latest code from main (updated today).

The intel oneapi compiler seems to have broken some infinities(?):

cd ncdump
bash-4.4$ bash -x ./run_back_comp_tests.sh 
...
+ echo '*** Testing that this version can read data produced by old versions of netCDF.'
*** Testing that this version can read data produced by old versions of netCDF.
+ echo '*** checking ref_nc_test_netcdf4_4_0.nc...'
*** checking ref_nc_test_netcdf4_4_0.nc...
+ /scratch1/BMC/gsd-hpcs/ed/netcdf-c-4.9.3-rc1/ncdump/ncdump -n ref_nc_test_netcdf4_4_0 /scratch1/BMC/gsd-hpcs/ed/netcdf-c-4.9.3-rc1/ncdump/ref_nc_test_netcdf4_4_0.nc
+ diff -b -w /scratch1/BMC/gsd-hpcs/ed/netcdf-c-4.9.3-rc1/ncdump/ref_nc_test_netcdf4.cdl tst_nc_test_netcdf4_4_0.cdl
19c19
<               i:f = -3.402823e+38f, 3.402823e+38f, -Infinityf, Infinityf ;
---
>               i:f = -3.402823e+38f, 3.402823e+38f, -inff, inff ;
163c163
<               :Gf = -3.402823e+38f, 3.402823e+38f, -Infinityf, Infinityf, 531.f ;
---
>               :Gf = -3.402823e+38f, 3.402823e+38f, -inff, inff, 531.f ;
233c233
<  f3 = -3.402823e+38, 3.402823e+38, -Infinityf ;
---
>  f3 = -3.402823e+38, 3.402823e+38, -inf ;
245c245
<  f4 = -3.402823e+38, 3.402823e+38, -Infinityf, Infinityf ;
---
>  f4 = -3.402823e+38, 3.402823e+38, -inf, _ ;

@DennisHeimbigner
Copy link
Collaborator

Presumably this is the same issue as this: #2700

@WardF
Copy link
Member

WardF commented Aug 5, 2024

So I suppose the stanza introduced in https://github.com/Unidata/netcdf-c/pull/2935/files is either not being entered, or the -fhonor-infinities flag is not doing what is expected. @edwardhartnett can you pass -fhonor-inifinities to the compiler and see if that addresses the issue on your end? If so, I'll check the conditional, if not, I'll look more into compiler flags.

@edwardhartnett
Copy link
Contributor Author

I will try when I can log in again - some problem with the system this morning.

The Intel oneapi is freely available and can be tested in the CI. We do that with the NCEPLIBS libraries here at NOAA. My colleague @AlexanderRichert-NOAA has made a GitHub action which installs the Intel compilers on a test instance.
Take a look here, I think you could just use it directly, or take your own copy: https://github.com/NOAA-EMC/ci-install-intel-toolkit

@WardF
Copy link
Member

WardF commented Aug 6, 2024

I will take a look at integrating that, thanks!

@WardF
Copy link
Member

WardF commented Aug 6, 2024

I'm working on the next Fortran release, so that might be a good time to integrate modern alternatives to gfortran.

@edwardhartnett
Copy link
Contributor Author

But it should be noted that the problem described in this issue was in the C library...

@WardF
Copy link
Member

WardF commented Aug 6, 2024

It should be noted indeed, and should have been obvious; as you can tell, I've been focused on the Fortran release XD. Yes, I will take a look at this in the C library.

@edwardhartnett
Copy link
Contributor Author

I'm also going to do some netcdf-fortran tests after the netcdf-c testing I'm doing.

I was just reflecting on the value of unit tests to the netCDF project. Here we have code written in some cases 15 or 20 years ago, still working very well on new compilers, new systems, all with a small staff - and netCDF continues to add new features at an impressive rate. After all this time, the original v2 test code still runs perfectly. It's a record any software project would envy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants