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 
<http://dealii.org/8.4.1/doxygen/deal.II/namespaceLinearAlgebraPETSc.html>;
# define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
using namespace ::LinearAlgebraTrilinos 
<http://dealii.org/8.4.1/doxygen/deal.II/namespaceLinearAlgebraTrilinos.html>
;
#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.

Reply via email to