<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, 5 Dec 2018 at 21:41, Sajid Ali via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I've created the same file as per the format specified in this thread, i.e. VEC_FILE_CLASSID, num_elements followed by the elements in ieee-754 64-bit format. <br></div></div><div><br></div><div>I've saved everything as 1's and 0's in a file as shown above. If it were indeed a binary file, doing a cat on it should output garbage as it did for the file above. But it instead interprets each 0 and 1 as an ascii character. <br><br></div></div></div></div></blockquote><div> </div><div>Did you take care of byteswapping? Rember that everything (the integer class id, integer vec size, and 64bit ieee floating point values) written in the file should be in big-endian format.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Lisandro Dalcin<br>============<br>Research Scientist<br>Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br><br>4700 King Abdullah University of Science and Technology<br>al-Khawarizmi Bldg (Bldg 1), Office # 0109<br>Thuwal 23955-6900, Kingdom of Saudi Arabia<br><a href="http://www.kaust.edu.sa" target="_blank">http://www.kaust.edu.sa</a><br><br>Office Phone: +966 12 808-0459</div></div>