Commit 09aba448 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

try libpetsc_real.so if libpetsc.so is not available (for ubuntu 20.04)

parent 8045619d
Pipeline #9850 passed with stages
in 51 minutes and 32 seconds
......@@ -29,7 +29,13 @@ import os
petscpath = os.environ["PETSC_DIR"]+"/"+os.environ["PETSC_ARCH"]+"/lib"
os.environ["LD_LIBRARY_PATH"] += ":"+petscpath
lib = np.ctypeslib.load_library("libpetsc",petscpath)
try:
lib = np.ctypeslib.load_library("libpetsc",petscpath)
except:
try:
lib = np.ctypeslib.load_library("libpetsc_real",petscpath)
except:
raise ValueError("petsc library not found")
lib.PetscInitialize(None, None, None)
COMM_WORLD = ctypes.c_void_p.in_dll(lib,"PETSC_COMM_WORLD")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment