-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improve robustness of cam open/close file register code to fix issues with history output #333
Conversation
… with History output
Notes on the fixes in Updated pool reuse logicWas allocate(open_files_pool%next)
open_files_pool%next => open_files_pool There appears to be a circular reference as a result. I reversed the direction to be open_files_pool => open_files_pool%next so that the pool now points to the next (or null) pool entry Updated insert to linked list logicWas open_files_tail => of_new
if (.not. associated(open_files_head)) then
open_files_head => of_new
end if This could be a problem if the list has more than 2 entries and a new node C is inserted
The updated logic should be more robust (the tail assignment line is repeated intentionally for clarity): ! Add the registered file to the tail of the open files list
if(associated(open_files_tail)) then
open_files_tail%next => of_new
open_files_tail => of_new
else
open_files_head => of_new
open_files_tail => of_new
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for fixing these, @jimmielin - it's clear that past me had a very tenuous grasp of those pointers!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these bug fixes @jimmielin!
Regression tests passed subject to pre-existing failures, merging in
|
Tag name (required for release branches):
Originator(s): @jimmielin
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
max_mdims
used before defined)of%file_desc
incam_register_open_file
leading to crash with >2 history files)Describe any changes made to build system: N/A
Describe any changes made to the namelist: N/A
List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A
List all files eliminated and why: N/A
List all files added and what they do: N/A
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>
)If there are new failures (compared to the
test/existing-test-failures.txt
file),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
derecho/intel/aux_sima:
derecho/gnu/aux_sima:
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: