Skip to content

ESMF should use Spack wrappers directly#35749

Merged
alalazo merged 1 commit intospack:developfrom
vanderwb:esmf-serial-comps
Mar 8, 2023
Merged

ESMF should use Spack wrappers directly#35749
alalazo merged 1 commit intospack:developfrom
vanderwb:esmf-serial-comps

Conversation

@vanderwb
Copy link
Copy Markdown
Contributor

@vanderwb vanderwb commented Mar 1, 2023

When building [email protected]~mpi using develop, I get the following error:

==> Error: TypeError: 'EnvironmentModifications' object is not subscriptable

/glade/gust/scratch/vanderwb/spack-tests/gust/23.03b/spack/var/spack/repos/builtin/packages/esmf/package.py:202, in setup_build_environment:
        199            env.set("ESMF_CXX", spec["mpi"].mpicxx)
        200            env.set("ESMF_F90", spec["mpi"].mpifc)
        201        else:
  >>    202            env.set("ESMF_CXX", env["CXX"])
        203            env.set("ESMF_F90", env["FC"])
        204
        205        # This environment variable controls the build option.

In this PR, I propose fixing this error and simplifying the logic by assigning ESMF_CXX and ESMF_F90 to the Spack compiler wrappers directly using the variables spack_cxx and spack_fc.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor

AlexanderRichert-NOAA commented Mar 1, 2023

I'd like to test this out today and report back by tomorrow morning. Thanks

Copy link
Copy Markdown
Contributor

@AlexanderRichert-NOAA AlexanderRichert-NOAA left a comment

Choose a reason for hiding this comment

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

Looks good, thanks

Copy link
Copy Markdown
Contributor

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

Makes sense to me, sorry for the wait

@alalazo alalazo merged commit cbd0770 into spack:develop Mar 8, 2023
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
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.

5 participants