Re: [firedrake] Can't terminate simulation
For me, it's always been the case that Ctrl+C does nothing *while PETSc is doing a linear solve*... if GMRES isn't converging (so runs to the default ksp_max_it of 10,000), or if it takes a lot of iterations, this could certainly take a few minutes if it's a big system. The program would then be killed when leaving the linear solve. However, this was true before the Python 3 switch, and Anna's traceback looks a bit different... On 14 August 2017 at 10:30, Anna Kalogirou <A.Kalogirou@leeds.ac.uk> wrote:
Sometimes “many times” can be 15-20 or even more, and it could take a few minutes. I thought it would be better to report it just in case it can be fixed.
On 14 Aug 2017, at 10:23, Miklós Homolya <m.homolya14@imperial.ac.uk> wrote:
Just pressing Ctrl+C many times, that will terminate the process eventually...
On 14/08/17 09:59, Anna Kalogirou wrote:
Dear all,
This is a bit of a silly comment, but I have noticed that since the upgrade to python3 I can’t terminate a simulation with ctrl+c.
I get the following on the screen and the simulation continues to run:
^CTraceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 858, in libpetsc4py.MatMult_Python File "/Users/dkc16gyu/firedrake/src/PyOP2/pyop2/petsc_base.py", line 1008, in mult x.comm.tompi4py().bcast(a) File "PETSc/Comm.pyx", line 105, in petsc4py.PETSc.Comm.tompi4py File "PETSc/petscmpi.pxi", line 50, in petsc4py.PETSc.mpi4py_Comm_New File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 946, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 885, in _find_spec File "<frozen importlib._bootstrap_external>", line 1157, in find_spec File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec File "<frozen importlib._bootstrap_external>", line 1268, in find_spec File "<frozen importlib._bootstrap_external>", line 59, in _path_join KeyboardInterrupt
The above exception was the direct cause of the following exception:
SystemError: <built-in method insert of list object at 0x108236708> returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: <built-in method insert of list object at 0x108236708> returned a result with an error set
Best wishes,
Anna.
_______________________________________________ firedrake mailing listfiredrake@imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
It is indeed during a PETSc linear solve that doesn’t converge quickly (or at all), hence the need to kill the program. Using ctrl+z as Justin suggested seems better; it immediately gives me control of the terminal and I can then kill the process if I want to. On 14 Aug 2017, at 10:38, Andrew McRae <A.T.T.McRae@bath.ac.uk<mailto:A.T.T.McRae@bath.ac.uk>> wrote: For me, it's always been the case that Ctrl+C does nothing while PETSc is doing a linear solve... if GMRES isn't converging (so runs to the default ksp_max_it of 10,000), or if it takes a lot of iterations, this could certainly take a few minutes if it's a big system. The program would then be killed when leaving the linear solve. However, this was true before the Python 3 switch, and Anna's traceback looks a bit different... On 14 August 2017 at 10:30, Anna Kalogirou <A.Kalogirou@leeds.ac.uk<mailto:A.Kalogirou@leeds.ac.uk>> wrote: Sometimes “many times” can be 15-20 or even more, and it could take a few minutes. I thought it would be better to report it just in case it can be fixed. On 14 Aug 2017, at 10:23, Miklós Homolya <m.homolya14@imperial.ac.uk<mailto:m.homolya14@imperial.ac.uk>> wrote: Just pressing Ctrl+C many times, that will terminate the process eventually... On 14/08/17 09:59, Anna Kalogirou wrote: Dear all, This is a bit of a silly comment, but I have noticed that since the upgrade to python3 I can’t terminate a simulation with ctrl+c. I get the following on the screen and the simulation continues to run: ^CTraceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 858, in libpetsc4py.MatMult_Python File "/Users/dkc16gyu/firedrake/src/PyOP2/pyop2/petsc_base.py", line 1008, in mult x.comm.tompi4py().bcast(a) File "PETSc/Comm.pyx", line 105, in petsc4py.PETSc.Comm.tompi4py File "PETSc/petscmpi.pxi", line 50, in petsc4py.PETSc.mpi4py_Comm_New File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 946, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 885, in _find_spec File "<frozen importlib._bootstrap_external>", line 1157, in find_spec File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec File "<frozen importlib._bootstrap_external>", line 1268, in find_spec File "<frozen importlib._bootstrap_external>", line 59, in _path_join KeyboardInterrupt The above exception was the direct cause of the following exception: SystemError: <built-in method insert of list object at 0x108236708> returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: <built-in method insert of list object at 0x108236708> returned a result with an error set Best wishes, Anna. _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Andrew McRae
- 
                
                Anna Kalogirou