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

Make failing due to unrecognized command line option ‘-fallow-argument-mismatch’ #788

Open
ksampson-aso opened this issue Nov 6, 2024 · 3 comments

Comments

@ksampson-aso
Copy link

Expected Behavior

Cmake and make both succeed.

Current Behavior

Cmake succeeds, but make does not.

Cmake:

[ec2-user@ip-10-0-2-171 build]$ cmake .. -DWRF_HYDRO=1 -DHYDRO_D=0 -DSPATIAL_SOIL=1 -DNWM_META=1 > cmake_log.txt
-- NetCDF Include Dir: /home/ec2-user/Build/include
-- Setting LSM to: NoahMP
=============================================================
-- Start of WRF-Hydro Env VARIABLES
WRF_HYDRO = 1
HYDRO_D = 0
WRF_HYDRO_RAPID = 0
SPATIAL_SOIL = 1
WRFIO_NCD_LARGE_FILE_SUPPORT = 0
NCEP_WCOSS = 0
NWM_META = 1
WRF_HYDRO_NUDGING = 0
OUTPUT_CHAN_CONN = 0
PRECIP_DOUBLE = 0
WRF_HYDRO_NUOPC = 0
=============================================================
-- Using gfortran
-- Building NoahMP LSM

Compile:

[ec2-user@ip-10-0-2-171 build]$ make
[  1%] Building Fortran object MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o
gfortran: error: unrecognized command line option ‘-fallow-argument-mismatch’; did you mean ‘-Wno-argument-mismatch’?
make[3]: *** [MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o] Error 1
make[2]: *** [MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o.provides] Error 2
make[1]: *** [MPP/CMakeFiles/hydro_mpp.dir/all] Error 2
make: *** [all] Error 2

Possible Solution

N/A

Steps to Reproduce (for bugs)

  1. clone the repo
  2. mkdir build
  3. cmake .. -DWRF_HYDRO=1 -DHYDRO_D=0 -DSPATIAL_SOIL=1 -DNWM_META=1 > cmake_log.txt
  4. make -j 4

Your Environment

  • Version of the code used: v5.3.0-alpha3
  • Operating System and version: Linux/UNIX
  • Compiler and version:
  • Machine OS info:
    NAME="Amazon Linux"
    VERSION="2"
    ID="amzn"
    ID_LIKE="centos rhel fedora"
    VERSION_ID="2"
    PRETTY_NAME="Amazon Linux 2"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
    HOME_URL="https://amazonlinux.com/"
    SUPPORT_END="2025-06-30"
    
    
  • Other relevant information:
[ec2-user@ip-10-0-2-171 build]$ /home/ec2-user/Build/bin/nc-config --all

This netCDF 4.9.2 has been built with the following features:

  --cc            -> gcc
  --cflags        -> -I/home/ec2-user/Build/include -I/home/ec2-user/Build/include
  --libs          -> -L/home/ec2-user/Build/lib -lnetcdf
  --static        -> -lhdf5_hl -lhdf5 -lm -lz -ldl -lbz2 -lxml2 -lcurl
  --has-dap          -> yes
  --has-dap2         -> yes
  --has-dap4         -> yes
  --has-nc2          -> yes
  --has-nc4          -> yes
  --has-hdf5         -> yes
  --has-hdf4         -> no
  --has-logging      -> no
  --has-pnetcdf      -> no
  --has-szlib        -> no
  --has-cdf5         -> yes
  --has-parallel4    -> no
  --has-parallel     -> no
  --has-nczarr       -> yes
  --has-zstd         -> no
  --has-benchmarks   -> no
  --has-multifilters -> yes
  --has-stdfilters   -> deflate bz2
  --has-quantize     -> yes

  --prefix           -> /home/ec2-user/Build
  --includedir       -> /home/ec2-user/Build/include
  --libdir           -> /home/ec2-user/Build/lib
  --plugindir        ->
  --version          -> netCDF 4.9.2
@ksampson-aso
Copy link
Author

Adding to this thread that I applied the changes found in the recent commit #785 , but still get the same error as before:

[ec2-user@ip-10-0-2-171 build]$ make  
[  1%] Building Fortran object MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o  
gfortran: error: unrecognized command line option ‘-fallow-argument-mismatch’; did you mean ‘-Wno-argument-mismatch’?  
make[3]: *** [MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o] Error 1  
make[2]: *** [MPP/CMakeFiles/hydro_mpp.dir/CPL_WRF.F.o.provides] Error 2  
make[1]: *** [MPP/CMakeFiles/hydro_mpp.dir/all] Error 2  
make: *** [all] Error 2

@rcabell
Copy link
Collaborator

rcabell commented Nov 14, 2024

Hi Kevin -- it looks like you have a very old version of gfortran. The -fallow-argument-mismatch was added in gfortran 10.

However, we'd strongly recommend you update to a newer version of WRF-Hydro as this CMake issue was addressed/fixed in February of 2023 (#680), allowing older versions of gfortran to continue to work.

@ksampson-aso
Copy link
Author

Thank you for your response, @rcabell . I will look at updating to a more recent version of WRF-Hydro for compatibility with our system.

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

No branches or pull requests

2 participants