make sure $LIBLAPACK_MT is set before using it in ESMF easyblock#1887
make sure $LIBLAPACK_MT is set before using it in ESMF easyblock#1887migueldiascosta merged 2 commits intoeasybuilders:developfrom
Conversation
| ldflags = os.getenv('LDFLAGS') | ||
| liblapack_mt = os.getenv('LIBLAPACK_MT') | ||
| if liblapack_mt is None: | ||
| raise EasyBuildError("$LIBLAPACK_MT not defined, no BLAS/LAPACK in %s toolchain?", self.toolchain.name) |
There was a problem hiding this comment.
This is technically wrong.
If LIBLAPACK_MT is not defined it should just use LIBLAPACK
I.e., if the easyconfig didn't set openmp: True use LIBLAPACK, if it did use openmp: True use LIB LAPACK_MT
There was a problem hiding this comment.
The ESMF easyconfig doesn't set openmp at all, see https://github.com/easybuilders/easybuild-easyconfigs/pull/9513/files .
Related discussion: easybuilders/easybuild-framework#2350
There was a problem hiding this comment.
Ah, I'd forgotten about that thread.
There was a problem hiding this comment.
@akesandgren How about if I use this instead:
liblapack = os.getenv('LIBLAPACK_MT') or os.getenv('LIBLAPACK')There was a problem hiding this comment.
Yeah, that makes sense. Although I still think we should get something in the way of 2350 in place.
|
Going in, thanks @boegel! |
When looking into a new easyconfig for the latest version of ESMF, I tried installing it with the
iimpitoolchain which led to a confusing compilation problem involvingNone.The problem was that
$LIBLAPACK_MTwas not defined in the environment, but the ESMF easyblock was using the value obtained viaos.getenv('LIBLAPACK_MT')(which yieldsNoneif$LIBLAPACK_MTis not defined) without checking it...