Skip to content

Commit

Permalink
Merge pull request #326 from climbfuji/bugfix/esmf_clang_openmp
Browse files Browse the repository at this point in the history
release/1.5.0: bug fix for ESMF: turn off OpenMP for both clang and apple-clang
  • Loading branch information
climbfuji authored Sep 20, 2023
2 parents 610a6c4 + e44027b commit c6dce6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/esmf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ def setup_build_environment(self, env):
elif self.compiler.name == "intel" or self.compiler.name == "oneapi":
env.set("ESMF_COMPILER", "intel")
elif self.compiler.name in ["clang", "apple-clang"]:
# Turn off OpenMP with both versions of clang compilers
# to avoid having to add clang OpenMP libraries to the
# Fortran linker command.
env.set("ESMF_OPENMP", "OFF")
#
env.set("ESMF_COMPILER", "gfortranclang")
with self.compiler.compiler_environment():
gfortran_major_version = int(
Expand Down

0 comments on commit c6dce6a

Please sign in to comment.