You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with gfortran in debug mode, syntax errors will be reported for subroutines that call the HDF-EOS2 'gdrdfld' function with inconsistent buffer types.
For example, in ldt/DAobs/GLASSlai/readGLASSlaiObs.F90, there are two calls to gdrdfld for AVHRR and MODIS data (depending on user settings). The AVHRR buffer array is of type integer2, but for MODIS it is of type integer1.
gdrdfld is implemented in C, and is specified to treat the buffer argument as a void pointer (e.g., type is ignored). So this is not illegal per se. However, if gfortran is being used to debug other code, the compiler will not compile this code.
A partial solution is to disable HDF-EOS2 when compiling. But a better solution is needed if the user actually needs that library.
A better solution would be to write simple customized wrapper functions to gdrdfld in Fortran 90 (with an interface block containing module procedure declarations), and call gdrdfld within those wrapper functions. If only a single gdrdfld call occurs in each wrapper function, then I don't expect gfortran to report a problem.
Steps to Replicate
Run the LDT configure script with a GNU module (e.g., lisf_7.5_gnu_11.2.0_impi_2021.4.0), select Optimization level -2 (strict checks), and select use HDFEOS. Then compile LDT.
The text was updated successfully, but these errors were encountered:
This is when I found that my LIS_ARCH was set to linux_ifc. After changing it to LIS_ARCH=linux_gfortran, the mismatch in types can be ignored by gfortran. Hope this could provide some hints.
Bug Description
When compiling with gfortran in debug mode, syntax errors will be reported for subroutines that call the HDF-EOS2 'gdrdfld' function with inconsistent buffer types.
For example, in ldt/DAobs/GLASSlai/readGLASSlaiObs.F90, there are two calls to gdrdfld for AVHRR and MODIS data (depending on user settings). The AVHRR buffer array is of type integer2, but for MODIS it is of type integer1.
gdrdfld is implemented in C, and is specified to treat the buffer argument as a void pointer (e.g., type is ignored). So this is not illegal per se. However, if gfortran is being used to debug other code, the compiler will not compile this code.
A partial solution is to disable HDF-EOS2 when compiling. But a better solution is needed if the user actually needs that library.
A better solution would be to write simple customized wrapper functions to gdrdfld in Fortran 90 (with an interface block containing module procedure declarations), and call gdrdfld within those wrapper functions. If only a single gdrdfld call occurs in each wrapper function, then I don't expect gfortran to report a problem.
Steps to Replicate
Run the LDT configure script with a GNU module (e.g., lisf_7.5_gnu_11.2.0_impi_2021.4.0), select Optimization level -2 (strict checks), and select use HDFEOS. Then compile LDT.
The text was updated successfully, but these errors were encountered: