Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Wolfgang Bangerth

On 10/14/2016 12:45 PM, Timo Heister wrote:

Documentation in the include part says : " uncomment the following #define
> if you have PETSc and Trilinos installed and you prefer using Trilinos in
> this example: #define FORCE_USE_OF_TRILINOS"
> I can't understand what it means by the change in the following part:

You only need to change that one line. The logic below is a bit
complicated because it will use PETSc (if available), otherwise
Trilinos (if available). The order is reversed if you uncomment the
line above.


Timo -- I think what confused the reporter was that the comment says 
"uncomment the following #define", but there is just an #if and a complicated 
one to boot. Maybe ought to update the comment -- I think I recall the #if 
having become significantly more complicated recently.


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Timo Heister
> Documentation in the include part says : " uncomment the following #define
> if you have PETSc and Trilinos installed and you prefer using Trilinos in
> this example: #define FORCE_USE_OF_TRILINOS"
> I can't understand what it means by the change in the following part:

You only need to change that one line. The logic below is a bit
complicated because it will use PETSc (if available), otherwise
Trilinos (if available). The order is reversed if you uncomment the
line above.


-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Hamed Babaei
Hi Daniel,

I hope you are doing well. I've been struggling to run step-40 using 
Trilinos instead of Petsc. 
I appreciate it if you could let me know which parts of the code should be 
changed and how.

Documentation in the include part says : " uncomment the following #define 
if you have PETSc and Trilinos installed and you prefer using Trilinos in 
this example: #define FORCE_USE_OF_TRILINOS"
I can't understand what it means by the change in the following part:

namespace LA
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && 
defined(FORCE_USE_OF_TRILINOS))
using namespace ::LinearAlgebraPETSc 
;
# define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
using namespace ::LinearAlgebraTrilinos 

;
#else
# error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}

Thanks

On Monday, July 4, 2016 at 5:00:51 PM UTC-5, Daniel Arndt wrote:
>
> Ehsan,
>
> All I can say: After switching the order of arguments in 
> SparseMatrix::add, your code runs for me with a recent developer version 
> and Trilinos at least.
>
> Best,
> Daniel
>
> Am Montag, 4. Juli 2016 18:59:05 UTC+2 schrieb Ehsan Esfahani:
>>
>> Dear Professor Bangerth,
>>
>> Thanks for your response. Yes, I did. As I mentioned, I got a backtrace 
>> in the debugger (eclipse) and I find out that the problem is in the line I 
>> have mentioned but I couldn't find out what's the problem in that line of 
>> the code which causes segmentation violation.
>>
>> Best,
>> Ehsan
>>
>>
>> On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>>>
>>> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
>>> > Dear All, 
>>> > 
>>> > Greetings. I changed step-25 (minor changes) in order to solve my 
>>> problem. Now 
>>> > I want to change this code for parallel computation based on the 
>>> method 
>>> > mentioned in step-40. I got several errors and solved them one by one 
>>> but the 
>>> > following error: 
>>> > 
>>> > /Number of active cells: 1024 
>>> > //   Total number of cells: 1365 
>>> > //{[0,4224]}// 
>>> > //Time step #1; advancing to t = 0.1. 
>>>  > [...] 
>>> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
>>> Violation, 
>>> > probably memory access out of range 
>>>  > [...] 
>>> > 
>>> > / 
>>> > / 
>>> > Eclipse gives me a backtrace in the following line of the code: 
>>> > /solver.solve (system_matrix, 
>>> completely_distributed_solution_update, 
>>> > system_rhs,/ 
>>> > /  preconditioner);/ 
>>> > I have no idea why I got this error. The code is running properly for 
>>> /fe(1) 
>>> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
>>> > n_global_refinments (4) I got that error related to /Segmentation 
>>> Violation. 
>>> > /Do you know what's going on? Also, I have attached the code here . 
>>> Thanks in 
>>> > advance for your help. 
>>>
>>> Ehsan, 
>>>
>>> segmentation violations (SEGV) are typically easy to debug because you 
>>> can get 
>>> a backtrave in the debugger of the exact place where it happens, and you 
>>> can 
>>> then look at the local variables to see why this may have happened. Have 
>>> you 
>>> tried to run the program in a debugger and see what is going on? 
>>>
>>> Best 
>>>   W. 
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>>  www: 
>>> http://www.math.tamu.edu/~bangerth/ 
>>>
>>>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-05 Thread Wolfgang Bangerth

On 07/05/2016 10:08 AM, Ehsan Esfahani wrote:


thanks for your response. the problem is in preconditioner. I find out
that my code is running on my friend's machine but I get the error
related to SEGV. I have changed preconditioner to Jacobi and it's
running but with more iterations than AMG. Also, it's not running on my
computer and the problem on my computer remained the same as before :-(


Ehsan,
then let us come back to my original suggestion: when you run a program 
in a debugger and it crashes, the backtrace will show where this 
happens. If the problem was really in the line

  solver.solve (system_matrix, completely_distributed_solution_update,
system_rhs, preconditioner);
then that would mean that in creating one of the arguments to this call, 
the program did something illegal. For example, it could be that one of 
the arguments is a reference that is not bound to anything. You should 
be able to see this by looking at the various arguments in the debugger.


More likely, however, is that the program actually crashed *inside* the 
`solver.solve` function, or one of the functions that it calls. You can 
see this too in the backtrace, by seeing which functions are being 
called. Once you find out which function creates the problem, you can 
again look at the arguments and local variables and see what is happening.


Best
 W.

--

Wolfgang Bangerth   email:bange...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-05 Thread Ehsan Esfahani
Daniel,

thanks for your response. the problem is in preconditioner. I find out that 
my code is running on my friend's machine but I get the error related to 
SEGV. I have changed preconditioner to Jacobi and it's running but with 
more iterations than AMG. Also, it's not running on my computer and the 
problem on my computer remained the same as before :-(

Best,
Ehsan 

On Monday, July 4, 2016 at 5:00:51 PM UTC-5, Daniel Arndt wrote:
>
> Ehsan,
>
> All I can say: After switching the order of arguments in 
> SparseMatrix::add, your code runs for me with a recent developer version 
> and Trilinos at least.
>
> Best,
> Daniel
>
> Am Montag, 4. Juli 2016 18:59:05 UTC+2 schrieb Ehsan Esfahani:
>>
>> Dear Professor Bangerth,
>>
>> Thanks for your response. Yes, I did. As I mentioned, I got a backtrace 
>> in the debugger (eclipse) and I find out that the problem is in the line I 
>> have mentioned but I couldn't find out what's the problem in that line of 
>> the code which causes segmentation violation.
>>
>> Best,
>> Ehsan
>>
>>
>> On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>>>
>>> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
>>> > Dear All, 
>>> > 
>>> > Greetings. I changed step-25 (minor changes) in order to solve my 
>>> problem. Now 
>>> > I want to change this code for parallel computation based on the 
>>> method 
>>> > mentioned in step-40. I got several errors and solved them one by one 
>>> but the 
>>> > following error: 
>>> > 
>>> > /Number of active cells: 1024 
>>> > //   Total number of cells: 1365 
>>> > //{[0,4224]}// 
>>> > //Time step #1; advancing to t = 0.1. 
>>>  > [...] 
>>> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
>>> Violation, 
>>> > probably memory access out of range 
>>>  > [...] 
>>> > 
>>> > / 
>>> > / 
>>> > Eclipse gives me a backtrace in the following line of the code: 
>>> > /solver.solve (system_matrix, 
>>> completely_distributed_solution_update, 
>>> > system_rhs,/ 
>>> > /  preconditioner);/ 
>>> > I have no idea why I got this error. The code is running properly for 
>>> /fe(1) 
>>> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
>>> > n_global_refinments (4) I got that error related to /Segmentation 
>>> Violation. 
>>> > /Do you know what's going on? Also, I have attached the code here . 
>>> Thanks in 
>>> > advance for your help. 
>>>
>>> Ehsan, 
>>>
>>> segmentation violations (SEGV) are typically easy to debug because you 
>>> can get 
>>> a backtrave in the debugger of the exact place where it happens, and you 
>>> can 
>>> then look at the local variables to see why this may have happened. Have 
>>> you 
>>> tried to run the program in a debugger and see what is going on? 
>>>
>>> Best 
>>>   W. 
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>>  www: 
>>> http://www.math.tamu.edu/~bangerth/ 
>>>
>>>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-04 Thread Daniel Arndt
Ehsan,

All I can say: After switching the order of arguments in SparseMatrix::add, 
your code runs for me with a recent developer version and Trilinos at least.

Best,
Daniel

Am Montag, 4. Juli 2016 18:59:05 UTC+2 schrieb Ehsan Esfahani:
>
> Dear Professor Bangerth,
>
> Thanks for your response. Yes, I did. As I mentioned, I got a backtrace in 
> the debugger (eclipse) and I find out that the problem is in the line I 
> have mentioned but I couldn't find out what's the problem in that line of 
> the code which causes segmentation violation.
>
> Best,
> Ehsan
>
>
> On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>>
>> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
>> > Dear All, 
>> > 
>> > Greetings. I changed step-25 (minor changes) in order to solve my 
>> problem. Now 
>> > I want to change this code for parallel computation based on the method 
>> > mentioned in step-40. I got several errors and solved them one by one 
>> but the 
>> > following error: 
>> > 
>> > /Number of active cells: 1024 
>> > //   Total number of cells: 1365 
>> > //{[0,4224]}// 
>> > //Time step #1; advancing to t = 0.1. 
>>  > [...] 
>> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
>> Violation, 
>> > probably memory access out of range 
>>  > [...] 
>> > 
>> > / 
>> > / 
>> > Eclipse gives me a backtrace in the following line of the code: 
>> > /solver.solve (system_matrix, 
>> completely_distributed_solution_update, 
>> > system_rhs,/ 
>> > /  preconditioner);/ 
>> > I have no idea why I got this error. The code is running properly for 
>> /fe(1) 
>> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
>> > n_global_refinments (4) I got that error related to /Segmentation 
>> Violation. 
>> > /Do you know what's going on? Also, I have attached the code here . 
>> Thanks in 
>> > advance for your help. 
>>
>> Ehsan, 
>>
>> segmentation violations (SEGV) are typically easy to debug because you 
>> can get 
>> a backtrave in the debugger of the exact place where it happens, and you 
>> can 
>> then look at the local variables to see why this may have happened. Have 
>> you 
>> tried to run the program in a debugger and see what is going on? 
>>
>> Best 
>>   W. 
>>
>> -- 
>>  
>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>  www: http://www.math.tamu.edu/~bangerth/ 
>>
>>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-04 Thread Ehsan Esfahani
Dear Professor Bangerth,

Thanks for your response. Yes, I did. As I mentioned, I got a backtrace in 
the debugger (eclipse) and I find out that the problem is in the line I 
have mentioned but I couldn't find out what's the problem in that line of 
the code which causes segmentation violation.

Best,
Ehsan


On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>
> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
> > Dear All, 
> > 
> > Greetings. I changed step-25 (minor changes) in order to solve my 
> problem. Now 
> > I want to change this code for parallel computation based on the method 
> > mentioned in step-40. I got several errors and solved them one by one 
> but the 
> > following error: 
> > 
> > /Number of active cells: 1024 
> > //   Total number of cells: 1365 
> > //{[0,4224]}// 
> > //Time step #1; advancing to t = 0.1. 
>  > [...] 
> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
> Violation, 
> > probably memory access out of range 
>  > [...] 
> > 
> > / 
> > / 
> > Eclipse gives me a backtrace in the following line of the code: 
> > /solver.solve (system_matrix, 
> completely_distributed_solution_update, 
> > system_rhs,/ 
> > /  preconditioner);/ 
> > I have no idea why I got this error. The code is running properly for 
> /fe(1) 
> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
> > n_global_refinments (4) I got that error related to /Segmentation 
> Violation. 
> > /Do you know what's going on? Also, I have attached the code here . 
> Thanks in 
> > advance for your help. 
>
> Ehsan, 
>
> segmentation violations (SEGV) are typically easy to debug because you can 
> get 
> a backtrave in the debugger of the exact place where it happens, and you 
> can 
> then look at the local variables to see why this may have happened. Have 
> you 
> tried to run the program in a debugger and see what is going on? 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>  
>  www: http://www.math.tamu.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-03 Thread Wolfgang Bangerth

On 07/03/2016 03:50 PM, Ehsan Esfahani wrote:

Dear All,

Greetings. I changed step-25 (minor changes) in order to solve my problem. Now
I want to change this code for parallel computation based on the method
mentioned in step-40. I got several errors and solved them one by one but the
following error:

/Number of active cells: 1024
//   Total number of cells: 1365
//{[0,4224]}//
//Time step #1; advancing to t = 0.1.

> [...]

//[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
probably memory access out of range

> [...]


/
/
Eclipse gives me a backtrace in the following line of the code:
/solver.solve (system_matrix, completely_distributed_solution_update,
system_rhs,/
/  preconditioner);/
I have no idea why I got this error. The code is running properly for /fe(1)
/and /n_global_refinements (4)/ but when I change them to /fe(2)/ and
n_global_refinments (4) I got that error related to /Segmentation Violation.
/Do you know what's going on? Also, I have attached the code here . Thanks in
advance for your help.


Ehsan,

segmentation violations (SEGV) are typically easy to debug because you can get 
a backtrave in the debugger of the exact place where it happens, and you can 
then look at the local variables to see why this may have happened. Have you 
tried to run the program in a debugger and see what is going on?


Best
 W.

--

Wolfgang Bangerth   email:bange...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-03 Thread Ehsan Esfahani
Dear All,

Greetings. I changed step-25 (minor changes) in order to solve my problem. 
Now I want to change this code for parallel computation based on the method 
mentioned in step-40. I got several errors and solved them one by one but 
the following error:
   

>
> *Number of active cells: 1024*
> *   Total number of cells: 1365**{[0,4224]}*
>
> *Time step #1; advancing to t = 0.1.*
>
> *--*
> *MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD **with 
> errorcode 59.*
>
> *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.*
>
> *--*
> *[0]PETSC ERROR: 
> *
> *[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
> probably memory access out of range*
> *[0]PETSC ERROR: Try option -start_in_debugger or 
> -on_error_attach_debugger*
> *[0]PETSC ERROR: or 
> see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind 
> *
> *[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: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>  for trouble shooting.*
> *[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 *
> *[0]PETSC ERROR: 
> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25 
> (mine)/step-25 on a arch-linux2-c-opt named levitasgrad01.me.iastate.edu 
>  by ehsan Sun Jul  3 13:46:52 2016*
> *[0]PETSC ERROR: Configure options 
> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
> --download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90**[0]PETSC ERROR: #1 User 
> provided function() line 0 in  unknown file*


Eclipse gives me a backtrace in the following line of the code:
* solver.solve (system_matrix, completely_distributed_solution_update, 
system_rhs,*
*   preconditioner); *
I have no idea why I got this error. The code is running properly for 
*fe(1) *and *n_global_refinements (4)* but when I change them to *fe(2)* and 
n_global_refinments (4) I got that error related to *Segmentation 
Violation. *Do you know what's going on? Also, I have attached the code 
here . Thanks in advance for your help.

Best Regards,
Ehsan Esfahani

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include //
#include 
#include 
#include 

#include //
#include //

#include 
#include 

namespace Step25
{
 

[deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-03 Thread Ehsan Esfahani
Dear All,

Greetings. I changed step-25 (minor changes) in order to solve my problem. 
Now I want to change this code for parallel computation based on the method 
mentioned in step-40. I got several errors and solved them one by one but 
the following error:
   

>
> *Number of active cells: 1024*
> *   Total number of cells: 1365**{[0,4224]}*
>
> *Time step #1; advancing to t = 0.1.*
>
> *--*
> *MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD **with 
> errorcode 59.*
>
> *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.*
>
> *--*
> *[0]PETSC ERROR: 
> *
> *[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
> probably memory access out of range*
> *[0]PETSC ERROR: Try option -start_in_debugger or 
> -on_error_attach_debugger*
> *[0]PETSC ERROR: or 
> see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind 
> *
> *[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: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>  for trouble shooting.*
> *[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 *
> *[0]PETSC ERROR: 
> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25 
> (mine)/step-25 on a arch-linux2-c-opt named levitasgrad01.me.iastate.edu 
>  by ehsan Sun Jul  3 13:46:52 2016*
> *[0]PETSC ERROR: Configure options 
> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
> --download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90**[0]PETSC ERROR: #1 User 
> provided function() line 0 in  unknown file*


Eclipse gives me a backtrace in the following line of the code:
* solver.solve (system_matrix, completely_distributed_solution_update, 
system_rhs,*
*   preconditioner); *
I have no idea why I got this error. The code is running properly for 
*fe(1) *and *n_global_refinements (4)* but when I change them to *fe(2)* and 
n_global_refinments (4) I got that error related to *Segmentation 
Violation. *Do you know what's going on? Also, I have attached the code 
here . Thanks in advance for your help.

Best Regards,
Ehsan Esfahani

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include //
#include 
#include 
#include 

#include //
#include //

#include 
#include 

namespace Step25
{