Some refactoring
This commit is contained in:
parent
71bbc0db5f
commit
6af96cf9c8
@ -6,17 +6,16 @@ import numpy as np
|
|||||||
import os
|
import os
|
||||||
import mpmath
|
import mpmath
|
||||||
|
|
||||||
|
|
||||||
def _print_error(msg_str):
|
def _print_error(msg_str):
|
||||||
sys.stderr.write(msg_str + "\n")
|
sys.stderr.write(msg_str + "\n")
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_OpenBLASLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)),"OpenBLAS_install/lib/libopenblas.so.0")
|
_OpenBLASLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)),"OpenBLAS_install/lib/libopenblas.so.0")
|
||||||
c.CDLL(_OpenBLASLibPath)
|
c.CDLL(_OpenBLASLibPath)
|
||||||
except OSError:
|
except OSError:
|
||||||
_print_error("Warning: Failed to load OpenBLAS in its default place. Excepting the library to be available from the system.")
|
_print_error("Warning: Failed to load OpenBLAS in its default place. Excepting the library to be available from the system.")
|
||||||
|
|
||||||
_SpintrumLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/libspintrum.so")
|
_SpintrumLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/libspintrum.so")
|
||||||
if not os.path.exists(_SpintrumLibPath):
|
if not os.path.exists(_SpintrumLibPath):
|
||||||
msg = "WARNING: Could not load the spintrum shared library in path " \
|
msg = "WARNING: Could not load the spintrum shared library in path " \
|
||||||
|
Loading…
Reference in New Issue
Block a user