usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
489 stars 148 forks source link

Question about how to configure PETSc with --download-hypre #1048

Closed CalebDmArcher closed 1 month ago

CalebDmArcher commented 1 month ago

Previously I used sudo pip install mpi4py petsc==3.18.4 petsc4py==3.18.4 to install PETSc and used it with Fipy. Regarding my case that the PETSc developer thinks it takes too many iterations for the result to converge, they suggested I try hypre (-pc_type hypre) and configure the PETSc with --download-hypre.

So I went to the folder of petsc (not the one inside fipy) and tried to do the following, it reported that I do not have the configure file. I assume this is because I use 'sudo pip install'.

./configure --download-hypre
make all
make install

I also checked the petsc folder inside fipy/solvers and that one does not have the configure file, either.

Do you have any suggestions about what I could do?

guyer commented 1 month ago

You would need to download and build PETSc from source. Any issues with that should be taken to PETSc support.

CalebDmArcher commented 1 month ago

You would need to download and build PETSc from source. Any issues with that should be taken to PETSc support.

May I know if there are any specific configurations that Fipy requires except ./configure --with-petsc4py --download-mpi4py which I assume link PETSc with petsc4py and mpi4py?

guyer commented 1 month ago

Not that I'm aware of, but I avoid building PETSc and Trilinos whenever I can

CalebDmArcher commented 1 month ago

Not that I'm aware of, but I avoid building PETSc and Trilinos whenever I can

Thank you for your response. And yeah, building PETSc is so annoying.

(I was using PETSc 3.18.4 which is an old version that when using pip to install, it will trigger a legacy install method after reporting the wheel report and then PETSc can be successfully installed. But 3.18.4 does not support hypre so I have to install the latest version which seems cannot be directly installed by pip because they do not allow that legacy installation method anymore. And this is where the pain starts😭)

I will let you know if I succeed.

CalebDmArcher commented 2 weeks ago

Not that I'm aware of, but I avoid building PETSc and Trilinos whenever I can

Thank you for your response. And yeah, building PETSc is so annoying.

(I was using PETSc 3.18.4 which is an old version that when using pip to install, it will trigger a legacy install method after reporting the wheel report and then PETSc can be successfully installed. But 3.18.4 does not support hypre so I have to install the latest version which seems cannot be directly installed by pip because they do not allow that legacy installation method anymore. And this is where the pain starts😭)

I will let you know if I succeed.

I have successfully installed PETSc with HYPRE.