openloops: Fix configuration of cmodel setting for gfortran (#48288)

* openloops: Add cmodel to user config file to override setting added in 2.1.2.

* openloops: Change cmodel from small to large following author recommendation.
This commit is contained in:
Karol Krizka 2024-12-26 15:44:08 +01:00 committed by GitHub
parent 16d3de4540
commit a14f10e882
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -274,12 +274,16 @@ def configure(self, spec, prefix):
f.write("fortran_compiler = {0}\n".format(env["SPACK_FC"]))
if self.spec.satisfies("@1.3.1") and not is_intel:
f.write("gfortran_f_flags = -ffree-line-length-none\n")
if self.spec.satisfies("@2.1.1:") and not is_intel:
if self.spec.satisfies("@2.1.1") and not is_intel:
f.write("gfortran_f_flags = -ffree-line-length-none " + "-fdollar-ok ")
if self.spec.target.family == "aarch64":
f.write("-mcmodel=small\n")
f.write("-mcmodel=large\n")
else:
f.write("-mcmodel=medium\n")
if self.spec.satisfies("@2.1.2:") and not is_intel:
f.write("gfortran_f_flags = -ffree-line-length-none " + "-fdollar-ok\n")
if self.spec.target.family == "aarch64":
f.write("cmodel = large\n")
if self.spec.satisfies("@:1 processes=lcg.coll"):
copy(join_path(os.path.dirname(__file__), "sft1.coll"), "lcg.coll")