BLAS/LAPACK Linking Issues #3679
Replies: 3 comments
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Aug 07, 2023 at 14:26) danking said:sk4 , What environment are you in? Do you have root privileges on these machines? Are you certain you have OpenBLAS installed? You need a copy of open blas with the name mkdir -p ~/lib
ln -s /path/to/your/libopenblas.so ~/lib/libblas.so
export LD_LIBRARY_PATH=~/lib:$LD_LIBRARY_PATH and starting Spark with this? --conf spark.executor.extraClassPath="/path/to/libblas.so:/path/to/liblapack.so" The |
Beta Was this translation helpful? Give feedback.
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Aug 07, 2023 at 16:53) sk4 said:Hi danking, Well, it looks like the Spark |
Beta Was this translation helpful? Give feedback.
-
Note The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated. (Nov 09, 2023 at 03:51) sk4 said:Hi danking, It appears that the BLAS linking issue isn’t fully solved for me. While setting the Option 1: set the --conf spark.executor.extraClassPath=/usr/lib64/libopenblas.so:/usr/lib64/liblapack.so Option 2: create symlinks to OpenBLAS/LAPACK and add to ln -s /usr/lib64/libopenblas.so ~/lib/libblas.so`
ln -s /usr/lib64/liblapack.so ~/lib/liblapack.so`
export LD_LIBRARY_PATH=~/lib:$LD_LIBRARY_PATH Option 3: set the --conf spark.executor.extraClassPath=~/lib/libblas.so:~/lib/liblapack.so Option 4: enable both Option 2 + 3 This is the example I’m trying to run, initially posted in this forum: While running a GWAS / linear regression I get: "Answer from Java side empty" and "undefined symbol: cblas_dgemv"I’m getting this error when I try to run a simple GWAS /apps/well/java/jdk1.8.0_latest/bin/java: symbol lookup error: /tmp/jniloader1259648657693918558netlib-native_system-linux-x86_64.so: undefined symbol: cblas_dgemv ERROR:root:Exception while sending command. Traceback (most recent call last): File "/well/lindgren/UKBIOBANK/nbaya/conda/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1159, in send_command raise Py4JNetworkError("Answer from Java side is empty") py4j.pr… import hail as hl
hl.init(log='hail.log')
mt = hl.balding_nichols_model(1,100,2)
mt = mt.annotate_cols(y = hl.rand_bool(0.5))
result_ht = hl.logistic_regression_rows(
test='wald',
y=mt.y,
x=mt.GT.n_alt_alleles(),
covariates=[1]
) I don’t have root privileges on the server I’m using, and Hail is loaded through a modulefile (though I load Spark/Java dependencies separately). In general, I start the Spark server first before initializing Hail with |
Beta Was this translation helpful? Give feedback.
-
Note
The following post was exported from discuss.hail.is, a forum for asking questions about Hail which has since been deprecated.
(Aug 07, 2023 at 02:08) sk4 said:
Hi!
I have been running into issues with BLAS/LAPACK linking when runing Hail functions that use linear algebra operations like linear regression or PCA. The error message looks like this:
I have tried the fixes proposed in this forum:
While running a GWAS / linear regression I get: "Answer from Java side empty" and "undefined symbol: cblas_dgemv"
and this one:
Undefined symbol: cblas_dgemm
But neither have worked to resolve the issue. In particular, if I try the “quick fix” to set LD_PRELOAD to the OpenBLAS path, I get an error from NumPy when importing Hail before initialization:
Is there another way to resolve this issue?
Beta Was this translation helpful? Give feedback.
All reactions