Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Barry Smith
Is there any reason you can't use the most recent version of PETSc4py? The one you are working with is several years old > On Oct 13, 2022, at 8:53 PM, Peng Sun wrote: > > Hi Hong, > > Thanks for the advice. I could not install petsc4py with the > --with-petsc4py=1 option, which gave

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Peng Sun
Hi Hong, Thanks for the advice. I could not install petsc4py with the --with-petsc4py=1 option, which gave me an "No rule to make target 'petsc4py-install'" error when I ran "make install". That was why I needed to install petsc4py separately after the PETSc was installed. Best regards,

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Zhang, Hong via petsc-users
It seems that you installed petsc4py separately. I would suggest to add the configure option --with-petsc4py=1 and follow the instructions to set PYTHONPATH before using petsc4py. Hong (Mr.) > On Oct 13, 2022, at 10:42 AM, Peng Sun wrote: > > Hi Matt, > > Sure, please see the attached

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Peng Sun
Hi Matt, Please see the following screenshot. Yes, I exported the PETSC_ARCH variable before running the script. Note the "Invalid MIT-MAGIC-COOKIE-1 key" string is related to the X server and in all Python printout, not on PETSc. [cid:95e2940b-842a-4f1b-a542-bad8737d3b38] Best regards,

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Matthew Knepley
On Thu, Oct 13, 2022 at 5:27 PM Peng Sun wrote: > Hi Stefano, > > Sure, please see the following. The PETSC_ARCH field is empty in the > printout despite the fact that it was set to 'arch-linux-c-opt' in the > shell. > > {'PETSC_DIR': '/home/pesun/.emopt', 'PETSC_ARCH': ''} > Can you show the

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Peng Sun
Hi Stefano, Sure, please see the following. The PETSC_ARCH field is empty in the printout despite the fact that it was set to 'arch-linux-c-opt' in the shell. {'PETSC_DIR': '/home/pesun/.emopt', 'PETSC_ARCH': ''} Best regards, Peng Sun From: Stefano Zampini

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Stefano Zampini
Matt Yes, petsc4py does the right thing. This is probably. Picking up the wrong PETSc arch. Peng, can you please run this? import petsc4py petsc4py.init() print(petsc4py.get_config()) > On Oct 13, 2022, at 11:23 PM, Matthew Knepley wrote: > > Lisandro, > > PETSc is compiled for single.

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Matthew Knepley
Lisandro, PETSc is compiled for single. Does petsc4py respect this, or does it always use double for getArray() and friends? Thanks, Matt On Thu, Oct 13, 2022 at 11:42 AM Peng Sun wrote: > Hi Matt, > > Sure, please see the attached configure.log file. Thanks! > > Best regards, > Peng

Re: [petsc-users] Laplace Equation preconditioner

2022-10-13 Thread Alfredo J Duarte Gomez
Hello, I am using KSPGMRES. I was surprised to see DIVERGED_BREAKDOWN as well, which is why I thought there could be some grid issues. However, other preconditioners were able to retrieve a satisfactory solution (PCGAMG, PCGASM, PCLU MUMPS). Is there maybe a problem size for which boomerAMG

Re: [petsc-users] Issue with single precision complex numbers in petsc4py

2022-10-13 Thread Matthew Knepley
First send configure.log so we can see the setup. Thanks, Matt On Thu, Oct 13, 2022 at 12:53 AM Peng Sun wrote: > Dear PETSc community, > > > I have a question regarding the single precision complex numbers of > petsc4py. I configured PETSc with the “--with-scalar-type=complex >

Re: [petsc-users] Slepc, shell matrix, parallel, halo exchange

2022-10-13 Thread feng wang
Hi Mat, Yes, you are right. I have tried both ways and they all work fine. the code snippet in previous post is fine. I had some issue with other parts of the code, that led to the unexpected results. Thanks, Feng From: Matthew Knepley Sent: 10 October 2022