Skip to content
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

Merged
merged 2 commits into from Dec 26, 2019

Conversation

boegel
Copy link
Member

@boegel boegel commented Dec 14, 2019

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 involving None.

The problem was that $LIBLAPACK_MT was not defined in the environment, but the ESMF easyblock was using the value obtained via os.getenv('LIBLAPACK_MT') (which yields None if $LIBLAPACK_MT is not defined) without checking it...

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)
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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')

Copy link
Contributor

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.

Copy link
Member

@migueldiascosta migueldiascosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@migueldiascosta
Copy link
Member

Going in, thanks @boegel!

@migueldiascosta migueldiascosta merged commit d5539af into easybuilders:develop Dec 26, 2019
@boegel boegel deleted the ESMF_lapack_check branch December 26, 2019 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants