NOAA-GFDL / FMS

GFDL's Flexible Modeling System
Other
92 stars 134 forks source link

`test_mpp_gatscat` causes compilation error with oneapi 2024.1 #1504

Closed rem1776 closed 4 months ago

rem1776 commented 5 months ago

Describe the bug ifort in the newest oneapi version runs into a (new?) compiler error when compiling one of the mpp tests

../../../test_fms/mpp/test_mpp_gatscat.F90(794): error #9156: Inquiring about the size, shape, or bounds of a local deferred-shape variable is not permitted in a specification expression.   [SBUFF]
     real :: sbuff1D(size(sbuff))
--------------------------^

To Reproduce make check -C test_fms/mpp with oneapi 2024.1 and ifort

Expected behavior tests should all compile successfully

System Environment AMD box, oneapi 2024.1

Additional context ifort is now deprecated, so this probably won't get fixed from the intel side

bensonr commented 5 months ago

I am surprised the test code compiles and works correctly with the current in-place logic for any version of ifort. How is one supposed to automatically size a variable based on a allocatable that hasn't been allocated.

790   real,allocatable,dimension(:,:) :: gather_data, cdata, sbuff,rbuff 794   real :: sbuff1D(size(sbuff)) 795   real :: rbuff1D(size(rbuff))