[petsc-users] PetscBinaryRead and quad precision

Justin Chang jychang48 at gmail.com
Fri Jun 26 01:45:51 CDT 2015


Hi all,

I need to run simulations that rely on several of my custom binary
datafiles (written in 32 bit int and 64 bit doubles). These date files were
generated from MATLAB. In my PETSc code I invoke PetscBinaryRead(...) into
these binary files, which gives me mesh data, auxiliaries, etc.

However, when I now configure with quad precision
(--with-precision=__float128 and --download-f2cblaslapack) my
PetscBinaryRead() functions give me segmentation violation errors. I am
guessing this is because I have binary files written in double precision
but have PETSc which reads in quad precision, meaning I will be reading
past the end of these files due to the larger strides.

So my question is, is there a way to circumvent this issue? That is, to
read double-precision binary data into a PETSc program configured with
quad-precision? Otherwise I would have to rewrite or redo all of my
datafiles, which I would prefer not to do if possible.

Thanks,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150626/64f26893/attachment.html>


More information about the petsc-users mailing list