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

Add external pio option for ESMF versions greater than 8.4.0 #2923

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mvdebolskiy
Copy link

(created using eb --new-pr)

@mvdebolskiy
Copy link
Author

There have been added an option to have an external pio library with ESMF since 8.4.0, this can be useful for versions of CESM that have pio code that relies on newer ParallelIO versions rather than the one that is being built within ESMF internally.
Since the current block will set ESMF_PIO=internal, even if you have ESMF_PIO=external in config/buildopts etc, make install will look for libpioc.* in the build dir, and the installation will fail.

@mvdebolskiy
Copy link
Author

Used this block for easybuilders/easybuild-easyconfigs#17803.

Comment on lines +130 to +135
if self.cfg['external_pio']:
if LooseVersion(self.version) >= LooseVersion('8.4.0'):
pio = get_software_root('ParallelIO')
if pio:
if LooseVersion(get_software_version('ParallelIO')) >= LooseVersion('2.5.9'):
env.setvar('ESMF_PIO', 'external')
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no real need for an explicit 'external_pio' option here, just change the code to something like

pio = get_software_root('ParallelIO')
if pio:
  if LooseVersion(self.version) >= LooseVersion('8.4.0'):
    check pio version etc
  else:
     msg = "External PIO is not supported for EMSF versions < 8.4.0"
    ...

Copy link
Author

Choose a reason for hiding this comment

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

@akesandgren Oh, ok. I just wanted this to be a bit more explicit than specifying one dependency in the config file. external LAPACK can be done the same way.
Also, quick question: do I understand that env.setvar() is passing these vars as build_opts for CMake?

Copy link
Contributor

Choose a reason for hiding this comment

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

LAPACK is different since it is part of the toolchain (foss/intel) and will always be there, hence there needs to be a way to disable it.

env.setenv just sets an environment variable.
The EMSF easyblock does not (currently) use the CMake building of ESMF, just the plain Makefile

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

4 participants