Skip to content

Commit

Permalink
Remove the fallow-argument-mismatch compile flag from
Browse files Browse the repository at this point in the history
some CMakeLists.txt files. Replace 'use mpi' with 'use mpi_f08'
in chgres_cube.

Fixes ufs-community#471.
  • Loading branch information
GeorgeGayno-NOAA committed Feb 16, 2022
1 parent 9dea217 commit 27d8469
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 22 deletions.
5 changes: 0 additions & 5 deletions sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")

# Turn on this argument mismatch flag for gfortran10.
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
endif()
endif()

set(exe_name chgres_cube)
Expand Down
4 changes: 2 additions & 2 deletions sorc/chgres_cube.fd/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module atmosphere
!! @author George Gayno
subroutine atmosphere_driver(localpet)

use mpi
use mpi_f08

implicit none

Expand Down Expand Up @@ -1600,7 +1600,7 @@ END SUBROUTINE VINTG_WAM
!!
!! @author Mark Iredell @date 92-10-31
SUBROUTINE VINTG
use mpi
use mpi_f08

IMPLICIT NONE

Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/chgres.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
!! @return 0 for success, error code otherwise.
program chgres

use mpi
use mpi_f08
use esmf

use atmosphere, only : atmosphere_driver
Expand Down
6 changes: 3 additions & 3 deletions sorc/chgres_cube.fd/input_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ end subroutine read_input_atm_restart_file
!! @author George Gayno NCEP/EMC
subroutine read_input_atm_gaussian_netcdf_file(localpet)

use mpi
use mpi_f08

implicit none

Expand Down Expand Up @@ -2166,7 +2166,7 @@ end subroutine read_input_atm_gaussian_netcdf_file
!! @author George Gayno NCEP/EMC
subroutine read_input_atm_tiled_history_file(localpet)

use mpi
use mpi_f08

implicit none

Expand Down Expand Up @@ -2457,7 +2457,7 @@ end subroutine read_input_atm_tiled_history_file
!! @author George Gayno NCEP/EMC
subroutine read_input_atm_grib2_file(localpet)

use mpi
use mpi_f08
use wgrib2api

use grib2_util, only : rh2spfh, rh2spfh_gfs, convert_omega
Expand Down
4 changes: 2 additions & 2 deletions sorc/chgres_cube.fd/model_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ end subroutine define_input_grid_mosaic
subroutine define_input_grid_gfs_grib2(localpet, npets)

use wgrib2api
use mpi
use mpi_f08
use program_setup, only : data_dir_input_grid, &
grib2_file_input_grid

Expand Down Expand Up @@ -806,7 +806,7 @@ end subroutine define_input_grid_gfs_grib2
!! @author Jeff Beck
subroutine define_input_grid_grib2(localpet, npets)

use mpi
use mpi_f08
use netcdf
use wgrib2api
use program_setup, only : grib2_file_input_grid, data_dir_input_grid, &
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/search_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module search_util
!! @author George Gayno NCEP/EMC
subroutine search (field, mask, idim, jdim, tile, field_num, latitude, terrain_land, soilt_climo)

use mpi
use mpi_f08
use esmf

implicit none
Expand Down
4 changes: 2 additions & 2 deletions sorc/chgres_cube.fd/utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
!! @param[in] rc error status code
subroutine error_handler(string, rc)

use mpi
use mpi_f08

implicit none

Expand All @@ -30,7 +30,7 @@ end subroutine error_handler
!! @param[in] string error message
subroutine netcdf_err( err, string )

use mpi
use mpi_f08
use netcdf

implicit none
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/wam_climo_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ end subroutine tselec
!!
!! @author Hann-Ming Henry Juang
function glob7s(p)
use mpi
use mpi_f08
use gettemp_mod, only:plg,ctloc,stloc,c2tloc,s2tloc,c3tloc,s3tloc, &
day,dfa,apdf,apt,long=>xlong,sw,swc
dimension p(*),t(14)
Expand Down
3 changes: 0 additions & 3 deletions sorc/global_cycle.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
endif()
endif()

set(exe_name global_cycle)
Expand Down
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fconvert=big-endian -fno-range-check")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz")
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/orog_gsl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fno-range-check")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz")
endif()
endif()

Expand Down

0 comments on commit 27d8469

Please sign in to comment.