bueler / p4pdes

C and Python examples from my book on using PETSc and Firedrake to solve PDEs
MIT License
182 stars 71 forks source link

chapter 2, Page 36: Unable to create files A.dat and b.dat from minimal.c #49

Closed debasishuiuc closed 3 years ago

debasishuiuc commented 3 years ago

Hello Ed, I am unable to create the .dat files. Any idea what is wrong? I have the latest version of petsc Thank you for the help. PS: The book is wonderful !

debasish@debasish-HP-Z840:~/Desktop/softwares/p4pdes/c/ch7$ ./minimal -snes_fd_color -snes_grid_sequence 7 -ksp_view_mat binary::A.dat -ksp_view_rhs binary::b.dat [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Unable to open file [0]PETSC ERROR: Cannot open file for WRITE: H�U��yH�E�� [0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.15.0, unknown [0]PETSC ERROR: ./minimal on a linux-c-dbg named debasish-HP-Z840 by debasish Sat Jun 12 12:18:17 2021 [0]PETSC ERROR: Configure options --with-debugging=1 [0]PETSC ERROR: #1 PetscBinaryOpen() at /home/debasish/Desktop/softwares/petsc/src/sys/fileio/sysio.c:505 [0]PETSC ERROR: #2 PetscViewerFileSetUp_BinarySTDIO() at /home/debasish/Desktop/softwares/petsc/src/sys/classes/viewer/impls/binary/binv.c:1460 [0]PETSC ERROR: #3 PetscViewerSetUp_Binary() at /home/debasish/Desktop/softwares/petsc/src/sys/classes/viewer/impls/binary/binv.c:1515 [0]PETSC ERROR: #4 PetscViewerSetUp() at /home/debasish/Desktop/softwares/petsc/src/sys/classes/viewer/interface/view.c:330 [0]PETSC ERROR: #5 PetscOptionsGetViewer() at /home/debasish/Desktop/softwares/petsc/src/sys/classes/viewer/interface/viewreg.c:354 [0]PETSC ERROR: #6 KSPSetFromOptions() at /home/debasish/Desktop/softwares/petsc/src/ksp/ksp/interface/itcl.c:568 [0]PETSC ERROR: #7 SNESSetFromOptions() at /home/debasish/Desktop/softwares/petsc/src/snes/interface/snes.c:1113 [0]PETSC ERROR: #8 main() at /home/debasish/Desktop/softwares/p4pdes/c/ch7/minimal.c:150 [0]PETSC ERROR: PETSc Option Table entries: [0]PETSC ERROR: -ksp_view_mat binary::A.dat [0]PETSC ERROR: -ksp_view_rhs binary::b.dat [0]PETSC ERROR: -snes_fd_color [0]PETSC ERROR: -snes_grid_sequence 7 [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------

MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 65.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them.

debasishuiuc commented 3 years ago

Sorry, I had a typo with the double colon, it should be a single colon

./minimal -snes_fd_color -snes_grid_sequence 7 -ksp_view_mat binary:A.dat -ksp_view_rhs binary:b.dat