[petsc-users] Error loading vectors from files : Too many open files.

Barry Smith bsmith at petsc.dev
Tue Nov 9 14:31:52 CST 2021


   The code is likely creating many viewers each for its own file and not destroying the viewers resulting all the files remaining open. If you are explicitly creating viewers with PetscViewerBinaryOpen() make sure to destroy it with PetscViewerDestroy() after loading from it. 

  Barry 

 

> On Nov 9, 2021, at 5:15 AM, Magu Raam Prasaad R via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hello all,
> 
> I am getting this error message while loading vectors from files. I have attached the code to reproduce the error message. 
> 
> Steps to compile and run the code can be found in monople/README
> Machine type: WorkStation
> OS version : Ubuntu 17.04
> PETSC  version: 3.14.4
> Compiler : GNU C
> MPI: mpich
> Petsc Components: Vec 
> 
> 
> 
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: Unable to open file
> [0]PETSC ERROR: Cannot open file p-00502.dat for READ: ��H�E����
> [0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html <https://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.14.4, unknown 
> [0]PETSC ERROR: ./kirchhoff on a linux-gnu-c-debug named galois by ratnesh Tue Nov  9 15:05:43 2021
> [0]PETSC ERROR: Configure options --download-triangle --download-ctetgen --download-chaco --download-metis --download-parmetis --download-hdf5
> [0]PETSC ERROR: #1 PetscBinaryOpen() line 505 in /home/ratnesh/petsc/src/sys/fileio/sysio.c
> [0]PETSC ERROR: #2 PetscViewerFileSetUp_BinarySTDIO() line 1457 in /home/ratnesh/petsc/src/sys/classes/viewer/impls/binary/binv.c
> [0]PETSC ERROR: #3 PetscViewerSetUp_Binary() line 1512 in /home/ratnesh/petsc/src/sys/classes/viewer/impls/binary/binv.c
> [0]PETSC ERROR: #4 PetscViewerSetUp() line 328 in /home/ratnesh/petsc/src/sys/classes/viewer/interface/view.c
> [0]PETSC ERROR: #5 VecLoad_Binary() line 73 in /home/ratnesh/petsc/src/vec/vec/utils/vecio.c
> [0]PETSC ERROR: #6 VecLoad_Default() line 279 in /home/ratnesh/petsc/src/vec/vec/utils/vecio.c
> [0]PETSC ERROR: #7 VecLoad() line 950 in /home/ratnesh/petsc/src/vec/vec/interface/vector.c
> [0]PETSC ERROR: #8 ComputePressureAtEmissionTime() line 239 in /home/ratnesh/Desktop/kirchhoff/monopole/kirchhoff/kirchhoff.c
> [0]PETSC ERROR: #9 main() line 425 in /home/ratnesh/Desktop/kirchhoff/monopole/kirchhoff/kirchhoff.c
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -vecload_block_size 1
> [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint at mcs.anl.gov <mailto:petsc-maint at mcs.anl.gov>----------
> --------------------------------------------------------------------------
> Sorry!  You were supposed to get help about:
>     mpi-abort
> But I couldn't open the help file:
>     /usr/share/openmpi/help-mpi-api.txt: Too many open files.  Sorry!
> 
> Thank you.
> 
> Regards
> Magu
> 
> 
> <monopole.zip>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211109/ae1b6b55/attachment.html>


More information about the petsc-users mailing list