mrirecon / bart

BART: Toolbox for Computational Magnetic Resonance Imaging
https://mrirecon.github.io/bart/
BSD 3-Clause "New" or "Revised" License
291 stars 161 forks source link

Improve custom path specification for toolkits (MKL) #289

Open gdevenyi opened 2 years ago

gdevenyi commented 2 years ago

intel-mkl is now available on Ubuntu 22.04, however its installation doesn't conform to the assumptions in the Makefile.

MKL_BASE is expanded to $MKL_BASE/include, however the includes are at /usr/include/mkl

Similarly, the libs are just at /usr/lib.

MKL_INCLUDE and MKL_LIBS might be a better way.

Ideally of course an autoconf ./configure or a cmake file would remove the need to hard-code paths in a hand written Makefile.

jtamir commented 2 years ago

Hi, by any chance could you make a pull request with your proposed changes? You could follow the approach we took for specifying the CUDA include/lib paths while maintaining backward compatibility, as NVIDIA also changed the paths after a certain CUDA version. See https://github.com/mrirecon/bart/blob/master/Makefile#L166

Note that, though we don't have configure or cmake (any more), the intended use is to not modify the Makefile and instead define a Makefile.local that has the specific build variables defined. For example:

~/bart $ cat Makefile.local

PARALLEL=1

# cuda
CUDA=1
CUDA_BASE=/usr/local/cuda
CUDA_LIB=lib64

# Intel
MKL=1
MKL_BASE=/opt/intel/compilers_and_libraries/linux/mkl
LINKER=icc