diff --git a/.github/build-ci/manifests/oasis3-mct/gcc.spack.yaml.j2 b/.github/build-ci/manifests/oasis3-mct/gcc.spack.yaml.j2 new file mode 100644 index 00000000..9dea3370 --- /dev/null +++ b/.github/build-ci/manifests/oasis3-mct/gcc.spack.yaml.j2 @@ -0,0 +1,14 @@ +spack: + specs: + # package is defined in the workflows inputs.spack-manifest-data-pairs + # And the gcc_compilers are defined in the standard_definitions.json data file + # Test default (stable) and 5.2 (latest) + - '{{ package }} %{{ gcc_compiler }}' + - '{{ package }}@5.2 %{{ gcc_compiler }}' + packages: + all: + require: + - '%{{ gcc_compiler }} target={{ target }}' + concretizer: + unify: false + view: false diff --git a/.github/build-ci/manifests/oasis3-mct/intel.spack.yaml.j2 b/.github/build-ci/manifests/oasis3-mct/intel.spack.yaml.j2 new file mode 100644 index 00000000..343edbf2 --- /dev/null +++ b/.github/build-ci/manifests/oasis3-mct/intel.spack.yaml.j2 @@ -0,0 +1,13 @@ +spack: + specs: + # package is defined in the workflows inputs.spack-manifest-data-pairs + # And the intel_compilers are defined in the standard_definitions.json data file + - '{{ package }} %{{ intel_compiler }}' + - '{{ package }}@5.2 %{{ intel_compiler }}' + packages: + all: + require: + - '%{{ intel_compiler }} target={{ target }}' + concretizer: + unify: false + view: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0af707c..b6c7f453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,5 +143,6 @@ jobs: spack-packages-ref: ${{ needs.setup-ci.outputs.spack-packages-ref }} spack-config-ref: ${{ needs.setup-ci.outputs.spack-config-ref }} spack-ref: ${{ needs.setup-ci.outputs.spack-ref }} + allow-ssh-into-spack-install: false secrets: spack-install-command-pat: ${{ secrets.SPACK_INSTALL_COMMAND_PAT }} diff --git a/packages/oasis3-mct/package.py b/packages/oasis3-mct/package.py index 84f4f885..4fe288e8 100644 --- a/packages/oasis3-mct/package.py +++ b/packages/oasis3-mct/package.py @@ -18,16 +18,12 @@ class Oasis3Mct(MakefilePackage): maintainers("harshula", "penguian") version("stable", branch="master", preferred=True) + version("5.2", tag="5.2", commit="fadc2145cfbd89261aa418e8dd4f754ba273735e") version( "upstream", branch="OASIS3-MCT_5.0", git="https://gitlab.com/cerfacs/oasis3-mct.git", ) - version( - "OASIS3-MCT_5.2", - tag="OASIS3-MCT_5.2", - git="https://gitlab.com/cerfacs/oasis3-mct.git", - ) # TODO: Remove the "access-om2" once it is no longer being used anywhere version("access-om2", branch="master") version("access-esm1.5", branch="access-esm1.5") @@ -64,7 +60,7 @@ class Oasis3Mct(MakefilePackage): # TODO: Remove this function when it is no longer required def url_for_version(self, version): - if self.spec.satisfies("@upstream,OASIS3-MCT_5.2"): + if self.spec.satisfies("@upstream"): raise ValueError("url_for_version() called for version @upstream") return "https://github.com/ACCESS-NRI/oasis3-mct/tarball/{0}".format(version) @@ -72,7 +68,7 @@ def url_for_version(self, version): def __create_pkgconfig(self, spec, prefix): oasis_version = "2.0" - if self.spec.satisfies("@upstream,OASIS3-MCT_5.2"): + if self.spec.satisfies("@upstream,5:"): oasis_version = "5" mkdirp(self.__pkgdir) @@ -148,7 +144,8 @@ def edit(self, spec, prefix): config["gcc"] = """ # Compiling and other commands MAKE = make -F90 = mpif90 -Wall -fallow-argument-mismatch +# Consider adding following flags if breaks for gfortran > v10: -fdefault-real-8 -fdefault-double-8 +F90 = mpif90 -Wall -fallow-argument-mismatch -ffree-line-length-0 CC = gcc LD = mpif90 MCT_FCFLAGS =