-
Notifications
You must be signed in to change notification settings - Fork 13
Reduce warnings & Initialise MPI with MPI_Init_thread #47
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
Open
AlexBuccheri
wants to merge
5
commits into
fortuno-repos:main
Choose a base branch
from
AlexBuccheri:reduce_warnings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7232061
Add explicit allocation of match such that Wuninitialized does not un…
AlexBuccheri 9ba1069
Explicitly allocate yvals, removing compiler warning
AlexBuccheri 771530a
Explicitly allocate from source, removing compiler warning
AlexBuccheri dd40534
Close character string per line, removing compiler warning
AlexBuccheri a8f74c1
Remove suiteresults arg from log_summary_, as it was unused.
AlexBuccheri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,19 +170,19 @@ function default_argument_defs() result(argdefs) | |
| ! & helpmsg="show list of tests to run and exit"),& | ||
| ! & & | ||
| ! & argument_def("tests", argtypes%stringlist,& | ||
| ! & helpmsg="list of tests and suites to include or to exclude when prefixed with '~' (e.g.& | ||
| ! & 'somesuite ~somesuite/avoidedtest' would run all tests except 'avoidedtest' in the test& | ||
| ! & suite 'somesuite')")& | ||
| ! & helpmsg="list of tests and suites to include or to exclude when prefixed with '~' (e.g. " //& | ||
| ! & "'somesuite ~somesuite/avoidedtest' would run all tests except 'avoidedtest' in the test " //& | ||
| ! & "suite 'somesuite')")& | ||
| ! & & | ||
| ! & ] | ||
| ! -}{+ | ||
| allocate(argdefs(2)) | ||
| argdefs(1) = argument_def("list", argtypes%bool, shortopt="l", longopt="list",& | ||
| & helpmsg="show list of tests to run and exit") | ||
| argdefs(2) = argument_def("tests", argtypes%stringlist,& | ||
| & helpmsg="list of tests and suites to include or to exclude when prefixed with '~' (e.g.& | ||
| & 'somesuite ~somesuite/avoidedtest' would run all tests except 'avoidedtest' in the test& | ||
| & suite 'somesuite')") | ||
| & helpmsg="list of tests and suites to include or to exclude when prefixed with '~' (e.g. " // & | ||
| & "'somesuite ~somesuite/avoidedtest' would run all tests except 'avoidedtest' in the test " // & | ||
| & "suite 'somesuite')") | ||
|
Comment on lines
+183
to
+185
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment just above. Let's keep the original form, unless there is a really convincing argument for the change. |
||
| ! +} | ||
|
|
||
| end function default_argument_defs | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Why should we use sting addition, if Fortran has a perfect feature of breaking strings into continuation lines? I don't see the point for this change...
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.
I agree it makes no sense, but GCC with warnings enabled will catch what you currently have. Unlike most of the warning fixes, which affect fortuno's test cases (we don't build by default), this one gets caught by Octopus's CI.
So the point is either client codes are forced into disabling specific warnings or one does a trivial patch upstream. Alternatively, we discussed scoping compiler flags on a per library basis some time ago, but since Cristian's left, this is a non-starter.
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.
I have checked gfortran 15.2:
which does not produce any warnings in
cmdapp.f90. Do you use any other flags, which trigger this warning? Or does the warning appear in your case with the most recent gfortran? (In case, they fixed it in recent gfortran versions, I would probably tend to keep the original formulation. I kind consider Fortuno also as a demonstration of best practices when programming in modern Fortran.)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.
OK, I also checked GFortran 13.2 now and I do not get any warnings for
cmdapp.f90with the-std=f2018 -Wall -pedanticflag combination. Do you use an older compiler (which could cause other troubles due to compiler bugs) or a different warning level setting?