-
Notifications
You must be signed in to change notification settings - Fork 163
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
inline post restart issue with gnu compiler #321
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,11 +160,13 @@ subroutine post_run_regional(wrt_int_state,mypei,mpicomp,lead_write, & | |
if(mype==0) print *,'af read_xml at fh00,name=',trim(filenameflat) | ||
else if(ifhr > 0) then | ||
filenameflat = 'postxconfig-NT.txt' | ||
if(size(paramset)>0) then | ||
if(associated(paramset) .and. size(paramset)>0) then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How? If There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it would be best to make the same changes as in lines 161-162, 165-166. |
||
do i=1,size(paramset) | ||
if (size(paramset(i)%param)>0) then | ||
deallocate(paramset(i)%param) | ||
nullify(paramset(i)%param) | ||
if (associated(paramset(i)%param)) then | ||
if (size(paramset(i)%param)>0) then | ||
deallocate(paramset(i)%param) | ||
nullify(paramset(i)%param) | ||
endif | ||
endif | ||
enddo | ||
deallocate(paramset) | ||
|
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.
The Fortran compiler specifications do not state that the tests in an if clause will be executed ini the order written. You need to do the following to be fully compliant:
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.
Actually the size(paramset) is 1 but associated(paramset) is false with gnu compiler.