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

unit test failures with gcc + O2 optimization #1276

Closed
rem1776 opened this issue Jul 5, 2023 · 4 comments · Fixed by #1312
Closed

unit test failures with gcc + O2 optimization #1276

rem1776 opened this issue Jul 5, 2023 · 4 comments · Fixed by #1312

Comments

@rem1776
Copy link
Contributor

rem1776 commented Jul 5, 2023

Describe the bug
Some unit test that are passing gnu normally are failing when compiling with prod flags:

test_fms2_io(all)
test_io_with_mask
test_mpp_nesting(all)
horiz_interp(bicubic new)

To Reproduce
add -O2 -fno-expensive-optimizations to your compiler flags for gcc

Expected behavior
not fail

System Environment
amd box

  • Compiler(s): gcc 10-12
  • MPI type: mpich
  • netCDF Version: 4.9.2 (c) + 4.61 (fortran)

Additional context

Some (mainly fms2_io) may be related to gcc's handling of cray pointers. The errors are coming from cray pointer assignments using the non-standard LOC intrinsic for the gather and scatter routines.

mpp_nesting seems to fail when trying to deallocate a pointer from a derived type (nest_domain_type%nest_level).

The horiz_interp failure is from the mixed precision update, I've seen similar errors trying to access its sub-type's field.

@uramirez8707
Copy link
Contributor

Some (mainly fms2_io) may be related to gcc's handling of cray pointers. The errors are coming from cray pointer assignments using the non-standard LOC intrinsic for the gather and scatter routines.

are the cray pointers in mpp_scatter/mpp_gather?

@rem1776
Copy link
Contributor Author

rem1776 commented Jul 6, 2023

@uramirez8707 Yeah they are:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x14c236d30cef in ???
#1  0x14c23cba3b10 in __mpp_mod_MOD_mpp_gather_pelist_real8_2d
	at ../../mpp/include/mpp_gather.fh:126
#2  0x14c23ce030b3 in __netcdf_io_mod_MOD_compressed_write_2d
	at /home/Ryan.Mulhall/FMS/build_gnu/fms2_io/compressed_write.inc:280
#3  0x14c23ce063bf in __netcdf_io_mod_MOD_netcdf_save_restart
	at ../../fms2_io/netcdf_io.F90:1075
#4  0x14c23ce0664b in __netcdf_io_mod_MOD_netcdf_save_restart_wrap
	at ../../fms2_io/netcdf_io.F90:2066
#5  0x40c087 in land_compressed_restart_file
	at /home/Ryan.Mulhall/FMS/build_gnu/test_fms/fms2_io/land_compressed_restart_file_test.inc:
#1  0x1541bb3ea610 in __mpp_mod_MOD_mpp_scatter_pelist_real8_2d
	at ../../mpp/include/mpp_scatter.fh:42
#2  0x14d54b45d0ec in __fms_netcdf_domain_io_mod_MOD_domain_read_2d
	at /home/Ryan.Mulhall/FMS/build_gnu/fms2_io/domain_read.inc:245
#3  0x405d85 in read_data_wrapper
	at ../../../test_fms/fms2_io/test_domain_io.F90:251
#4  0x40821c in test_domain_read
	at ../../../test_fms/fms2_io/test_domain_io.F90:130
#5  0x40206c in main
	at ../../../test_fms/fms2_io/test_domain_io.F90:21

@laurenchilutti
Copy link
Contributor

laurenchilutti commented Jul 20, 2023

mpp nesting test is fixed in PR #1294

@laurenchilutti
Copy link
Contributor

Everything else is fixed by PR #1312

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

Successfully merging a pull request may close this issue.

3 participants