Skip to content

make sure $LIBLAPACK_MT is set before using it in ESMF easyblock#1887

Merged
migueldiascosta merged 2 commits intoeasybuilders:developfrom
boegel:ESMF_lapack_check
Dec 26, 2019
Merged

make sure $LIBLAPACK_MT is set before using it in ESMF easyblock#1887
migueldiascosta merged 2 commits intoeasybuilders:developfrom
boegel:ESMF_lapack_check

Conversation

@boegel
Copy link
Copy Markdown
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...

Comment thread 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)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@boegel boegel dismissed akesandgren’s stale review December 24, 2019 15:23

suggested change done

Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants