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

bug: advance_cymdh does not compile with nvhpc or cce #594

Closed
hkershaw-brown opened this issue Dec 11, 2023 · 2 comments
Closed

bug: advance_cymdh does not compile with nvhpc or cce #594

hkershaw-brown opened this issue Dec 11, 2023 · 2 comments
Assignees
Labels
Bug Something isn't working fortran standards compiler issues and (non) standard-compliant code

Comments

@hkershaw-brown
Copy link
Member

hkershaw-brown commented Dec 11, 2023

🐛 🐌 Your bug may already be reported!

Describe the bug

  1. on Derecho:
    module load nvhpc
    cd /DART/models/wrf/work/ 
    ./quickbuild.sh WRF_DART_utilities/advance_cymdh
    
  2. success
  3. failure:
NVFORTRAN-S-0038-Symbol, iargc, has not been explicitly declared (/glade/derecho/scratch/hkershaw/build_everything/nvhpc.2023-12-11T0702/DART/models/wrf/WRF_DART_utilities/advance_cymdh.f90: 7)
  0 inform,   0 warnings,   1 severes, 0 fatal for advance_cymdh
make: *** [Makefile:72: advance_cymdh.o] Error 2

Which model(s) are you working with?

wrf

Version of DART

v10.9.2

Have you modified the DART code?

No

Build information

Please describe:

  1. Derecho
  2. nvhpc nvfortran 23.1-0
@hkershaw-brown hkershaw-brown changed the title bug: bug: advance_cymdh does not compile with nvhpc Dec 11, 2023
@hkershaw-brown hkershaw-brown added the Bug Something isn't working label Dec 11, 2023
@hkershaw-brown hkershaw-brown mentioned this issue Dec 11, 2023
15 tasks
@hkershaw-brown hkershaw-brown changed the title bug: advance_cymdh does not compile with nvhpc bug: advance_cymdh does not compile with nvhpc or cce Dec 11, 2023
@hkershaw-brown hkershaw-brown added the fortran standards compiler issues and (non) standard-compliant code label Dec 11, 2023
@mjs2369
Copy link
Contributor

mjs2369 commented Dec 12, 2023

Solution options:

  1. Simply add integer, external :: iargc to WRF_DART_utilities/advance_cymdh.f90

  2. Replace iargc() with the F2003 “COMMAND_ARGUMENT_COUNT” intrinsic function instead for better portability
    https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gfortran/
    https://gcc.gnu.org/onlinedocs/gfortran/COMMAND_005fARGUMENT_005fCOUNT.html

Here are some comments in the code for the NCEP obs_converter about machines not supporting iargc()

Here we write our own function for COMMAND_ARGUMENT_COUNT() that calls iargc() instead of using the intrinsic?
https://github.com/NCAR/DART/blob/74b4221e5f4e41e4de2980fc9ff8697ba4540a8b/models/wrf/WRF_DART_utilities/f2kcli.f90#L78C1-L97C42

@mjs2369
Copy link
Contributor

mjs2369 commented Feb 13, 2024

Closed as completed via #619

@mjs2369 mjs2369 closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working fortran standards compiler issues and (non) standard-compliant code
Projects
None yet
Development

No branches or pull requests

2 participants