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

Avoid false positive warnings turned into an error #791

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

hfp
Copy link
Member

@hfp hfp commented May 14, 2024

@alazzaro
Copy link
Member

Since you are here, could you also add my other comment #783 (comment) ?

@hfp
Copy link
Member Author

hfp commented May 14, 2024

Since you are here, could you also add my other comment #783 (comment) ?

Thank you, Alfio! Will do. The comment did not arrive on my end yet because of the GitHub user name (hpf). Ahh, High Performance Fortran for sure ;-)

@alazzaro
Copy link
Member

Since you are here, could you also add my other comment #783 (comment) ?

Thank you, Alfio! Will do. The comment did not arrive on my end yet because of the GitHub user name (hpf). Ahh, High Performance Fortran for sure ;-)

Oh dear... sorry for that... I will try to fix the macos error too (seems now we have gcc v13).

@hfp hfp force-pushed the upstream branch 2 times, most recently from 876c7f1 to 7b5a4d5 Compare May 14, 2024 14:01
@hfp
Copy link
Member Author

hfp commented May 14, 2024

GCC/latest test is now passing.

@hfp hfp force-pushed the upstream branch 2 times, most recently from 4f331b0 to f2c634b Compare May 14, 2024 14:57
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # requires for 10+ for the MPI wrap module
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # required for 10+ (MPI wrap)
endif ()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # comparison against CXX version rather than GFortran version
Copy link
Member

Choose a reason for hiding this comment

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

It seems we have to extend the condition to cover both cases, i.e.:

if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # false positive (allocatable array)
  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Werror=uninitialized")
  else ()
  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wno-error=uninitialized")
endif ()

Then, the warning seems real, due to #694 (likely the new GCC is more pedantic).

@alazzaro
Copy link
Member

In the meantime, I've merged #792 to fix ROCm and macOS CI tests

@hfp hfp merged commit 9e9f718 into cp2k:develop May 14, 2024
22 of 23 checks passed
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