Skip to content

Commit f59133b

Browse files
author
Francesc Verdugo
committed
Fixing error in use_system_petsc
1 parent 5ee1649 commit f59133b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/preferences_tail.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ function use_system_petsc(;libpetsc_path=nothing)
2929
end
3030
end
3131
end
32+
end
33+
if libpetsc_path === nothing
3234
msg = """
3335
Unable to find a Petsc installation in the system.
3436
@@ -39,7 +41,7 @@ function use_system_petsc(;libpetsc_path=nothing)
3941
4042
Example
4143
=======
42-
44+
4345
julia> using PetscCall
4446
julia> using PetscCall.use_system_petsc(;libpetsc_path="path/to/libpetsc.so")
4547
"""
@@ -49,7 +51,7 @@ function use_system_petsc(;libpetsc_path=nothing)
4951
flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_GLOBAL
5052
old_libpetsc_handle = libpetsc_handle[]
5153
new_libpetsc_handle = Libdl.dlopen(libpetsc_path,flags,throw_error=true)
52-
try
54+
try
5355
libpetsc_handle[] = new_libpetsc_handle
5456
scalar_type = Ref{PetscDataType}()
5557
scalar_found = Ref{PetscBool}()

0 commit comments

Comments
 (0)