Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Jed Brown
Alex Fleeter writes: > Thanks, we will try that. I have never used YAML before. It's meant to be more human-readable than XML, and is widely used these days. > Anyway, we feel using command line arguments is a bit old fashioned. It can > be quite desirable to set parameters from a

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Barry Smith
Alex, If you are ok with plan text you can also put all your "command line arguments" in a text file (using # for comment lines) like -ksp_rtol 1.e-3 # very tight tolerance for SNES -snes_rtol 1.e-12 and provide the file to PETSc via the command line argument :-) -options_file filename

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Alex Fleeter
Thanks, we will try that. I have never used YAML before. Anyway, we feel using command line arguments is a bit old fashioned. It can be quite desirable to set parameters from a human-readable file. On Thu, Aug 20, 2020 at 9:38 PM Jed Brown wrote: > You can read from a YAML file with

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Jed Brown
You can read from a YAML file with -options_file_yaml file.yaml or via https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/PetscOptionsInsertFileYAML.html Would this work for you or do you really want XML? Alex Fleeter writes: > Hi: > > Does PETSc have or plan to enable reading

[petsc-users] read argument from an XML file

2020-08-20 Thread Alex Fleeter
Hi: Does PETSc have or plan to enable reading arguments from an XML file? Something like the Teuchos package in Trilinos. Thanks, AF

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Junchao Zhang
Manav, I downloaded your petsc_mat.tgz but could not reproduce the problem, on both Linux and Mac. I used the petsc commit id df0e4300 you mentioned. On Linux, I have openmpi-4.0.2 + gcc-8.3.0, and petsc is configured --with-debugging --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpifort

Re: [petsc-users] On re usability of A matrix and b vector

2020-08-20 Thread Barry Smith
> On Aug 20, 2020, at 7:45 PM, baikadi pranay wrote: > > Thank you for the clarification. > > I also want to get two more things clarified. After i^th call to KSPSolve(), > I get x^i as the solution vector. I do a bunch of updates to A matrix and b > vector using this x^i and copy x^i

Re: [petsc-users] On re usability of A matrix and b vector

2020-08-20 Thread baikadi pranay
Thank you for the clarification. I also want to get two more things clarified. After i^th call to KSPSolve(), I get x^i as the solution vector. I do a bunch of updates to A matrix and b vector using this x^i and copy x^i into a vector called x_old. 1) When I call KSPSolve for the (i+1)th time

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Junchao Zhang
I will have a look and report back to you. Thanks. --Junchao Zhang On Thu, Aug 20, 2020 at 5:23 PM Manav Bhatia wrote: > I have created a standalone test that demonstrates the problem at my end. > I have stored the indices, etc. from my problem in a text file for each > rank, which I use to

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
I have created a standalone test that demonstrates the problem at my end. I have stored the indices, etc. from my problem in a text file for each rank, which I use to initialize the matrix. Please note that the test is specifically for 8 ranks. The .tgz file is on my google drive:

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Jed Brown
Matthew Knepley writes: > On Thu, Aug 20, 2020 at 11:09 AM Manav Bhatia wrote: > >> >> >> On Aug 20, 2020, at 8:31 AM, Stefano Zampini >> wrote: >> >> Can you add a MPI_Barrier before >> >> ierr = MatAssemblyBegin(aij->A,mode);CHKERRQ(ierr); >> >> >> With a MPI_Barrier before this function

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
> On Aug 20, 2020, at 11:21 AM, Stefano Zampini > wrote: > > > >> On Aug 20, 2020, at 5:59 PM, Manav Bhatia > > wrote: >> >> >> >>> On Aug 20, 2020, at 8:31 AM, Stefano Zampini >> > wrote: >>> >>>

Re: [petsc-users] PetscFV and TS implicit

2020-08-20 Thread Jed Brown
Matthew Knepley writes: > I could never get the FVM stuff to make sense to me for implicit methods. > Here is my problem understanding. If you have an FVM method, it decides > to move "stuff" from one cell to its neighboring cells depending on the > solution to the Riemann problem on each face,

Re: [petsc-users] PetscFV and TS implicit

2020-08-20 Thread Matthew Knepley
On Thu, Aug 20, 2020 at 7:45 AM Thibault Bridel-Bertomeu < thibault.bridelberto...@gmail.com> wrote: > Dear all, > > I have a finite volume code inspired from TS example ex11.c (with a > riemann solver, etc...). > So far, I used only explicit time stepping through the TSSSP, and to set > the RHS

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Stefano Zampini
> On Aug 20, 2020, at 5:59 PM, Manav Bhatia wrote: > > > >> On Aug 20, 2020, at 8:31 AM, Stefano Zampini > > wrote: >> >> ((Mat_SeqAIJ*)aij->B->data)->nonew >> mat->was_assembled >> aij->donotstash >> mat->nooffprocentries >> > > The values for the last

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
> On Aug 20, 2020, at 8:31 AM, Stefano Zampini > wrote: > > ((Mat_SeqAIJ*)aij->B->data)->nonew > mat->was_assembled > aij->donotstash > mat->nooffprocentries > The values for the last three variables are all False on all 8 processes. Regards, Manav

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Junchao Zhang
Then could you provide a test case and build instructions? --Junchao Zhang On Thu, Aug 20, 2020 at 10:25 AM Manav Bhatia wrote: > > > On Aug 20, 2020, at 10:22 AM, Junchao Zhang > wrote: > > See if you could reproduce the problem on another machine, e.g., a Linux > workstation with MPICH? > >

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
> On Aug 20, 2020, at 10:22 AM, Junchao Zhang wrote: > > See if you could reproduce the problem on another machine, e.g., a Linux > workstation with MPICH? Yes, the same behavior happened on another machine with Centos 7 with an older build of PETSc.

Re: [petsc-users] Disable PETSC_HAVE_CLOSURE

2020-08-20 Thread Jed Brown
Barry, this is a side-effect of your Swift experiment. Does that need to be in a header (even if it's a private header)? The issue may be that you test with a C compiler and it gets included in C++ source. Fande Kong writes: > Hi All, > > We (moose team) hit an error message when compiling

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Matthew Knepley
On Thu, Aug 20, 2020 at 11:09 AM Manav Bhatia wrote: > > > On Aug 20, 2020, at 8:31 AM, Stefano Zampini > wrote: > > Can you add a MPI_Barrier before > > ierr = MatAssemblyBegin(aij->A,mode);CHKERRQ(ierr); > > > With a MPI_Barrier before this function call: > — three of the processes have

[petsc-users] Disable PETSC_HAVE_CLOSURE

2020-08-20 Thread Fande Kong
Hi All, We (moose team) hit an error message when compiling PETSc, recently. The error is related to "PETSC_HAVE_CLOSURE." Everything runs well if I am going to turn this flag off by making the following changes: git diff diff --git a/config/BuildSystem/config/utilities/closure.py

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
> On Aug 20, 2020, at 8:31 AM, Stefano Zampini > wrote: > > Can you add a MPI_Barrier before > > ierr = MatAssemblyBegin(aij->A,mode);CHKERRQ(ierr); > With a MPI_Barrier before this function call: — three of the processes have already hit this barrier, — the other 5 are inside

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
Stefano, I will report the results to these shortly. To your second question, this is the first matrix assembly of the code. -Manav > On Aug 20, 2020, at 8:31 AM, Stefano Zampini > wrote: > > Manav > > Can you add a MPI_Barrier before > > ierr =

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Stefano Zampini
Manav Can you add a MPI_Barrier before ierr = MatAssemblyBegin(aij->A,mode);CHKERRQ(ierr); Also, in order to assess where the issue is, we need to see the values (per rank) of ((Mat_SeqAIJ*)aij->B->data)->nonew mat->was_assembled aij->donotstash mat->nooffprocentries Another question: is

Re: [petsc-users] MatAssemblyEnd taking too long

2020-08-20 Thread Manav Bhatia
> On Aug 19, 2020, at 9:39 PM, Matthew Knepley wrote: > > Jed is more knowledgeable about the communication, but I have a simple > question about the FEM method. Normally, the way > we divide unknowns is that the only unknowns which might have entries > computed off-process are those on the

[petsc-users] PetscFV and TS implicit

2020-08-20 Thread Thibault Bridel-Bertomeu
Dear all, I have a finite volume code inspired from TS example ex11.c (with a riemann solver, etc...). So far, I used only explicit time stepping through the TSSSP, and to set the RHS of my hyperbolic system I used : TSSetType(ts, TSSSP); DMTSSetRHSFunctionLocal(dm, DMPlexTSComputeRHSFunctionFVM