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

G2 lib with GNU compiler fix #476

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions var/spack/repos/builtin/packages/g2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ def cmake_args(self):

return args

# GNU compiler is complaining if not using -fno-range-check argument
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it safe to apply this to newer gfortran versions, too? I know we need it for 9.2.0 (hera, jet) and 9.4.0 (containers), but I am not sure it's needed for gfortran-10+

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it safe to apply this to newer gfortran versions, too? I know we need it for 9.2.0 (hera, jet) and 9.4.0 (containers), but I am not sure it's needed for gfortran-10+

Right, I don't know if this will affect any other machine as well. But actually, this argument is benign, it should work for any machine/compiler version. Unless we see the problem, I'd leave it as is.

def flag_handler(self, name, flags):
if name == "fflags" and self.compiler.fc.endswith("gfortran"):
flags.append("-fno-range-check")
return (None, None, flags)

def setup_run_environment(self, env):
precisions = (
self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d")
Expand Down
Loading