-
Notifications
You must be signed in to change notification settings - Fork 360
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
Cleanup compiler warnings #3656
Conversation
#ifdef CPRCRAY | ||
!DIR$ CONCURRENT | ||
#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.
Cray compiler directive that may be needed when porting and optimizing to Cray. CPRCRAY
macro cleans up Intel compiler messages like
/qfs/people/mame117/repos/E3SM-tests/components/cam/src/physics/cam/check_energy.F90(593): remark #5140: Unrecognized directive
!DIR$ CONCURRENT
----------------^
real(r8) heavy, heavym, a1, a2, heavyp, heavymp | ||
heavy(a1,a2) = max(0._r8,sign(1._r8,a1-a2)) ! heavyside function | ||
heavym(a1,a2) = max(0.01_r8,sign(1._r8,a1-a2)) ! modified heavyside function | ||
real(r8) a1, a2, heavyp, heavymp | ||
!real(r8) heavy, heavym | ||
!heavy(a1,a2) = max(0._r8,sign(1._r8,a1-a2)) ! heavyside function | ||
!heavym(a1,a2) = max(0.01_r8,sign(1._r8,a1-a2)) ! modified heavyside function | ||
! | ||
! New heavyside functions to perhaps address error growth problems | ||
! | ||
#ifdef PERGRO | ||
heavyp(a1,a2) = a1/(a2+a1+1.e-36_r8) | ||
#endif | ||
heavymp(a1,a2) = (a1+0.01_r8*a2)/(a2+a1+1.e-36_r8) |
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.
Avoid
/qfs/people/mame117/repos/E3SM-tests/components/cam/src/physics/cam/cldwat.F90(1020): remark #7713: This statement function has not been used. [HEAVY]
real(r8) heavy, heavym, a1, a2, heavyp, heavymp
------------^
/qfs/people/mame117/repos/E3SM-tests/components/cam/src/physics/cam/cldwat.F90(1020): remark #7713: This statement function has not been used. [HEAVYM]
real(r8) heavy, heavym, a1, a2, heavyp, heavymp
-------------------^
/qfs/people/mame117/repos/E3SM-tests/components/cam/src/physics/cam/cldwat.F90(1020): remark #7713: This statement function has not been used. [HEAVYP]
real(r8) heavy, heavym, a1, a2, heavyp, heavymp
-----------------------------------^
#else | ||
sendsz = 0 | ||
recvsz = 0 |
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.
/qfs/people/mame117/repos/E3SM-tests/components/homme/src/share/compose_mod.F90(334): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [SENDSZ]
subroutine compose_query_bufsz(sendsz, recvsz)
---------------------------------^
/qfs/people/mame117/repos/E3SM-tests/components/homme/src/share/compose_mod.F90(334): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [RECVSZ]
subroutine compose_query_bufsz(sendsz, recvsz)
-----------------------------------------^
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.
I haven't looked at the code to know how these variables are being used. It is probably okay but @ambrad or @oksanaguba might know if it is okay to assign these to zero.
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.
Yes, these lines are fine. The subroutine isn't even called in this branch, but it's good to take care of compiler warnings. Thanks! (And thanks for tagging me @singhbalwinder.)
call endrun('nudging_init error: nudge method should & | ||
be either Step, Linear or IMT...') | ||
call endrun('nudging_init error: nudge method should be either Step, Linear or IMT...') |
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.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/cam/src/physics/cam/nudging.F90", line 1181.1: 1515-021 (E) Syntax error: Token " & " is expected.
else where | ||
elsewhere |
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.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/cam/src/physics/clubb/advance_clubb_core_module.F90", line 1615.16: 1511-077 (E) ELSEWHERE statement is in error. ELSEWHERE statement is assumed.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/cam/src/physics/clubb/advance_clubb_core_module.F90", line 1637.16: 1511-077 (E) ELSEWHERE statement is in error. ELSEWHERE statement is assumed.
character(len=32) :: subname = 'clmfates_interface::ReadParameters' | ||
character(len=40) :: subname = 'clmfates_interface::ReadParameters' |
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.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/main/clmfates_paraminterfaceMod.F90", line 191.26: 1514-038 (W) The literal string has length 34 which is longer than 32, the length of the variable being initialized. The string will be truncated.
#endif ! #ifdef USE_PETSC_LIB | ||
#endif | ||
!^ifdef USE_PETSC_LIB |
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.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/main/initGridCellsMod.F90", line 1181.8: 1506-234 (W) Expecting a new-line character on #endif directive.
A related PR in FATES submodule: NGEET/fates#666 |
IF (IYYY.EQ.0) PAUSE 'There is no Year Zero.' | ||
IF (IYYY.EQ.0) THEN | ||
call endrun('There is no Year Zero.') | ||
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.
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cam/src/chemistry/mozart/wei96.F90:929:51:
IF (IYYY.EQ.0) PAUSE 'There is no Year Zero.'
1
Warning: Deleted feature: PAUSE statement at (1)
integer (int_kind), dimension(:), allocatable, save :: & | ||
integer (int_kind), dimension(:), allocatable :: & | ||
sndRequest, &! MPI request ids | ||
rcvRequest ! MPI request ids |
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.
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/mpi/ice_boundary.F90:2958:22:
bufSend, bufRecv ! 3d send,recv buffers
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/mpi/ice_boundary.F90:2958:13:
bufSend, bufRecv ! 3d send,recv buffers
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/mpi/ice_boundary.F90:2961:16:
bufTripole ! 3d tripole buffer
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/mpi/ice_boundary.F90:2930:16:
rcvRequest ! MPI request ids
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/mpi/ice_boundary.F90:2929:16:
sndRequest, &! MPI request ids
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
! 3 hbl------depth---------------------------------(m) \\ | ||
! 3 hbl------depth---------------------------------(m) \\ | ||
! 4 u--------surface u current---------------------(m/s) \\ | ||
! 5 v--------surface v current---------------------(m/s) \\ | ||
! 6 dhdx-----surface tilt x direction--------------(m/m) \\ | ||
! 7 dhdy-----surface tilt y direction--------------(m/m) \\ | ||
! 8 qdp------ocean sub-mixed layer heat flux-------(W/m2)\\ | ||
! 8 qdp------ocean sub-mixed layer heat flux-------(W/m2)\\ |
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.
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/source/ice_forcing.F90:3251:60:
! 3 hbl------depth---------------------------------(m) \\
Warning: backslash and newline separated by space
/lcrc/group/acme/azamat/repos/E3SM-tests/components/cice/src/source/ice_forcing.F90:3256:60:
! 8 qdp------ocean sub-mixed layer heat flux-------(W/m2)\\
Warning: backslash and newline separated by space
logical,save :: first_time = .true. | ||
|
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.
/lcrc/group/acme/azamat/repos/E3SM-tests/components/clm/src/biogeophys/WaterBudgetMod.F90:108:28:
logical,save :: first_time = .true.
1
Warning: Legacy Extension: Duplicate SAVE attribute specified at (1)
This var isn't used anywhere.
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 @amametjanov for working on this. This will take care of a lot of warnings.
#else | ||
sendsz = 0 | ||
recvsz = 0 |
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.
I haven't looked at the code to know how these variables are being used. It is probably okay but @ambrad or @oksanaguba might know if it is okay to assign these to zero.
Do we know if the CRAY specific directives are still useful? If not, we can simply remove them. |
Someone identified these loops for optimization and these will be good starting points when optimizing for newer Cray compiler versions. |
It looks like this PR is ready to go, I'm going to start the integration process. |
Cleanup compiler warnings
Fixes #3624, #2250
Addresses #2247
[BFB]