Simplify supported include.mk files (and system-dependent options). #422
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is a follow-up of @mdietze comment in #410, which I agreed. We had too many tracked include.mk files, and most of them have gone stale. So instead of having a lot of files on GitHub, I kept a few as examples on how to configure these files when using Intel, GNU and PGI compilers, plus one for a MacOS system.
This PR also simplifies many of the preprocessor code in ED2, to be consistent with the current options. In this refactoring, I took two variables that were inconsistently defined in the include.mk files and formalised them a bit:
CMACHnow defines the operating system, it currently takes the following options:LINUXFor Linux systemsMACOSFor MacOS systemsFC_TYPEnow defines the family of compilers used. It currently takes the following options:INTELFor ifx/icx (or ifort/icc in older systems)GNUFor gfortran/gccPGIFor pgfortran/pgcc.And now the Makefile checks for the values and should graciously fail if the value is not one of the above. My main motivation for this was that CMACH was a mix of OS and compiler, and that was just propagating lots of preprocessor if statements in the code. For most cases, the test is either compiler-dependent or OS-dependent, so it makes sense to have two variables handling these.
Notes.
CRAY,HP,IBM,SUNHPCand a few others) because they were not consistently used and they may have been code legacy that came with BRAMS. I may have removed more than what I should, but happy to add back systems if there is such need.Collaborators
Initial idea from @mdietze
Types of changes
Changes in Settings, Input Files or Output Files
Most users will need to revise their include.mk files. I updated .gitignore so it will not track any other include.mk besides the ones in this PR, but people should feel free to create their own.
Expectation of Answer Changes:
Checklist:
Testing :