-
Notifications
You must be signed in to change notification settings - Fork 6
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
(SE) A design choice: Using absolute vs. relative paths #340
Comments
Hmm. Well, I suppose it wouldn't be impossible to increase that string's length. I mean, I see the 128 in there, but it's also there in current FMS as well. I could up the length, as long as it doesn't affect work by @climbfuji and @cmgas. I don't think it would... I've already released 2 FMS's this week, so I could do a third! ETA: My guess is this wouldn't affect GEOS proper since our |
As said above, newer versions of fms support longer strings. Maybe we should spend the effort on updating to [email protected] instead of backporting all these bugfixes/updates? |
Well, in this case, even the latest FMS might have issues from my reading of the code. From their main: character(len=128) :: filename
...
filename='input_'//trim(pelist_name)//'.nml'
inquire(FILE=filename, EXIST=file_exist)
if (.not. file_exist ) then
if (present(alt_input_nml_path)) then
filename = alt_input_nml_path
else
filename = 'input.nml'
end if
endif To my reading, if the |
Wow. In NOAA-GFDL/FMS#1003 we changed the restart length to 256, but apparently there are more of these 128 character limits! |
If you are increasing lengths, I recommend 1024 (aka ESMF_MAXPATHLEN). In MAPL/GEOS, we found in some cases that 256 wasn't enough. Deeeeeeeep paths. :) |
Well, now this issue is impacting current SWELL Tier 1 tests. Because Tier1 test folders on Wonder if the latest FMS 2023.04 update in JEDI would resolve this issue? Edit: Looks like FMS 2022.03 has a path length update with |
I have a draft PR in our I will try one of these |
I think I figured it out, fv3-jedi is build, I will update the draft PR. |
Update, I tested our CI workflow with a recent build that uses FMS version 2023.04 and the path length issue unfortunately persists. We have an open issue on FMS but even if they make changes that would be in a future version. So the options are:
|
Could you "workaround" with symlinks say? Refer to files local to where something is running but all that is is a symlink to a file somewhere else? Though I suppose even that wouldn't work if the symlink itself is more than 128 chars long... |
You are right @mathomp4. Option 3 is to change these following key/value pairs taht are used by FMS to local cycle directory: swell/src/swell/configuration/jedi/interfaces/geos_atmosphere/model/geometry.yaml Lines 2 to 3 in 0ea42f6
Similar to how we handle swell/src/swell/configuration/jedi/interfaces/geos_ocean/model/geometry.yaml Lines 1 to 2 in 0ea42f6
|
I like the the idea of symbolic links. My suggestion might be to combine symbolic links, relative file paths, and the For linking to static files, a possible solution is to cleverly manipulate relevant environment variables (e.g., |
More updates on this:
Ok, figured out how to use relative paths, see below PR. |
While trying to run tier1 tests with the
3dvar_atmos
suite, I received the following error:I noticed the length of the missing path is 128 characters and that is likely the culprit. I've had this issue with
SOCA
(MOM6) as well, it's a limitation of thefms
handling .nml files. After talking to @rtodling he mentioned some newerfms
versions do support 256/512 characters, however there is some discrepancy between JCSDA and GEOS versions in terms offms
, perhaps ours is newer, @mathomp4?While designing the Swell tasks, the idea was to be able to execute them from any location, hence we started using absolute paths. However, it's also possible to just use
os.chdir
command inside the scripts to ensure we are in the proper directory instead of using absolute paths (similar to how it's done in slurm *.sh scripts).I'm not sure if there are any reasons to avoid relative paths but I'm happy to hear any opposing thoughts?
The text was updated successfully, but these errors were encountered: