[petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread 丁老师
Dear friends: My code run without any problem yesterday, but it gives me the following error. I do not know what is the reason? Regards [0]PETSC ERROR: #1 PetscOptionsInsertFile() line 563 in /home/ztdep/Downloads/petsc-3.6.3/src/sys/objects/options.c [0]PETSC ERROR: #2 PetscOptionsInsert() l

Re: [petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread Patrick Sanan
Could you send the entire error message? On Fri, Aug 26, 2016 at 9:42 AM, 丁老师 wrote: > Dear friends: >My code run without any problem yesterday, but it gives me the following > error. I do not know what is the reason? > Regards > > [0]PETSC ERROR: #1 PetscOptionsInsertFile() line 563 in > /ho

Re: [petsc-users] dmplex with block size error

2016-08-26 Thread Rongliang Chen
Hi Matt, I think there is a typo in the following code (line 633 and 636 in plexpreallocate.c). == } else { /* Only loop over blocks of rows */ for (r = rStart/bs; r < rEnd/bs; ++r) { const PetscInt row = r*bs; PetscInt numCols, cStart, c; ier

Re: [petsc-users] dmplex with block size error

2016-08-26 Thread Matthew Knepley
On Fri, Aug 26, 2016 at 5:52 AM, Rongliang Chen wrote: > Hi Matt, > > I think there is a typo in the following code (line 633 and 636 in > plexpreallocate.c). > Those are fixed in the current 'master'. Which branch are you using? Thanks, Matt > == > } else { > /*

Re: [petsc-users] dmplex with block size error

2016-08-26 Thread Rongliang Chen
Thanks. I am using a very old version, the petsc-3.6.1. I will try to update my code to the latest version. Best, Rongliang On 08/26/2016 07:47 PM, Matthew Knepley wrote: On Fri, Aug 26, 2016 at 5:52 AM, Rongliang Chen mailto:rongliang.c...@gmail.com>> wrote: Hi Matt, I think there

Re: [petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread Patrick Sanan
I mean the entire message between the dotted lines [0]PETSC ERROR: - Error Message -- [0]PETSC ERROR: End of Error Message ---send entire error message to petsc-ma...@mcs.anl.gov---

[petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Steven Dargaville
Hi all I'm just wondering if there is any plans in the future for MatGetDiagonalBlock to support shell matrices by registering a user-implemented MATOP? MatGetDiagonal supports MATOP, but the block version of this does not. I found a previous query on the user list which touched on this and menti

Re: [petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Dave May
On 26 August 2016 at 14:14, Steven Dargaville wrote: > Hi all > > I'm just wondering if there is any plans in the future for > MatGetDiagonalBlock to support shell matrices by registering a > user-implemented MATOP? MatGetDiagonal supports MATOP, but the block > version of this does not. > > I fo

Re: [petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread Matthew Knepley
On Fri, Aug 26, 2016 at 2:42 AM, 丁老师 wrote: > Dear friends: >My code run without any problem yesterday, but it gives me the > following error. I do not know what is the reason? > I agree with Patrick, send the entire message. However, are you using Fortran? Matt > Regards > > [0]PETSC

Re: [petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Dave May
On 26 August 2016 at 14:34, Dave May wrote: > > > On 26 August 2016 at 14:14, Steven Dargaville > wrote: > >> Hi all >> >> I'm just wondering if there is any plans in the future for >> MatGetDiagonalBlock to support shell matrices by registering a >> user-implemented MATOP? MatGetDiagonal suppor

Re: [petsc-users] Command lines to reproduce the tests of "Composing scalable nonlinear algebraic solvers"

2016-08-26 Thread Mark Adams
On Thu, Aug 25, 2016 at 9:46 AM, Karin&NiKo wrote: > Dear PETSc gurus, > > Thanks to the help of Matthew, I have been able to reproduce in PETSc some > tests of the paper of Peter Brune et al. entitled "Composing scalable > nonlinear algebraic solvers", with special attention to the elasticity te

Re: [petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Steven Dargaville
Hi Dave Thanks for the response. I'm actually using fortran and I wasn't sure that PetscObjectComposeFunction would be accessible, and if so, what sort of fortran magic I might need to call this function (possibly an interface, with or without c_opt). Do you know if it is possible to call that ro

Re: [petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Dave May
On Friday, 26 August 2016, Steven Dargaville wrote: > Hi Dave > > Thanks for the response. I'm actually using fortran and I wasn't sure that > PetscObjectComposeFunction would be accessible, and if so, what sort of > fortran magic I might need to call this function (possibly an interface, > with

Re: [petsc-users] Command lines to reproduce the tests of "Composing scalable nonlinear algebraic solvers"

2016-08-26 Thread Matthew Knepley
On Thu, Aug 25, 2016 at 8:46 AM, Karin&NiKo wrote: > Dear PETSc gurus, > > Thanks to the help of Matthew, I have been able to reproduce in PETSc some > tests of the paper of Peter Brune et al. entitled "Composing scalable > nonlinear algebraic solvers", with special attention to the elasticity te

Re: [petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread Barry Smith
You got this message because you did not check the error code for PetscInitialize() and so your program continued running until it reached PetscFinalize() where it could not handle the state since PETSc was not properly initialized. You should have code something like call Pets

[petsc-users] GMRES restart guidelines

2016-08-26 Thread Justin Chang
Hi all, When exactly would one need to modify the default restart value of 30 for GMRES? I have seen papers like this which suggest playing around with values between 1 and 30, but are there

Re: [petsc-users] MatGetDiagonalBlock and shell matrices

2016-08-26 Thread Barry Smith
I have added support for this operation in the branch barry/add-matshell-matgetdiagonalblock-fortran Barry Because this required changing the handling of the method MatGetDiagonalBlock() the addition cannot be back ported to PETSc 3.7.x > On Aug 26, 2016, at 8:22 AM, Dave May wrote: >

Re: [petsc-users] GMRES restart guidelines

2016-08-26 Thread Barry Smith
> On Aug 26, 2016, at 2:15 PM, Justin Chang wrote: > > Hi all, > > When exactly would one need to modify the default restart value of 30 for > GMRES? I have seen papers like this which suggest playing around with values > between 1 and 30, but are there cases where people need to use large re

Re: [petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread Barry Smith
You should still check the error code after the call to PetscInitialize() because if the initialization failed the rest of the code will crash badly. Barry > On Aug 26, 2016, at 5:54 PM, 丁老师 wrote: > > thanks, but i use c++ language, there is no need to call the error code. > > > >

[petsc-users] Question regarding updating PETSc Fortran examples to embrace post F77 constructs

2016-08-26 Thread Barry Smith
PETSc users, We've always been very conservative in PETSc to keep almost all our Fortran examples in a format that works with classic FORTRAN 77 constructs: fixed line format, (72 character limit) and no use of ; to separate operations on the same line, etc. Is it time to forgo the