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

cice5: improve handling of targets and dependencies for ESM1.6 #179

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

harshula
Copy link
Collaborator

No description provided.

@harshula harshula self-assigned this Dec 10, 2024
@harshula
Copy link
Collaborator Author

Hi @aidanheerdegen & @anton-seaice , Hopefully this PR provides a cleaner foundation for @anton-seaice 's PR #173 .

@harshula
Copy link
Collaborator Author

Testing

==> cice5: Executing phase: 'set_targets'
{24: {'blocks': '24x1', 'driver': 'auscom', 'grid': '360x300'},
 480: {},
 722: {},
 1682: {}}
{24: {'blocks': '24x1', 'driver': 'auscom', 'grid': '360x300'},
 480: {'blocks': '48x40', 'driver': 'auscom', 'grid': '1440x1080'},
 722: {},
 1682: {}}
{24: {'blocks': '24x1', 'driver': 'auscom', 'grid': '360x300'},
 480: {'blocks': '48x40', 'driver': 'auscom', 'grid': '1440x1080'},
 722: {'blocks': '90x90', 'driver': 'auscom', 'grid': '3600x2700'},
 1682: {}}
{24: {'blocks': '24x1', 'driver': 'auscom', 'grid': '360x300'},
 480: {'blocks': '48x40', 'driver': 'auscom', 'grid': '1440x1080'},
 722: {'blocks': '90x90', 'driver': 'auscom', 'grid': '3600x2700'},
 1682: {'blocks': '200x180', 'driver': 'auscom', 'grid': '3600x2700'}}
# ls /opt/release/linux-rocky8-x86_64/intel-2021.2.0/cice5-master-fslldcjzgwdbi37va6s32ljk3atvlt6d/bin/
cice_auscom_1440x1080_48x40_480p.exe	 cice_auscom_3600x2700_90x90_722p.exe
cice_auscom_3600x2700_200x180_1682p.exe  cice_auscom_360x300_24x1_24p.exe

@anton-seaice
Copy link
Contributor

Thanks Harshula

So you plan for another PR to add the access-esm1.6 stuff to spack-build.sh & the access-esm1.6 version to this recipe?

parallelio and libaccessom2 are dependencies only for the accessom2 build, but this PR is still linking/including them for all builds.

@harshula
Copy link
Collaborator Author

Hi @anton-seaice , Once this PR is merged to main, you should then rebase your branch/PR on top of the latest main. Then your changes will be on top of these changes. This PR only supports building ACCESS-OM2. It contains a template of how to support other coupled models.

Copy link
Contributor

@anton-seaice anton-seaice left a comment

Choose a reason for hiding this comment

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

I think these linker/include lines should be updated

istr = join_path((spec["oasis3-mct"].headers).cpp_flags, "psmile.MPI1")
ideps = ["parallelio", "oasis3-mct", "libaccessom2", "netcdf-fortran"]
incs = " ".join([istr] + [(spec[d].headers).cpp_flags for d in ideps])
lstr = self.make_linker_args(spec, "parallelio", "-lpiof -lpioc")
# NOTE: The order of the libraries matter during the linking step!
# NOTE: datetime-fortran is a dependency of libaccessom2.
ldeps = ["oasis3-mct", "libaccessom2", "netcdf-c", "netcdf-fortran", "datetime-fortran"]
libs = " ".join([lstr] + [self.get_linker_args(spec, d) for d in ldeps])

to be consistent with the with when("@:access-esm0,access-esm2:"): added in the class definition for having parallelio and libaccessom2 as dependencies

@harshula harshula force-pushed the development branch 2 times, most recently from d873fb4 to b383086 Compare December 11, 2024 00:54
@harshula
Copy link
Collaborator Author

Hi @anton-seaice , Have a look at the latest commit. Thoughts?

packages/cice5/package.py Outdated Show resolved Hide resolved
packages/cice5/package.py Outdated Show resolved Hide resolved
@anton-seaice
Copy link
Contributor

I think maybe you mixed up libaccessom2 / netcdf-c

@harshula
Copy link
Collaborator Author

harshula commented Dec 11, 2024

Thanks. I should have just kept it simple.

Copy link
Contributor

@anton-seaice anton-seaice left a comment

Choose a reason for hiding this comment

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

I built

ACCESS-NRI/ACCESS-OM2#91

and it ran fine:

ACCESS-NRI/access-om2-configs#152 (comment)

Thanks Harshula :)

@harshula harshula merged commit 6e80b34 into main Dec 12, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✅
Development

Successfully merging this pull request may close these issues.

2 participants