Re: [petsc-users] Doubt about TSMonitorSolutionVTK

2024-06-24 Thread Barry Smith
See, for example, the bottom of src/ts/tutorials/ex26.c that uses -ts_monitor_solution_vtk 'foo-%03d.vts' > On Jun 24, 2024, at 8:47 PM, MIGUEL MOLINOS PEREZ wrote: > > This Message Is From an External Sender > This message came from outside your organization. > Dear all, > > I want to

Re: [petsc-users] Doubt about TSMonitorSolutionVTK

2024-06-24 Thread MIGUEL MOLINOS PEREZ
By the way, the hdf5 format works and I have the vtk library installed in PETSc. Miguel On Jun 24, 2024, at 5:47 PM, MIGUEL MOLINOS PEREZ wrote: Dear all, I want to monitor the results at each iteration of TS using vtk format. To do so, I add the following lines to my Monitor function: char

[petsc-users] Doubt about TSMonitorSolutionVTK

2024-06-24 Thread MIGUEL MOLINOS PEREZ
Dear all, I want to monitor the results at each iteration of TS using vtk format. To do so, I add the following lines to my Monitor function: char vts_File_Name[MAXC]; PetscCall(PetscSNPrintf(vts_File_Name, sizeof(vts_File_Name), "./xi-MgHx-hcp-cube-x5-x5-x5-TS-BE-%i.vtu", step)); PetscCall(TSMo

Re: [petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread MIGUEL MOLINOS PEREZ
This is very useful tip, thank you! Miguel On Jun 24, 2024, at 2:04 PM, Barry Smith wrote: SNESSetOptionsPrefix

Re: [petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread Barry Smith
Note you can uses SNESSetOptionsPrefix(snes,"myprefix_") to attach a prefix for the one dimensional solves and then set options for the one dimensional problems with -myprefix_snes_type etc Now you can set different options for the different types of snes in your code > On Jun 24, 2024, a

Re: [petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread MIGUEL MOLINOS PEREZ
Thanks Barry, that was the problem! Thank you, Miguel On Jun 24, 2024, at 12:56 PM, Barry Smith wrote: The error is coming from the parallel SNES used by TS TSTheta_SNESSolve() not your small SNES solver but TSTheta_SNESSolve() Process 7 uses [7]PETSC ERROR: #4 SNESLineSearchApply_CP(

Re: [petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread Barry Smith
The error is coming from the parallel SNES used by TS TSTheta_SNESSolve() not your small SNES solver but TSTheta_SNESSolve() Process 7 uses [7]PETSC ERROR: #4 SNESLineSearchApply_CP() while the rest uses _BT(). I think this causes the problem since they are different algorithms using d

Re: [petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread Matthew Knepley
On Mon, Jun 24, 2024 at 2:50 PM MIGUEL MOLINOS PEREZ wrote: > Dear all, I am trying to assemble a matrix A with coefficients which I > need to assemble the RHS (F) and its Jacobian (J) in a TS type of problem. > Determining each coefficient of A involves the resolution of a small > non-linear pro

[petsc-users] Error type "Petsc has generated inconsistent data"

2024-06-24 Thread MIGUEL MOLINOS PEREZ
Dear all, I am trying to assemble a matrix A with coefficients which I need to assemble the RHS (F) and its Jacobian (J) in a TS type of problem. Determining each coefficient of A involves the resolution of a small non-linear problem (1 dof) using the serial version of SNES. By the way, the mat

Re: [petsc-users] [petsc-maint] Assistance Needed with PETSc KSPSolve Performance Issue

2024-06-24 Thread Junchao Zhang
Let me run some examples on our end to see whether the code calls expected functions. --Junchao Zhang On Mon, Jun 24, 2024 at 10:46 AM Matthew Knepley wrote: > On Mon, Jun 24, 2024 at 11: 21 AM Yongzhong Li utoronto. ca> wrote: Thank you Pierre for your information. Do we have a > conclusion

Re: [petsc-users] Problem about compiling PETSc-3.21.2 under Cygwin

2024-06-24 Thread Satish Balay
Probably best if you can restart this build using a fresh tarball - and see if the problem persists Satish On Mon, 24 Jun 2024, Barry Smith wrote: > > Do > > ls /cygdrive/e/Major/Codes/libraries/PETSc/petsc-3. 21. 2/lib/petsc/conf/ ZjQcmQRYFpfptBannerStart This Message

Re: [petsc-users] Problem about compiling PETSc-3.21.2 under Cygwin

2024-06-24 Thread Barry Smith
Do ls /cygdrive/e/Major/Codes/libraries/PETSc/petsc-3.21.2/lib/petsc/conf/ > On Jun 23, 2024, at 8:27 AM, Gang Li wrote: > > This Message Is From an External Sender > This message came from outside your organization. > Hi, > > I have configured the PETSc under Cygwin by: > > cygpath -

Re: [petsc-users] [petsc-maint] Assistance Needed with PETSc KSPSolve Performance Issue

2024-06-24 Thread Matthew Knepley
On Mon, Jun 24, 2024 at 11:21 AM Yongzhong Li wrote: > Thank you Pierre for your information. Do we have a conclusion for my > original question about the parallelization efficiency for different stages > of KSP Solve? Do we need to do more testing to figure out the issues? Thank > you, Yongzhong

Re: [petsc-users] Restart Krylov-Schur "Manually"

2024-06-24 Thread Matthew Knepley
On Mon, Jun 24, 2024 at 11:38 AM Samar Khatiwala < samar.khatiw...@earth.ox.ac.uk> wrote: > Hi Matt, > > This would be for SNES and KSP. In many of my applications it would be too > expensive to regenerate the Krylov space, which would also be problematic > for Newton as I often do matrix-free cal

Re: [petsc-users] Modelica + PETSc?

2024-06-24 Thread Matthew Knepley
On Mon, Jun 24, 2024 at 10:29 AM Zou, Ling wrote: > This is the website I normally refer to > > https://urldefense.us/v3/__https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/solving.html__;!!G_uCfscf7eWS!atB8LuQrlGQnbi8lXYaGJKrUHYTfhXYVS8-QcBlSPWc_cjEPT8rDhboXFr08Hx6cSDhSTlwO2WEXOpoY6C5F$

Re: [petsc-users] Restart Krylov-Schur "Manually"

2024-06-24 Thread Samar Khatiwala
Hi Matt, This would be for SNES and KSP. In many of my applications it would be too expensive to regenerate the Krylov space, which would also be problematic for Newton as I often do matrix-free calculations. I know how complex the underlying data structures are for these objects and entirely

Re: [petsc-users] [petsc-maint] Assistance Needed with PETSc KSPSolve Performance Issue

2024-06-24 Thread Yongzhong Li
Thank you Pierre for your information. Do we have a conclusion for my original question about the parallelization efficiency for different stages of KSP Solve? Do we need to do more testing to figure out the issues? Thank you, Yongzhong From: Pierre Jolivet Date: Sunday, June 23, 2024 at 12:41

Re: [petsc-users] Modelica + PETSc?

2024-06-24 Thread Zou, Ling via petsc-users
This is the website I normally refer to https://urldefense.us/v3/__https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/solving.html__;!!G_uCfscf7eWS!ZZZIEo4PTP8K3Wn8r3Qk0Zy1YJWCVZtiUVvdSq4KnaeMp3VLcrJ3eQOZocmlvn8MCCGcUyzd0niXGJqTtg4$ Looks like DASSL is the default solver. PS: I was playi

Re: [petsc-users] Restart Krylov-Schur "Manually"

2024-06-24 Thread Matthew Knepley
On Mon, Jun 24, 2024 at 4:24 AM Samar Khatiwala < samar.khatiw...@earth.ox.ac.uk> wrote: > Hi, Sorry to hijack this thread but I just want to add that this is a more > general problem that I constantly face with PETSc. Not being able to > checkpoint the complete state of a solver instance and rest

Re: [petsc-users] Modelica + PETSc?

2024-06-24 Thread Matthew Knepley
On Sun, Jun 23, 2024 at 5:04 PM Zou, Ling via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi all, I am just curious … any effort trying to include PETSc as > Modelica’s solution option? > > (Modelica forum or email list seem to be quite dead so asking here.) > I had not heard of it before. I

Re: [petsc-users] Restart Krylov-Schur "Manually"

2024-06-24 Thread Samar Khatiwala
Hi, Sorry to hijack this thread but I just want to add that this is a more general problem that I constantly face with PETSc. Not being able to checkpoint the complete state of a solver instance and restart a computation (at least not easily) has long been the biggest missing feature in PETSc f

Re: [petsc-users] Restart Krylov-Schur "Manually"

2024-06-24 Thread Jose E. Roman via petsc-users
Unfortunately there is no support for this. If you requested several eigenvalues and the solver has converged some of them already, then it would be possible to stop the run, save the eigenvectors and rerun with the eigenvectors passed via ZjQcmQRYFpfptBannerStart This