New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 #1887
Conversation
easybuild/easyblocks/e/esmf.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I'd forgotten about that thread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akesandgren How about if I use this instead:
liblapack = os.getenv('LIBLAPACK_MT') or os.getenv('LIBLAPACK')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense. Although I still think we should get something in the way of 2350 in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Going in, thanks @boegel! |
When looking into a new easyconfig for the latest version of ESMF, I tried installing it with the
iimpi
toolchain which led to a confusing compilation problem involvingNone
.The problem was that
$LIBLAPACK_MT
was not defined in the environment, but the ESMF easyblock was using the value obtained viaos.getenv('LIBLAPACK_MT')
(which yieldsNone
if$LIBLAPACK_MT
is not defined) without checking it...