[FLASH-USERS] Direct IO compile error
Klaus Weide
klaus at flash.uchicago.edu
Mon Jun 4 10:52:11 EDT 2018
On Sun, 3 Jun 2018, Chia-Jung Hsu wrote:
> Dear all,
>
> I tried to use the direct IO unit in FLASH4.5.
>
> I used the setup script:
>
> ./setup Sedov -auto -1d -unit=Grid/GridMain/UG -unit=IO/IOMain/direct/UG
> -nxb=1048576
>
>
> However, ther were compile error messages:
> """
>
> In file included from io_attribute.c(1):
>
> io_attribute.h(29): error: identifier "io_fileID_t" is undefined
>
> const io_fileID_t * const pFileID,
Dear Chia-Jung Hsu,
It appears that recent changes in the IO unit, which were made to allow
using the latest versions of HDF5 for I/O, have interfered with the
"direct" IO implementation. The direct IO is rarely used (or tested) and
exists just as a fallback for situations where neither HDF5 nor pnetCDF
are available, so we have not noticed these errors up to now.
The incompatibilities with "direct" IO in the recent FLASH code are not
essential for the functioning of direct IO. They appear to affect mostly
(or only) declarations and definitions of functions that are not being
used in the direct IO implementation anyway, but are still being compiled.
As a quick fix to make your code work (and if you don't care about the
HDF5 IO implementation for now), you could just replace any occurrence of
"io_fileID_t" that the compiler complains about in a .c or .h file with
"int".
I will send a patch later to address this more cleanly.
Klaus
More information about the flash-users
mailing list