BLAS/LAPACK Linking Issues

Hi @danking,

It appears that the BLAS linking issue isn’t fully solved for me. While setting the --conf flag to point to the OpenBLAS/LAPACK paths when running spark-submit works for hl.hwe_normalized_pca, the same setting doesn’t work for hl.logistic_regression_rows. I’ve tried different settings based on the fixes you suggested, but none of them have worked so far.

Option 1: set the --conf path to directly point to OpenBLAS/LAPACK, i.e.

--conf spark.executor.extraClassPath=/usr/lib64/libopenblas.so:/usr/lib64/liblapack.so

Option 2: create symlinks to OpenBLAS/LAPACK and add to LD_LIBRARY_PATH, i.e.

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 path to point to the symlink for OpenBLAS/LAPACK, i.e.

--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:

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 spark-submit, so hl.init(spark_conf=...) wouldn’t work like you mentioned. Is there any other fix that could work for this issue?