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

Fix check for inputs in subdirectories #63

Merged
merged 1 commit into from
May 23, 2023

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented May 20, 2023

When you add an input in a subdirectory and the target is also in the subdirectory of another step, polaris was previously incorrectly creating an absolute path to the input relative to the step's workdir, rather than the subdirectory where the symlink exists. This merge fixes that bug.

Checklist

  • Testing comment in the PR documents testing used to verify the changes

closes #61

When you add an input in a subdirectory and the target is also
in the subdirectory of another step, polaris was previously
incorrectly creating an absolute path to the input relative to
the step's workdir, rather than the subdirectory where the
symlink exists.  This merge fixes that bug.
@xylar xylar added bug Something isn't working framework Changes relating to the polaris framework as opposed to individual tests or analysis labels May 20, 2023
@xylar xylar requested review from darincomeau and erinethomas May 20, 2023 02:48
@xylar xylar self-assigned this May 20, 2023
@xylar
Copy link
Collaborator Author

xylar commented May 20, 2023

Testing

I create a new input file in the standard_physics/forward step in the sea-ice single-column test group under development:

        self.add_input_file(
            filename='restarts/restart.2000-02-01_00.00.00.nc',
            target='../../full_run/restarts/restart.2000-02-01_00.00.00.nc')

I then manually created this input file and could show that without this fix, the forward step failed:

OSError: input file(s) missing in step forward of seaice/single_column/standard_physics: ['/home/xylar/data/polaris_0.1/test_20230519/seaice_standard_physics2/seaice/single_column/standard_physics/full_run/restarts/restart.2000-02-01_00.00.00.nc']

but with this fix, the step fails later on due to internal issues with the test case unrelated to this PR.

The pr suite also ran successfully on my Ubuntu laptop with Gnu using this branch.

Copy link
Member

@darincomeau darincomeau left a comment

Choose a reason for hiding this comment

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

This fix worked for me - thanks!

(I swear I approved this earlier today)

@xylar
Copy link
Collaborator Author

xylar commented May 23, 2023

Okay, and since @erinethomas said it worked for her on Friday, I'm going to merge.

@xylar xylar merged commit ba022b9 into E3SM-Project:main May 23, 2023
@xylar xylar deleted the fix-input-output-in-subdirs branch May 24, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working framework Changes relating to the polaris framework as opposed to individual tests or analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating symlinks within a step
2 participants