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

fix WRFDA build for Parallel netcdf-4 IO #1634

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

jamiebresch
Copy link
Contributor

@jamiebresch jamiebresch commented Jan 11, 2022

TYPE: bug fix

KEYWORDS: WRFDA, IO_NETCDFPAR

SOURCE: Jamie Bresch (NCAR)

DESCRIPTION OF CHANGES:
Problem:
WRFDA does not build after commit e018624.
Registry.EM_COMMON was modified in commit e018624, but WRFDA uses Registry.EM_COMMON.var.

Solution:
Add io_netcdfpar to Registry.EM_COMMON.var

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON.var

TESTS CONDUCTED:

  1. WRFDA builds after the fix
  2. Jenkins is all pass (for real).

liujake
liujake previously approved these changes Jan 11, 2022
Copy link
Contributor

@liujake liujake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@liujake liujake self-requested a review January 11, 2022 22:07
liujake
liujake previously approved these changes Jan 11, 2022
@davegill
Copy link
Contributor

jenkins

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 1c8d0391aa10ac1ac2f02244a9ec69aa8401f899, requested by: jamiebresch for PR: https://github.com/scala-computing/WRF/pull/1634. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 23           24
    Number of Builds       : 60           58
    Number of Simulations  : 159           157        0
    Number of Comparisons  : 96           93        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

Importantly,

Build DA executable
WRF DA Build WRFPlus
Thu Jan 13 04:01:42 UTC 2022
Thu Jan 13 04:08:38 UTC 2022
wrfplus.exe
SUCCESS BUILD WRFPlus
56856 -rwxr-xr-x 1 wrfuser wrf 58218920 Jan 13 04:08 main/wrfplus.exe
0 = STATUS
WRF DA Build WRFDA-4DVar
Thu Jan 13 04:08:38 UTC 2022
Thu Jan 13 04:13:35 UTC 2022
SUCCESS BUILD WRFDA-4DVar
0 = STATUS
   36 -rwxr-xr-x 1 wrfuser wrf    34416 Jan 13 04:09 var/build/da_advance_time.exe
  108 -rwxr-xr-x 1 wrfuser wrf   110112 Jan 13 04:09 var/build/da_bias_airmass.exe
   96 -rwxr-xr-x 1 wrfuser wrf    97400 Jan 13 04:09 var/build/da_bias_scan.exe
   44 -rwxr-xr-x 1 wrfuser wrf    43600 Jan 13 04:09 var/build/da_bias_sele.exe
   52 -rwxr-xr-x 1 wrfuser wrf    52208 Jan 13 04:09 var/build/da_bias_verif.exe
   88 -rwxr-xr-x 1 wrfuser wrf    89192 Jan 13 04:09 var/build/da_rad_diags.exe
  124 -rwxr-xr-x 1 wrfuser wrf   125888 Jan 13 04:09 var/build/da_tune_obs_desroziers.exe
  272 -rwxr-xr-x 1 wrfuser wrf   277424 Jan 13 04:09 var/build/da_tune_obs_hollingsworth1.exe
  180 -rwxr-xr-x 1 wrfuser wrf   183192 Jan 13 04:09 var/build/da_tune_obs_hollingsworth2.exe
  164 -rwxr-xr-x 1 wrfuser wrf   164216 Jan 13 04:09 var/build/da_update_bc.exe
  120 -rwxr-xr-x 1 wrfuser wrf   119256 Jan 13 04:09 var/build/da_update_bc_ad.exe
  200 -rwxr-xr-x 1 wrfuser wrf   201504 Jan 13 04:09 var/build/da_verif_grid.exe
   88 -rwxr-xr-x 1 wrfuser wrf    88560 Jan 13 04:09 var/build/da_verif_obs.exe
77400 -rwxr-xr-x 1 wrfuser wrf 79256568 Jan 13 04:13 var/build/da_wrfvar.exe
  684 -rwxr-xr-x 1 wrfuser wrf   697616 Jan 13 04:09 var/build/gen_be_addmean.exe
  676 -rwxr-xr-x 1 wrfuser wrf   689136 Jan 13 04:10 var/build/gen_be_cov2d.exe
  688 -rwxr-xr-x 1 wrfuser wrf   701664 Jan 13 04:09 var/build/gen_be_cov2d3d_contrib.exe
  676 -rwxr-xr-x 1 wrfuser wrf   689136 Jan 13 04:09 var/build/gen_be_cov3d.exe
  688 -rwxr-xr-x 1 wrfuser wrf   701664 Jan 13 04:09 var/build/gen_be_cov3d2d_contrib.exe
  684 -rwxr-xr-x 1 wrfuser wrf   697576 Jan 13 04:09 var/build/gen_be_cov3d3d_bin3d_contrib.exe
  692 -rwxr-xr-x 1 wrfuser wrf   705760 Jan 13 04:09 var/build/gen_be_cov3d3d_contrib.exe
  668 -rwxr-xr-x 1 wrfuser wrf   680944 Jan 13 04:10 var/build/gen_be_diags.exe
  684 -rwxr-xr-x 1 wrfuser wrf   697488 Jan 13 04:10 var/build/gen_be_diags_read.exe
  680 -rwxr-xr-x 1 wrfuser wrf   693328 Jan 13 04:09 var/build/gen_be_ensmean.exe
  696 -rwxr-xr-x 1 wrfuser wrf   709720 Jan 13 04:10 var/build/gen_be_ensrf.exe
  756 -rwxr-xr-x 1 wrfuser wrf   771048 Jan 13 04:10 var/build/gen_be_ep1.exe
  828 -rwxr-xr-x 1 wrfuser wrf   844888 Jan 13 04:10 var/build/gen_be_ep2.exe
  736 -rwxr-xr-x 1 wrfuser wrf   750976 Jan 13 04:10 var/build/gen_be_etkf.exe
  684 -rwxr-xr-x 1 wrfuser wrf   697328 Jan 13 04:09 var/build/gen_be_hist.exe
  784 -rwxr-xr-x 1 wrfuser wrf   800456 Jan 13 04:10 var/build/gen_be_stage0_gsi.exe
  804 -rwxr-xr-x 1 wrfuser wrf   820672 Jan 13 04:10 var/build/gen_be_stage0_wrf.exe
  724 -rwxr-xr-x 1 wrfuser wrf   738288 Jan 13 04:10 var/build/gen_be_stage1.exe
  720 -rwxr-xr-x 1 wrfuser wrf   734200 Jan 13 04:10 var/build/gen_be_stage1_1dvar.exe
  720 -rwxr-xr-x 1 wrfuser wrf   734408 Jan 13 04:10 var/build/gen_be_stage1_gsi.exe
  700 -rwxr-xr-x 1 wrfuser wrf   713712 Jan 13 04:10 var/build/gen_be_stage2.exe
  720 -rwxr-xr-x 1 wrfuser wrf   734256 Jan 13 04:10 var/build/gen_be_stage2_1dvar.exe
  168 -rwxr-xr-x 1 wrfuser wrf   171856 Jan 13 04:09 var/build/gen_be_stage2_gsi.exe
  688 -rwxr-xr-x 1 wrfuser wrf   701424 Jan 13 04:10 var/build/gen_be_stage2a.exe
  696 -rwxr-xr-x 1 wrfuser wrf   709616 Jan 13 04:10 var/build/gen_be_stage3.exe
  676 -rwxr-xr-x 1 wrfuser wrf   689144 Jan 13 04:10 var/build/gen_be_stage4_global.exe
  708 -rwxr-xr-x 1 wrfuser wrf   722184 Jan 13 04:09 var/build/gen_be_stage4_regional.exe
  672 -rwxr-xr-x 1 wrfuser wrf   685096 Jan 13 04:10 var/build/gen_be_vertloc.exe
  804 -rwxr-xr-x 1 wrfuser wrf   820400 Jan 13 04:10 var/build/gen_mbe_stage2.exe
Thu Jan 13 04:13:35 UTC 2022
SUCCESSFUL BUILD
0 -rw-r--r-- 1 wrfuser wrf 0 Jan 13 04:08 SUCCESS_BUILD_WRF_d01_wrfplus_18_WRFPlus
0 -rw-r--r-- 1 wrfuser wrf 0 Jan 13 04:13 SUCCESS_BUILD_WRF_d01_all_wrfvar_18_WRFDA-4DVar

@davegill davegill merged commit 92fd706 into wrf-model:develop Jan 13, 2022
@jamiebresch jamiebresch deleted the build_nfpar branch January 13, 2022 14:17
davegill added a commit that referenced this pull request Jan 24, 2022
TYPE: bug fix

KEYWORDS: netcdfpar, Error

SOURCE: internal

DESCRIPTION OF CHANGES:
IMPORTANT: Without these mods, every commit since the parallel netcdf4 IO mods will fail the DA
build test in the regression test. For example, at least these commits:
```
fed10f4 Adding the WRF-Solar EPS model (#1547)
0bda5e0 Fix 4dvar build failure after commit 8b5bfe5 (#1652)
8b5bfe5 Thompson AA enhancements: BC aerosol, biomass burning emissions, and … (#1616)
9dc68ca After testing with UFS/GFS/FV-3, some tuning knob changes to Thompson-MP and icloud3 (cloud fraction) scheme (#1626)
96fd889 Update HONO, TERP, and CO2 emissions (#1644)
64fb190 SFCLAY=1, add shallow water roughness calculation (#1543)
609c2fc New module firebrand_spotting for WRF-Fire (#1540)
75bfe6d MYNN PBL clouds in photolysis option 4 (TUV) (#1622)
f8c4b13 Fix runtime error when using sf_surface_mosaic = 1 with use_wudapt_lcz = 0 (#1638)
b511c70 Run-time option for climate GHG for radiation (#1625)
8194c66 Bug fix for configuration option INTEL:HSW/BDW (#1645)
16c9287  bug fixes for radar_rf_opt=2 (#1642)
a82ce24 Sync with NoahMP Github version with all NoahMP updates since v4.3 (#1641)
7b642cc Bug fix for TAMDAR T VarBC (#1632)
92fd706 fix WRFDA build for Parallel netcdf-4 IO (#1634)
```
Problem:
With PR #1552 "Parallel netcdf-4 IO option" (SHA1 3cd4713), when then code was built without
the new parallel NetCDF4 compression, the build log had an `Error`. 
```
> grep Error compile.log
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [diffwrf] Error 1 (ignored)
make[2]: [diffwrf] Error 1 (ignored)
wrf_io.f:117: Error: Can't open included file 'mpif.h'
make[2]: [wrf_io.o] Error 1 (ignored)
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [field_routines.o] Error 1 (ignored)
make[2]: [libwrfio_nfpar.a] Error 127 (ignored)
make[2]: [libwrfio_nfpar.a] Error 1 (ignored)
```
The problem was related to constructing the object files in the io_netcdfpar directory. When the 
option is not selected at compile time, then we do not care about errors in the directory that will 
never be used.

Solution:
If the NETCDFPAR option is not selected at compile time, then SKIP going into the io_netcdfpar
directory all together.

LIST OF MODIFIED FILES:
m Makefile
m arch/Config.pl
m arch/configure.defaults
m configure

TESTS CONDUCTED:
1. Without the NETCDFPAR parameter set, the build for the io_netcdfpar directory is bypassed:
```
          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \
```

2. When the NETCDFPAR env variable is set, the build includes the io_netcdfpar directory:
          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \
```

3. Jenkins tests are all PASS.
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: WRFDA, IO_NETCDFPAR

SOURCE: Jamie Bresch (NCAR)

DESCRIPTION OF CHANGES:
Problem:
WRFDA does not build after commit e018624.
Registry.EM_COMMON was modified in commit e018624, but WRFDA uses Registry.EM_COMMON.var.

Solution:
Add io_netcdfpar to Registry.EM_COMMON.var

LIST OF MODIFIED FILES:
M       Registry/Registry.EM_COMMON.var

TESTS CONDUCTED:
1. WRFDA builds after the fix
2. Jenkins is all pass (for real).
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: netcdfpar, Error

SOURCE: internal

DESCRIPTION OF CHANGES:
IMPORTANT: Without these mods, every commit since the parallel netcdf4 IO mods will fail the DA
build test in the regression test. For example, at least these commits:
```
fed10f4 Adding the WRF-Solar EPS model (wrf-model#1547)
0bda5e0 Fix 4dvar build failure after commit 8b5bfe5 (wrf-model#1652)
8b5bfe5 Thompson AA enhancements: BC aerosol, biomass burning emissions, and … (wrf-model#1616)
9dc68ca After testing with UFS/GFS/FV-3, some tuning knob changes to Thompson-MP and icloud3 (cloud fraction) scheme (wrf-model#1626)
96fd889 Update HONO, TERP, and CO2 emissions (wrf-model#1644)
64fb190 SFCLAY=1, add shallow water roughness calculation (wrf-model#1543)
609c2fc New module firebrand_spotting for WRF-Fire (wrf-model#1540)
75bfe6d MYNN PBL clouds in photolysis option 4 (TUV) (wrf-model#1622)
f8c4b13 Fix runtime error when using sf_surface_mosaic = 1 with use_wudapt_lcz = 0 (wrf-model#1638)
b511c70 Run-time option for climate GHG for radiation (wrf-model#1625)
8194c66 Bug fix for configuration option INTEL:HSW/BDW (wrf-model#1645)
16c9287  bug fixes for radar_rf_opt=2 (wrf-model#1642)
a82ce24 Sync with NoahMP Github version with all NoahMP updates since v4.3 (wrf-model#1641)
7b642cc Bug fix for TAMDAR T VarBC (wrf-model#1632)
92fd706 fix WRFDA build for Parallel netcdf-4 IO (wrf-model#1634)
```
Problem:
With PR wrf-model#1552 "Parallel netcdf-4 IO option" (SHA1 3cd4713), when then code was built without
the new parallel NetCDF4 compression, the build log had an `Error`. 
```
> grep Error compile.log
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [diffwrf] Error 1 (ignored)
make[2]: [diffwrf] Error 1 (ignored)
wrf_io.f:117: Error: Can't open included file 'mpif.h'
make[2]: [wrf_io.o] Error 1 (ignored)
Fatal Error: Cannot open module file ‘wrf_data_ncpar.mod’ for reading at (1): No such file or directory
make[2]: [field_routines.o] Error 1 (ignored)
make[2]: [libwrfio_nfpar.a] Error 127 (ignored)
make[2]: [libwrfio_nfpar.a] Error 1 (ignored)
```
The problem was related to constructing the object files in the io_netcdfpar directory. When the 
option is not selected at compile time, then we do not care about errors in the directory that will 
never be used.

Solution:
If the NETCDFPAR option is not selected at compile time, then SKIP going into the io_netcdfpar
directory all together.

LIST OF MODIFIED FILES:
m Makefile
m arch/Config.pl
m arch/configure.defaults
m configure

TESTS CONDUCTED:
1. Without the NETCDFPAR parameter set, the build for the io_netcdfpar directory is bypassed:
```
          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
          echo SKIPPING make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.7.3/gnu/9.1.0" \
```

2. When the NETCDFPAR env variable is set, the build includes the io_netcdfpar directory:
          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \

          cd ../io_netcdfpar ; \
           make -i -r NETCDFPARPATH="/glade/u/apps/ch/opt/netcdf/4.8.0/gnu/9.1.0" \
```

3. Jenkins tests are all PASS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants