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

Suppress WARNING messages when building GCHP #322

Open
1 task done
msulprizio opened this issue Jun 14, 2023 · 12 comments
Open
1 task done

Suppress WARNING messages when building GCHP #322

msulprizio opened this issue Jun 14, 2023 · 12 comments
Labels
category: Feature Request New feature or request never stale Never label this issue as stale topic: Build Related to makefiles or the build sequence

Comments

@msulprizio
Copy link
Contributor

msulprizio commented Jun 14, 2023

Name and Institution (Required)

Name: Melissa Sulprizio
Institution: Harvard / GCST

Confirm you have reviewed the following documentation

New GCHP feature or discussion

When building GCHP with CMake there are numerous warnings. For example:

[ 88%] Building Fortran object src/GCHP_GridComp/FVdycoreCubed_GridComp/CMakeFiles/FVdycor                                                                                                                                  eCubed_GridComp.dir/LatLon2Cube.F90.o                                                                                                                                                                                       
[ 88%] Building Fortran object src/GCHP_GridComp/FVdycoreCubed_GridComp/CMakeFiles/FVdycor                                                                                                                                  eCubed_GridComp.dir/fv_regrid_c2c_bin.F90.o                                                                                                                                                                                 
[ 88%] Building Fortran object src/GCHP_GridComp/FVdycoreCubed_GridComp/CMakeFiles/FVdycor                                                                                                                                  eCubed_GridComp.dir/fv_regrid_c2c.F90.o                                                                                                                                                                                     
/n/home05/msulprizio/RD/TransportTracers/gchp_merra2_TransportTracers/CodeDir/src/GCHP_Gri                                                                                                                                    dComp/FVdycoreCubed_GridComp/FV_StateMod.F90:4086:19:                                                                                                                                                                         

 4086 |       do 500 i=1,im                                                                                                                                                                             
      |                   1                                                                                                                                                                                                   
Warning: Fortran 2018 deleted feature: Shared DO termination label 500 at (1)                                                                                                                                                 
/n/home05/msulprizio/RD/TransportTracers/gchp_merra2_TransportTracers/CodeDir/src/GCHP_Gri                                                                                                                                    dComp/FVdycoreCubed_GridComp/FV_StateMod.F90:4087:39:                                                                                                                                                                         

 4087 | 500   a6(i,k) = delp(i,k-1) + delp(i,k)                                                                                                                                                                               
      |                                       1                                                                                                                                                                               
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CON                                                                                                                                    TINUE with label 500 at (1)                                                                                                                                                                                                   
/n/home05/msulprizio/RD/TransportTracers/gchp_merra2_TransportTracers/CodeDir/src/GCHP_Gri                                                                                                                                    dComp/FVdycoreCubed_GridComp/FV_StateMod.F90:4090:20:                                                                                                                                                                         

 4090 |       do 1000 i=1,im                                                                                                                                                                                
      |                    1                                                                                                                                                                                                  
Warning: Fortran 2018 deleted feature: Shared DO termination label 1000 at (1)                                                                                                                                                
/n/home05/msulprizio/RD/TransportTracers/gchp_merra2_TransportTracers/CodeDir/src/GCHP_Gri                                                                                                                                    dComp/FVdycoreCubed_GridComp/FV_StateMod.F90:4095:20:                                                                                                                                                                         

 4095 |       do 1220 i=1,im                                                                                                                                                                                
      |                    1                                                                                                                                                                                                  
Warning: Fortran 2018 deleted feature: Shared DO termination label 1220 at (1)                                                                                                                                                
/n/home05/msulprizio/RD/TransportTracers/gchp_merra2_TransportTracers/CodeDir/src/GCHP_Gri                                                                                                                                    dComp/FVdycoreCubed_GridComp/FV_StateMod.F90:4110:18:                                                                                                                                                                         

 4110 |       do 12 i=1,im                                                                                                                                                                          
      |                  1                                                                                                                                                                                                    
Warning: Fortran 2018 deleted feature: Shared DO termination label 12 at (1)                                                                                                                                                  
[ 88%] Building Fortran object src/GCHP_GridComp/FVdycoreCubed_GridComp/CMakeFiles/FVdycor                                                                                                                                  eCubed_GridComp.dir/CubeToCubeRegridder.F90.o                                                                                                                                                                               
[ 88%] Building Fortran object src/GCHP_GridComp/FVdycoreCubed_GridComp/CMakeFiles/FVdycor                                                                                                                                  eCubed_GridComp.dir/CubeToLatLonRegridder.F90.o 

These warnings can make users think that something is going wrong with the build, when they can be safely ignored in most cases. Ideally, these issues would be fixed, but most if not all of the warnings originate in GMAO libraries and would need to be fixed in those codes. In the meantime, we may be able to suppress the warnings by passing an argument to CMake (e.g. using -Wno-dev or target_compile_options(-w)).

@msulprizio msulprizio changed the title [FEATURE REQUEST [FEATURE REQUEST] Suppress WARNING messages when building GCHP Jun 14, 2023
@yantosca
Copy link
Contributor

I think this may be due to the GCHP compiler flags using -Wall (all warnings on) in the CMakeLists.

@lizziel
Copy link
Contributor

lizziel commented Jun 16, 2023

Suppressing these warnings sounds good to me!

@lizziel
Copy link
Contributor

lizziel commented Jun 16, 2023

Fyi, it's possible the -Wall was seen in GEOS and thus kept around. I am building GEOSgcm right now and see lots of warnings.

@stale
Copy link

stale bot commented Jul 19, 2023

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 "never stale" tag to prevent the Stale bot from closing this issue.

@stale stale bot added the stale No recent activity on this issue label Jul 19, 2023
@msulprizio msulprizio added never stale Never label this issue as stale and removed stale No recent activity on this issue labels Jul 19, 2023
@lizziel
Copy link
Contributor

lizziel commented Jan 16, 2024

@mathomp4, I have been playing around with trying to suppress the warning messages when building MAPL, FV3, etc in GCHP but so far have been unsuccessful. Do you have precedent for doing this in GEOSgcm? If yes, could you point me to where that is done? I wonder if there is a hook when building with ESMA_cmake/ecbuild?

Copy link
Contributor

@lizziel @msulprizio @mathomp4: I wonder if the easier solution is to fix the code to remove the obsolete features (like multiple DO loops ending on a single CONTINUE). That might open a new can of worms, though, especially if some of the code is in submodules that are maintained by others. Just a thought.

@mathomp4
Copy link

Is this with GCC or Intel? With Intel it's often fairly simple to suppress warnings. With GCC, it can be a bit harder, but often possible.

@lizziel
Copy link
Contributor

lizziel commented Jan 17, 2024

@yantosca, most if not all of the warnings are in GMAO repositories so it is beyond scope for us to update the code triggering them. @mathomp4, we generally use GNU compilers these days, although some users use Intel.

@mathomp4
Copy link

@lizziel We've done a good job making the MAPL build be fairly warning free (to the point we can). But I'll take a look and see if I can suppress more...

@lizziel
Copy link
Contributor

lizziel commented Jan 17, 2024

We are still using MAPL 2.26.0, so perhaps we should just be patient for MAPL 3...

@mathomp4
Copy link

We are still using MAPL 2.26.0, so perhaps we should just be patient for MAPL 3...

Well, MAPL 3 is a long way off. But I think MAPL 2.40 had much of the "clean up warnings" work. But 26->40 is a bit of a jump itself.

Sadly, it looks like for gfortran, you can't individually suppress certain warnings like you can with intel. You suppress them all, or not. :(

@lizziel
Copy link
Contributor

lizziel commented Jan 18, 2024

I think we should keep this feature request on the back-burner for now. The warnings are not causing problems and there will likely be fewer in the future.

@lizziel lizziel added category: Feature Request New feature or request topic: Build Related to makefiles or the build sequence labels Mar 20, 2024
@lizziel lizziel changed the title [FEATURE REQUEST] Suppress WARNING messages when building GCHP Suppress WARNING messages when building GCHP Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Feature Request New feature or request never stale Never label this issue as stale topic: Build Related to makefiles or the build sequence
Projects
None yet
Development

No branches or pull requests

4 participants