It would be nice if the error message could be related to the VecLoad() 
call so the error message could say that there is no vector next in the file.



   
> 
> [d3m956 at olympus tutorials]$ ./ex12 -f0 myA.dat
> 
> This program expects a matrix followed by a vector in the file. You can use 
> -rhs 0 to skip reading the right hand side vector from the file, it will use 
> a vector of all ones.
>  
> [0]PETSC ERROR: --------------------- Error Message 
> ------------------------------------
> [0]PETSC ERROR: Read from file failed!
> [0]PETSC ERROR: Read past end of file!
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 0, Tue Jun  5 14:20:42 CDT 
> 2012
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: ./ex12 on a arch-linu named olympus.local by d3m956 Tue Jun 
> 26 13:51:28 2012
> [0]PETSC ERROR: Libraries linked from 
> /pic/projects/mca/ss/PETSC/petsc-3.3-p0/arch-linux2-c-debug/lib
> [0]PETSC ERROR: Configure run at Thu Jun 14 17:00:19 2012
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran 
> --download-f-blas-lapack --download-mpich
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: PetscBinaryRead() line 271 in src/sys/fileio/sysio.c
> [0]PETSC ERROR: PetscBinarySynchronizedRead() line 558 in 
> src/sys/fileio/sysio.c
> [0]PETSC ERROR: PetscViewerBinaryRead() line 764 in 
> src/sys/viewer/impls/binary/binv.c
> [0]PETSC ERROR: PetscViewerBinaryReadVecHeader_Private() line 24 in 
> src/vec/vec/utils/vecio.c
> [0]PETSC ERROR: VecLoad_Binary() line 97 in src/vec/vec/utils/vecio.c
> [0]PETSC ERROR: VecLoad_Default() line 348 in src/vec/vec/utils/vecio.c
> [0]PETSC ERROR: VecLoad() line 1111 in src/vec/vec/interface/vector.c
> [0]PETSC ERROR: main() line 92 in src/mat/examples/tutorials/ex12.c
>  
> It said ?Read from file failed! Read past end of file!? Anything wrong? I was 
> using the example code without changing anything. Please help me to figure 
> out the problem.
>  
> Thanks,
> Shuangshuang
>  
>  
> 

Reply via email to