Open akesandgren opened 6 years ago
@akesandgren How does HPL-2.1-gimkl-2.11.5.eb
fail exactly without the fix?
HPL-2.1-gimkl-2.11.5.eb doesn't fail since it explicitly have openmp:True but see my comment in https://github.com/easybuilders/easybuild-easyblocks/pull/1471
@akesandgren OK, but then which HPL
easyconfig fails when gimkl
is used? I'm a bit confused why this hasn't popped up at all...
The one in https://github.com/easybuilders/easybuild-easyconfigs/pull/6662 which, as I said, is taken from a normal HPL-2.2-intel-x.eb and thus contains no 'openmp': True in the toolchainopts.
problem reproduced in https://gist.github.com/boegel/78853c9fcf666887eaf811ff4c0bc98c:
/user/home/gent/vsc400/vsc40023/eb_phanpyscratch/CO7/sandybridge/software/imkl/2018.3.222-gimpi-2018b/mkl/lib/intel64/libmkl_gnu_thread.so: error: undefined reference to 'GOMP_loop_dynamic_start'
/user/home/gent/vsc400/vsc40023/eb_phanpyscratch/CO7/sandybridge/software/imkl/2018.3.222-gimpi-2018b/mkl/lib/intel64/libmkl_gnu_thread.so: error: undefined reference to 'omp_get_thread_num'
In the light of those errors, compiling with -fopenmp
is correct, so that explains why openmp: True
is used in HPL
easyconfigs using gimkl
toolchain...
I'm not sure if that warrants to use $LIBLAPACK
when openmp
is False
, however...
Well, using LIBLAPACK_MT without -fopenmp is wrong for mkl with GCC. I.e. LIBLAPACK_MT uses mkl_gnu_thread which requires -fopenmp at link time. It happens to work for intel+mkl but if OpenBLAS was built as a shared library it would fail for GCC/intel + OpenBLAS too, since that would then also need -fopenmp for LIBLAPACK/BLAS_MT
@akesandgren So isn't that something to actually fix in framework? I.e. always include -fopenmp
in $LIBLAPACK_MT
when GCC is used with MKL?
Perhaps, but it might be more complicated than that. Haven't given it that much though.
The hpl easyblock incorrectly uses LIBLAPACK_MT without checking that toolchainopt openmp is True.
This makes it fail using gimkl toolchain.