Commits

BarryFSmith  committed 199802f

in ex6.c warn against using low level PetscBinaryRead/Write() and recommend VecView/VecLoad() instead

  • Participants
  • Parent commits d4c0edb

Comments (0)

Files changed (1)

File src/vec/vec/examples/tutorials/ex6.c

 
 static char help[] = "Writes an array to a file, then reads an array from a file, then forms a vector.\n\n";
 
+/*
+    This uses the low level PetscBinarWrite() and PetscBinaryRead() to access a binary file. It will not work in parallel! 
+
+    We HIGHLY recommend using instead VecView() and VecLoad() to read and write Vectors in binary format (which also work in parallel). Then you can use
+    bin/matlab/PetscBinaryRead() and bin/matlab/PetscBinaryWrite() to read (or write) the vector into MATLAB.
+
+    Note this also works for matrices with MatView() and MatLoad().
+*/
 #include <petscvec.h>
 
 #undef __FUNCT__