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

w3adc: Update to allow multiple switches on single line #3

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

ukmo-ccbunney
Copy link

There are several cases in the WW3 code base where it would be advantageous for the pre-processor (w3adc) to allow multiple switches on one line. I.e. to only include a line of code if all switches for that line are specified in the switch file.

This change updates w3adc.f to handle multiple switches on a single line both in the include files (if any) and the primary source file.

Each switch should start with the usual !/ and be chained together with no spaces between, or optionally an extra /, e.g. the following lines are equivalent and will only be activated if both the OMPH and T1 switches are set in the switch file:

    !/OMPH!/T1     <some code>
    !/OMPH/!/T1/   <some code>

The switch section is assumed to be complete when no more !/ characters can be read (or !/ is followed by a space).

Any amount of switches can be added to a line (up to the maximum line length of 143 characters defined in w3adc).

@ukmo-ccbunney
Copy link
Author

Regression matrix test results will follow shortly.

Copy link
Owner

@ajhenrique ajhenrique left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes proposed were discussed in a separate cover. They will be merged to the BF_omp_b4b branch and tested as part of the changes proposed in that branch, becoming part of the PR made to NOAA-EMC/WW3 repo and its review process. In this context, I will rerun selected OMP and MPI+OMP hybrid regression tests to verify changes proposed presently.

@ajhenrique ajhenrique merged commit d4dc8c6 into ajhenrique:BF_omp_b4b Feb 4, 2020
@ukmo-ccbunney
Copy link
Author

For completeness here are the results of regtest matrix. Everything identical except the usual mww3_test_03 culprits.

matrixCompSummary.zip

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

Successfully merging this pull request may close these issues.

2 participants