deal.II candi installation with external petsc

42 views
Skip to first unread message

David Montiel

unread,
Mar 14, 2025, 4:49:29 PM3/14/25
to deal.II User Group
Hello, 

I want to install deal.II using candi, and I need PETSC amongst other dependencies. 

When I ran the installation script, candi.sh, I got the error message below. However, I managed to successfully install a newer version of petsc externally. 

Now the issue is: I would like to the script to avoid downloading and trying to install the default version petsc and instead indicate the path where I installed so it can add it as a component.

Can this be done?

Thank you!

David

Error message:

Fetching petsc 3.19.0

Verifying petsc-lite-3.19.0.tar.gz

petsc-lite-3.19.0.tar.gz: OK(md5)

petsc-lite-3.19.0.tar.gz already downloaded and verified.

Unpacking petsc-lite-3.19.0.tar.gz

Building petsc 3.19.0


*********************************************************************************************

                            ImportError while running ./configure

---------------------------------------------------------------------------------------------

                                   No module named 'xdrlib'

*********************************************************************************************

make: *** [all] Error 2

Failure with exit status: 2

Exit message: petsc make all install failed 

Wolfgang Bangerth

unread,
Mar 14, 2025, 7:40:26 PM3/14/25
to dea...@googlegroups.com
On 3/14/25 14:49, David Montiel wrote:
>
> When I ran the installation script, candi.sh, I got the error message below.
> However, I managed to successfully install a newer version of petsc externally.
>
> Now the issue is: I would like to the script to avoid downloading and trying
> to install the default version petsc and instead indicate the path where I
> installed so it can add it as a component.
>
> Can this be done?

Yes, deal.II is happy to use an externally installed version of PETSc. In
fact, the easiest way to install deal.II with PETSc is to just use
apt install petsc-dev
or the equivalent on whatever system you are using. If installed this way,
deal.II's cmake script will find it and use it.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


David Montiel

unread,
Mar 15, 2025, 5:38:13 PM3/15/25
to deal.II User Group
Thank you, Wolfgang

I installed petsc with homebrew since I am on a mac

What you suggested seems to have worked and the deal.II installation is running with no issues so far. 

However, should mention that in the in candi.cfg package list, I had to switch the flag for petsci from "once" to "load". i.e., 

PACKAGES="${PACKAGES} load:petsc"

Otherwise it kept trying to download and build petsc 3.19.0, and failing. 

Best,

David
Reply all
Reply to author
Forward
0 new messages