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

Run warnhist on MAPL #2512

Open
mathomp4 opened this issue Dec 21, 2023 · 7 comments
Open

Run warnhist on MAPL #2512

mathomp4 opened this issue Dec 21, 2023 · 7 comments
Assignees
Labels
⌛ Long Term Long term issues ❓ Question Further information is requested

Comments

@mathomp4
Copy link
Member

mathomp4 commented Dec 21, 2023

While following around issues on GitHub I hit this reply by @qkoziol where he mentioned warnhist which is a script the HDF5 Group use.

So, let's try it out on MAPL!

Possible fun:

  1. Does it work with CMake build output or only autotools...or both? (Not sure which one HDF5 is focusing on now.) Do we perhaps need to build differently to move the CMake decorations out of the way?
  2. Do we turn on enough flags for GNU to make this work? The list in that reply is...exciting for sure.
  3. Does it do much for Fortran? HDF5 is, in the end, mostly C.
@mathomp4 mathomp4 added the ❓ Question Further information is requested label Dec 21, 2023
@mathomp4 mathomp4 self-assigned this Dec 21, 2023
@qkoziol
Copy link

qkoziol commented Dec 25, 2023

It does work with CMake and I think it's useful for Fortran also. :-) Try the improved version that I just put up in a PR, which added a "warning density" calculation for builds (i.e. <warnings> / <lines of code>): HDFGroup/hdf5#3910

@mathomp4
Copy link
Member Author

mathomp4 commented Jan 2, 2024

@qkoziol Ooh. New version! I'll give it a try.

Also: do you know if warnhist works with Intel Fortran (Classic) or just GNU? (We also use NAG, but I'm guessing that's rare enough you don't encounter it much.)

@qkoziol
Copy link

qkoziol commented Jan 3, 2024

Cool - the updated version has been merged into the develop branch now, so you could pull it from there if you'd like.

I haven't tested with other Fortran compilers than gfortran. But if it doesn't work, you can post the build output here and I can see how difficult it is to handle them.

@mathomp4
Copy link
Member Author

mathomp4 commented Jan 3, 2024

Cool - the updated version has been merged into the develop branch now, so you could pull it from there if you'd like.

I haven't tested with other Fortran compilers than gfortran. But if it doesn't work, you can post the build output here and I can see how difficult it is to handle them.

@qkoziol I'm attaching a couple logs for you to peruse. First up GNU:

make.GNU.log

and warnhist does seem to do well:

Total unique [non-ignored] warnings: 4
Ignored notes / supplemental warning lines [not counted in unique warnings]: 0
Duplicated warning lines [not counted in unique warnings]: 0
Total ignored warnings: 0
Total unique kinds of warnings: 3
Total files with warnings: 2

# of Warnings by frequency (file count)
=======================================
[ 0]    2 ( 1) - Type mismatch between actual argument at (-) and actual argument at (-) (REAL(-)/INTEGER(-)).
[ 1]    1 ( 1) - Although not referenced, '-'time_fields'' has ambiguous interfaces at (-)
[ 2]    1 ( 1) - Although not referenced, '-'date_fields'' has ambiguous interfaces at (-)

# of Warnings by filename (warning type)
========================================
[  0]    2 ( 1) - /discover/swdev/mathomp4/Models/MAPL-GNU-Debug-Warnhist/MAPL/shared/MAPL_Sort.F90
[  1]    2 ( 2) - /discover/swdev/mathomp4/Models/MAPL-GNU-Debug-Warnhist/MAPL/base/MAPL_ISO8601_DateTime_ESMF.F90

Cool! Though, I will say warnhist -l seemed to do...nothing? I never got any line numbers out. (I also tried warnhist -d because I saw you mention it but that just exploded making me think I have no idea how it works. 😄 )

Next up is Intel:

make.Intel.log

and warnhist is not too happy. Now, one note on this is that this is ifort build output and not ifx so it's possible you don't want to waste any time on this as, well, ifort is EOL. We aren't quite ready for ifx with MAPL yet, but hopefully soon.

One other thing is we do build MAPL with the NAG Fortran compiler as well, so I might try to get you that output as well just so you can take a look at it.

Copy link

stale bot commented Mar 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue.

@stale stale bot added the ❄️ Stale This issue has been marked stale label Mar 4, 2024
@mathomp4
Copy link
Member Author

mathomp4 commented Mar 4, 2024

Whoops. This slipped for me. I need to test and run...

@stale stale bot removed the ❄️ Stale This issue has been marked stale label Mar 4, 2024
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 60 days. If there are no updates within 7 days, it will be closed. You can add the ":hourglass: Long Term" label to prevent the stale action from closing this issue.

@github-actions github-actions bot added the ❄️ Stale This issue has been marked stale label Sep 22, 2024
@mathomp4 mathomp4 added ⌛ Long Term Long term issues and removed ❄️ Stale This issue has been marked stale labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌛ Long Term Long term issues ❓ Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants