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

building warnings of ice_shortwave.F90 #3624

Closed
tangq opened this issue Jun 6, 2020 · 4 comments · Fixed by #3656
Closed

building warnings of ice_shortwave.F90 #3624

tangq opened this issue Jun 6, 2020 · 4 comments · Fixed by #3656
Assignees

Comments

@tangq
Copy link
Contributor

tangq commented Jun 6, 2020

When building the master, I happened to notice the warnings below for ice_shortwave.F90. I don't know enough to tell if it will cause issues. Just to report here.

The building log file is at compy:/compyfs/tang338/E3SM_simulations/20200605.tst_TOZ.ne30_oECv3.compy/build/e3sm.bldlog.200605-184810

/qfs/people/tang338/E3SM_code/PSC_T/components/cice/src/source/ice_shortwave.F90(4103): remark #5140: Unrecognized directive
!DIR$ CONCURRENT !Cray
----------------------^
/qfs/people/tang338/E3SM_code/PSC_T/components/cice/src/source/ice_shortwave.F90(4217): remark #5140: Unrecognized directive
!DIR$ CONCURRENT !Cray
----------------------^
/qfs/people/tang338/E3SM_code/PSC_T/components/cice/src/source/ice_shortwave.F90(3682): warning #7532: The number of arguments is incompatible with intrinsic procedure, assume 'external'.   [GAMMA]
      gamma(w,uu,gg,e) = p5*w*((c1 + c3*gg*(c1-w)*uu*uu) &
------^
@rljacob
Copy link
Member

rljacob commented Jun 9, 2020

@amametjanov if these directives are old, please remove them. You can ignore the "gamma" problem (unless you want to work on it).

@singhbalwinder
Copy link
Contributor

I may be completely wrong here but from the error, it looks like the compiler is trying to invoke GAMMA intrinsic function but GAMMA takes just one argument so the compiler says that number of arguments is incompatible (it is still strange as GAMMA is on LHS). We can try changing just the name of the GAMMA array to something else (say GAMMA1 just for testing) to see if it resolves this warning.

@ambrad
Copy link
Member

ambrad commented Jun 9, 2020

The gamma line is a statement function; see, e.g., here: Intel language reference. That's why it appears on the LHS: the line defines the function gamma, which takes four arguments and computes a real. I agree with Balwinder that renaming it should solve the problem.

@singhbalwinder
Copy link
Contributor

I just looked at the code and it is a statement function (as @ambrad mentioned). These functions have to be declared before the computation section begins and a bunch of "statement functions" are declared there in that file. I don't think this warning can cause any harm but changing the name should resolve this issue.
It is generally not a good idea to declare functions with same name as an intrinsic function because then we won't be able to use that intrinsic function within that scope. If somebody is planning to modify this file, I would suggest changing the function name.

AaronDonahue added a commit that referenced this issue Jun 23, 2020
Cleanup compiler warnings

Fixes #3624, #2250
Addresses #2247

[BFB]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants