The user can call phio_writeheader and phio_writedatablock with different data types (double vs int) without an error being reported. When syncio is being used, this results in fatal memory errors.
Add some state to phio or the underlying methods to ensure that a sequence of writeheader writedatablock is using the same datatype. A hard failure/error upon detection of a mismatch is OK.