-
Notifications
You must be signed in to change notification settings - Fork 145
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
Correct way to set compiler flags #193
Comments
In general addressed by https://github.com/NCAR/NEMSfv3gfs/pull/113. |
hannahcbarnes
pushed a commit
to hannahcbarnes/ccpp-physics
that referenced
this issue
Aug 3, 2022
* New metadata for GP scheme. * Removed redundant importing of kind_phys * add units to index_for_diagnostic_printout metadata * Bugfix in GP sampling routines.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the cmake build system uses CMAKE_Fortran_FLAGS as default compiler options for all CAPS and SCHEMES. These options are added to the compiler options for individual files, because of the definition
Because of this, forcing certain compiler options (or removing them) for individual files does not work.
Example: in order to compile gfdl_fv_sat_adj.F90 with default real kind 4 with the GNU compilers, it is necessary to remove the "-fdefault-real-8" compiler option, which the current system doesn't allow. For Intel, this problem is overcome by adding "-real-size 32" to the compiler options for this file. When the compiler options are combined, "-real-size 32" ends up after "-real-size 64" and as such overwrites "-real-size 64". For the PGI compiler, this has not been tested yet.
The correct way to do this would be to specify default compiler options for all CAPS and SCHEMES before adjustments are made for individual files, and remove COMPILE_FLAGS and LINK_FLAGS fro the above code snippet.
The text was updated successfully, but these errors were encountered: