[petsc-users] PETSC ERROR: Caught signal number 15 Terminate

Debao Shao Debao.Shao at brion.com
Thu Aug 4 21:50:42 CDT 2011


Thanks, I'm trying your suggestion "PetscInitialize(&argc, &argv, 0, 0 )", hope it can fix the problem.

Do you mind to explain a little "PetscInitialize" to me?
1, must it be call at the beginning of program?
2, what's the other purpose if I don't want to input any argc?
3, if I implement petsc as an optional solution, can I put "PetscInitialize" just before petsc is really executed, while not just put them at the beginning of program?

Thanks,
Debao
________________________________
From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley
Sent: Friday, August 05, 2011 10:44 AM
To: PETSc users list
Subject: Re: [petsc-users] PETSC ERROR: Caught signal number 15 Terminate

On Fri, Aug 5, 2011 at 2:38 AM, Debao Shao <Debao.Shao at brion.com<mailto:Debao.Shao at brion.com>> wrote:
Doesn't SEGV fault is signal 11?

Yes, 15 is SIGTERM. It appears that either you have another signal handler installed which
is terminating on an error, or something killed your program. I can guarantee you that the
PetscInitialize(0,0,0,0) is a seg fault.

   Matt


________________________________
From: petsc-users-bounces at mcs.anl.gov<mailto:petsc-users-bounces at mcs.anl.gov> [mailto:petsc-users-bounces at mcs.anl.gov<mailto:petsc-users-bounces at mcs.anl.gov>] On Behalf Of Matthew Knepley
Sent: Friday, August 05, 2011 10:35 AM

To: PETSc users list
Subject: Re: [petsc-users] PETSC ERROR: Caught signal number 15 Terminate

On Fri, Aug 5, 2011 at 2:33 AM, Debao Shao <Debao.Shao at brion.com<mailto:Debao.Shao at brion.com>> wrote:
So the real problem is the wrong usage of "PetscInitialize(0, 0, 0, 0 )", but I do have many successive runs before with this setting.

Any kind of memory overwrite gives an SEGV. So other code, making a different error will give that too.

   Matt


Thanks,
Debao
________________________________
From: petsc-users-bounces at mcs.anl.gov<mailto:petsc-users-bounces at mcs.anl.gov> [mailto:petsc-users-bounces at mcs.anl.gov<mailto:petsc-users-bounces at mcs.anl.gov>] On Behalf Of Matthew Knepley
Sent: Friday, August 05, 2011 10:25 AM
To: PETSc users list
Subject: Re: [petsc-users] PETSC ERROR: Caught signal number 15 Terminate

On Fri, Aug 5, 2011 at 2:20 AM, Debao Shao <Debao.Shao at brion.com<mailto:Debao.Shao at brion.com>> wrote:
DA:

Sometimes I may encounter crashing when using PETSc, it doesn't happen always.

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 15 Terminate: Somet process (or the batch system) has told this process to end
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on GNU/linux
and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Signal received!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17 13:37:48 CDT 2011
[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: Unknown Name on a linux-gnu named r0leaf17 by tachyon Thu Aug  4 04:04:19 2011
[0]PETSC ERROR: Libraries linked from /home/dshao/dev_t2k/third_party/OOQP/OOQP-0.99.19/extras/petsc-3.1-p8/linux-gnu-c-debug/lib
[0]PETSC ERROR: Configure run at Thu Apr 21 18:09:19 2011
[0]PETSC ERROR: Configure options --with-mpi=0 --with-debugging=0 -with-log=0 -with-info=0
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file

Do you happen to know the possible cause?

I also have a question about the usage of "PetscInitialize" & "PetscFinalize". I can't totally understand them from the manual.

Now, I wrote it as:
Int main(int argc, char **argv)
{
         PetscInitialize(0, 0, 0, 0 );

This is not a valid call. Try

  PetscInitialize(&argc, &argv, 0, 0);

Signal 15 is a segmentation fault, which means an illegal memory read or write.

   Matt


         VerifyApp app(argc, argv);
         app.Initialize();
         app.Run();

         PetscFinalize();
         return 0;
}

Then, built a binary, say "verify", and executed "verify" on a server first, then, started another "verify" on client by server.
The program ran at client side can be multiple processes and multiple threads.

Is my usage correct?
Your answer is appreciated.

Thanks,
Debao

________________________________
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

________________________________
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

________________________________
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

________________________________
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110804/2cd3fcbe/attachment-0001.htm>


More information about the petsc-users mailing list