[petsc-dev] Fortran equivalent + separate output with output_file
Pierre Jolivet
pierre.jolivet at enseeiht.fr
Sat Jan 18 00:45:57 CST 2020
It’s weird that the tests are running OK on linux-pkgs-opt, but not on my naked Linux VM.
If that’s not too much to ask, could you please fetch jolivet/feature-hpddm-cleanup, ./configure --download-slepc --download-hpddm
And then, make -f gmakefile test globsearch='ksp_ksp_tutorials-ex76f_*'
That’s the stack
# [0]PETSC ERROR: #1 PCHPDDMSetUpNeumannOverlap_Private() line 505 in /home/john/petsc/src/ksp/pc/impls/hpddm/hpddm.cxx
# [1]PETSC ERROR: #2 PCSetUp_HPDDM() line 624 in /home/john/petsc/src/ksp/pc/impls/hpddm/hpddm.cxx
# [1]PETSC ERROR: #3 PCSetUp() line 894 in /home/john/petsc/src/ksp/pc/interface/precon.c
# [1]PETSC ERROR: #4 KSPSetUp() line 376 in /home/john/petsc/src/ksp/ksp/interface/itfunc.c
# [1]PETSC ERROR: #5 KSPSolve() line 703 in /home/john/petsc/src/ksp/ksp/interface/itfunc.c
# [1]PETSC ERROR: #6 User provided function() line 0 in User file
data->setup is supposed to be NULL (PETSC_NULL_FUNCTION passed in PCHPDDMSetAuxiliaryMat), but apparently it’s not (on my machine), since line 505 is in the if(data->setup) { } branch.
Thanks for your help,
Pierre
> On 17 Jan 2020, at 10:29 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>
>
> Better to send more details. What function are you calling, what is the full error stack. Much quicker for us to help you then repeated email (you can never send too much information about a crash).
>
> PETSC_NULL_FUNCTION is the thing to use, but it is completely manual to for us to put them in the Fortran stubs, we have missed this case but we need to know what it is so we can fix it.
>
> Barry
>
>
>> On Jan 17, 2020, at 3:18 PM, Pierre Jolivet <pierre.jolivet at enseeiht.fr> wrote:
>>
>>
>>
>>> On 13 Jan 2020, at 4:38 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>>>
>>>
>>>
>>>> On Jan 13, 2020, at 9:32 AM, Pierre Jolivet <pierre.jolivet at enseeiht.fr> wrote:
>>>>
>>>> Hello,
>>>> This is actually two separate questions, sorry.
>>>> 1) I’m looking for the Fortran equivalent of the following, but I couldn’t get any help looking at the sources.
>>>> ierr = PetscOptionsBegin(PETSC_COMM_WORLD,"","","");CHKERRQ(ierr);
>>>> ierr = PetscOptionsFList("-mat_type","Matrix type","MatSetType",MatList,deft,type,256,&flg);CHKERRQ(ierr);
>>>> ierr = PetscOptionsEnd();CHKERRQ(ierr);
>>>
>>> These are based on C macros and have some funny arguments so would require all custom Fortran stubs and interfaces. Sorry no one has written them.
>>
>> OK. No big deal.
>> Another question about Fortran: what’s the equivalent of a NULL PetscErrorCode (*setup)(Mat, PetscReal, Vec, Vec, PetscReal, IS, void*)?
>> I’m passing a PETSC_NULL_FUNCTION but it doesn’t seem to do the job as I’m getting segmentation faults in C (for some architectures), the code goes in the if(setup) branch.
>>
>> I want to convert this: https://gitlab.com/petsc/petsc/blob/fbda2a43629902c7e64367d3e3c13db2ceb5b740/src/ksp/ksp/examples/tutorials/ex76.c#L68
>> Into (hopefully something similar to) this: https://gitlab.com/petsc/petsc/commit/fbda2a43629902c7e64367d3e3c13db2ceb5b740#42254f97b9989f77d6aa51f62644a282fc31f3fd_0_93
>>
>> Thanks in advance for bearing with me,
>> Pierre
>
More information about the petsc-dev
mailing list