[petsc-users] Error reading binary file

Barry Smith bsmith at mcs.anl.gov
Sat Nov 5 23:18:28 CDT 2016


  Have you destroyed all the previously opened viewers? Unix only allows a limited number of open files at at once.

   Is it a different "binary file to solver for pressure" at each iteration? If it is the same then just read the file in once and keep the KSP object from the first time and call KSPSolve() for the new iteration, it will be much faster.

   Barry


> On Nov 5, 2016, at 7:35 PM, Manuel Valera <mvalera at mail.sdsu.edu> wrote:
> 
> Hello all,
> 
> In the model we are working now, we are using a big laplacian matrix written as a binary file that is read in each iteration to solve for pressure, in a particular testcase and always for iteration 1008 we get the following error, any ideas why this would be ? Thanks :
> 
>  solveP pass:        1008
>  RHS loaded, size:       200000 /      200000
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Unable to open file
> [0]PETSC ERROR: Cannot open file laplacian.petsc for reading
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.4, unknown
> [0]PETSC ERROR: ./ucmsLEP on a arch-linux2-c-debug named node21 by valera Sat Nov  5 16:23:47 2016
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-netcdf --download-hypre --download-metis --download-parmetis --download-superlu_dist --download-cmake --with-cxx-dialect=C++11
> [0]PETSC ERROR: #1 PetscViewerFileSetUp_Binary() line 1249 in /usr/dataC/home/valera/petsc/src/sys/classes/viewer/impls/binary/binv.c
> [0]PETSC ERROR: #2 PetscViewerSetUp_Binary() line 1387 in /usr/dataC/home/valera/petsc/src/sys/classes/viewer/impls/binary/binv.c
> [0]PETSC ERROR: #3 PetscViewerSetUp() line 336 in /usr/dataC/home/valera/petsc/src/sys/classes/viewer/interface/view.c
> [0]PETSC ERROR: #4 MatLoad_SeqAIJ() line 4152 in /usr/dataC/home/valera/petsc/src/mat/impls/aij/seq/aij.c
> [0]PETSC ERROR: #5 MatLoad() line 1013 in /usr/dataC/home/valera/petsc/src/mat/interface/matrix.c
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Nonconforming object sizes
> [0]PETSC ERROR: Preconditioner number of local rows -1 does not equal resulting vector number of rows 200000
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.4, unknown
> [0]PETSC ERROR: ./ucmsLEP on a arch-linux2-c-debug named node21 by valera Sat Nov  5 16:23:47 2016
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-netcdf --download-hypre --download-metis --download-parmetis --download-superlu_dist --download-cmake --with-cxx-dialect=C++11
> [0]PETSC ERROR: #6 PCApply() line 474 in /usr/dataC/home/valera/petsc/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Object is in wrong state
> [0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetFactorAvailable()
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.4, unknown
> [0]PETSC ERROR: ./ucmsLEP on a arch-linux2-c-debug named node21 by valera Sat Nov  5 16:23:47 2016
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-netcdf --download-hypre --download-metis --download-parmetis --download-superlu_dist --download-cmake --with-cxx-dialect=C++11
> [0]PETSC ERROR: #6 PCApply() line 474 in /usr/dataC/home/valera/petsc/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Object is in wrong state
> [0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetFactorAvailable()
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.4, unknown
> [0]PETSC ERROR: ./ucmsLEP on a arch-linux2-c-debug named node21 by valera Sat Nov  5 16:23:47 2016
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --download-hdf5 --download-netcdf --download-hypre --download-metis --download-parmetis --download-superlu_dist --download-cmake --with-cxx-dialect=C++11
> [0]PETSC ERROR: #7 MatGetFactorAvailable() line 4289 in /usr/dataC/home/valera/petsc/src/mat/interface/matrix.c
> [0]PETSC ERROR: #8 PCGetDefaultType_Private() line 28 in /usr/dataC/home/valera/petsc/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: #9 PCSetFromOptions() line 159 in /usr/dataC/home/valera/petsc/src/ksp/pc/interface/pcset.c
> [0]PETSC ERROR: #10 KSPSetFromOptions() line 400 in /usr/dataC/home/valera/petsc/src/ksp/ksp/interface/itcl.c
> application called MPI_Abort(comm=0x84000000, 73) - process 0
> [cli_0]: aborting job:
> application called MPI_Abort(comm=0x84000000, 73) - process 0
> 
> ===================================================================================
> =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
> =   PID 15931 RUNNING AT node21
> =   EXIT CODE: 73
> =   CLEANING UP REMAINING PROCESSES
> =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
> ===================================================================================
> ~                        



More information about the petsc-users mailing list