-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature/aoloso/load balance #1650
Conversation
…cate such exports
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.
Should we change line 87 in MAPL_LoadBalance.F90 from real to real(MAPL_r4). My concern is that if we ever compile MAPL with -r8 flag (probably many other pieces will break too. Fortunately, we never do this), the overload won't work
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.
Definitely a case that screams for templates in the language.
I am not worried about anyone using But a closely related question on which we (I) never really come to a firm conclusion: what is the right/best way to declare such things. We have these choices:
None of these is strictly guaranteed to work with all compilers. (1) is not standard conforming. For (2), compilers can return a value of -1 if they don't support a given precision. (3) may return the same KIND for both precision and therefore make the overload illegal. And (4) the compiler may not have a "companion" C compiler. Since all extant machines are IEEE and have companion compilers, (2-4) are effectively equivalent (assuming smart choices for the args in (3).) @mathomp4 and I have tended towards choosing (2) as it standardizes where the named constants come from rather than each package defining their own (MAPL, ESMF, FMS, ...) ala (3). But (4) has that and in theory is necessary for C interoperability, which is not a high priority. (And in practice is equivalent to (2) anyway.) Ugh. |
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: